CalculatorBear
English

Random Number Generator

Generate random whole numbers or decimals in any range, with or without repeats. Every click gives a new set.

Used only for decimals.

Random number

14

Range
1 to 100

Results are provided for general information only.

About the random number generator

Set a minimum and a maximum, choose how many numbers you want and press calculate. Both ends of the range are included. Choose whole numbers or decimals, and decide whether the same number may appear more than once.

Numbers are drawn with your browser's cryptographic random source, and a rejection step removes the small bias that a simple remainder would add, so every value in the range is equally likely.

Each press of the button produces a new result. If you ask for more different numbers than the range holds, for example 10 unique whole numbers between 1 and 5, the calculator explains the problem instead of looping forever.

Formula

  • Whole number = minimum + random integer in [0, maximum − minimum]
  • Decimal = minimum + random fraction × (maximum − minimum), rounded to the chosen places

Example

Minimum 1, maximum 49, count 6, all numbers different: a typical lottery pick such as 7, 12, 23, 31, 38, 45. The numbers will differ every time you run it.