All Articles
Random Tools

Random Number Generator: Is the Maximum Included?

November 30, 20263 min read

Random Number generator with Minimum 1, Maximum 10, How many numbers 10 and Allow duplicates unchecked, showing Results 4 2 10 1 8 3 9 6 5 7 with Sum 55 and Average 5.5

Yes: in the Random Number Generator both Minimum and Maximum can be returned. A range of 1 to 10 can produce 1 and can produce 10, so it has ten possible values.

Prove it with a 1-to-10 test

  1. Set Minimum to 1 and Maximum to 10.
  2. Set How many numbers? to 10.
  3. Untick Allow duplicates.
  4. Click Generate.

With duplicates off, ten numbers from a ten-number range must be every value exactly once, in random order. Your boxes will not match the screenshot's order, but you will always see 1 and 10 both present, Sum: 55 and Average: 5.5. If the endpoints were excluded, the tool could not produce ten different numbers.

What the tool does with odd bounds

  • Decimals: results are whole numbers, and the bounds are rounded inward. Minimum 1.5 and Maximum 3.5 can only give 2 or 3.
  • Reversed bounds: if Minimum is bigger than Maximum, the Generate button is disabled.
  • Need an exclusive end? Move the bound yourself. For "1 up to but not including 10", set Maximum to 9.
  • Limit: up to 10,000 numbers at a time.
Random Number generator showing the error: Only 10 different numbers exist in this range. Lower the count or allow duplicates, for Minimum 1, Maximum 10 and 11 numbers with duplicates off
Advertisement

Not for passwords or security

The tool uses the browser's standard Math.random(), which is fine for games, classroom picks and informal draws but is not a cryptographic generator. For passwords or keys, use the password generator or a security library. If a draw must be provable, record the rules before you generate and keep the result; one click of a button is not an audit trail.

If it doesn't work

  • If you see Only 10 different numbers exist in this range, you asked for more unique numbers than the range holds (screenshot 2). Lower How many numbers? or tick Allow duplicates.
  • If you see There is no whole number between the minimum and maximum, the decimals leave no integer, such as 1.2 to 1.8.
  • If a small sample seems to repeat or skip values, that is normal for random output; only the no-duplicates 1-to-10 test guarantees every value.
Advertisement
Random Number GeneratorInclusive rangeRandom Tools