Random Number Generator

Generate truly random numbers in any range, pick multiple without repeats, flip a coin or roll dice.

Was this tool helpful?

How to use the Random Number Generator

  1. 1Set the minimum and maximum.
  2. 2Choose how many numbers and whether repeats are allowed.
  3. 3Click Generate. Use the tabs to flip a coin or roll dice.

Truly random

Numbers are generated with your browser's cryptographically secure random generator (crypto.getRandomValues), which is suitable for giveaways, raffles, games and classroom picks.

Ideas for using it

  • Giveaways and raffles: number the entries, then draw a number between 1 and the total.
  • Classrooms: pick a student, assign groups or choose a question at random.
  • Games: roll any number of dice or flip a coin when you can't find the real thing.
  • Decisions: give each option a number and let the generator choose.
  • Sampling: pick random rows to check from a spreadsheet or survey.

Odds worth knowing

A fair coin lands heads 50% of the time, but streaks are normal: in 100 flips, a run of 6 or more heads or tails in a row is more likely than not. Each roll of a die has a 1 in 6 chance of any number, and two dice total 7 more often than any other sum (6 in 36).

How the numbers are generated

Numbers come from your browser's cryptographically secure generator (crypto.getRandomValues), the same source used for encryption keys, not from the simpler Math.random. The tool also uses rejection sampling: random values that would make some results slightly more likely than others are thrown away and redrawn, so every number in your range has exactly the same chance.

With "no repeats" switched on, each number can come up only once, like drawing raffle tickets from a hat.

Repeats are more likely than you think

If repeats are allowed, duplicates appear surprisingly early. Drawing 10 numbers from 1–100 gives a 37.2% chance that at least two are the same; with 23 numbers from 1–365 it is 50.7%, the classic birthday problem. Switch on "no repeats" for raffles and team picks.

Numbers drawnRangeChance of at least one repeat
51–1009.7%
101–10037.2%
201–10087.0%
231–36550.7%

Dice odds

With two dice, totals in the middle are far more common than the extremes: 7 comes up in 6 of the 36 combinations (16.7%), while 2 and 12 each have only 1 (2.8%).

Frequently asked questions

Can I pick lottery-style numbers?

Yes. Set the range (for example 1–69), the quantity, and turn off repeats.

Is the result stored?

No. Everything happens on your device.

Is this random enough for a prize draw?

Yes. It uses the browser's cryptographic random generator with no bias between numbers. For an official draw, record the settings and result (a screenshot or screen recording) so participants can see it was fair.

Can I pick several numbers without duplicates?

Yes. Set how many numbers you need and switch on no repeats; each number can then appear only once.