Skip to main content
Tools

Random Number Generator

Generate random whole numbers or decimals in any range, with options for count, no repeats, sorting and excluded values.

Both ends are included

Both ends are included

1 to 10,000

0 for whole numbers, up to 10

Separate with commas, spaces or lines; write ranges as 10..20 or 10~20

Random numbers

How to use

  1. Enter a minimum and a maximum. Both ends can be drawn.
  2. For decimals, set the decimal places: 2 gives numbers like 3.14.
  3. Set how many numbers you need. Turn on “No repeats” to draw each number at most once, for raffles and lotteries.
  4. List any numbers that must not appear under “Exclude”; write ranges as 10..20.
  5. Numbers appear right away. Click “Roll again” or press Ctrl/⌘ + Enter for a new draw, then copy or download the result.

FAQ

Are the numbers truly random?

They come from crypto.getRandomValues() in your browser’s Web Crypto API, a cryptographically secure generator, not the predictable Math.random(). Everything runs locally; nothing is sent to a server.

Is every number equally likely?

Yes. Taking a random value modulo the range size makes smaller numbers slightly more likely (modulo bias). This tool uses rejection sampling instead, throwing away values that would cause bias, so every number in the range has exactly the same chance, also when some numbers are excluded.

Can it handle very large numbers?

Yes. The tool computes exactly with BigInt, so ranges can go far beyond 9,007,199,254,740,991, the largest whole number regular JavaScript numbers hold exactly, up to 100 digits.

How are decimals generated?

With 2 decimal places, numbers are spaced 0.01 apart: from 0 to 1 there are 101 values (0.00, 0.01 … 1.00), each equally likely. Ends that do not fall on that spacing are rounded inward, so 0.005 to 0.03 gives only 0.01, 0.02 and 0.03.

How does “No repeats” work?

The tool uses Floyd’s algorithm to draw a set of distinct values directly, so every combination is equally likely, then shuffles their order. If you ask for more numbers than the range holds, you get an error instead of silent repeats.

Keyboard shortcuts

/
Search tools (on a tool page, goes to the homepage search)
?
Show this help
Esc
Close a dialog
Ctrl / ⌘Enter
Run the tool's main action (where supported)

While you type in a text field, / and ? are typed as usual.