🎲

Random Number Generator

Generate random integers in a range.

Math & NumbersUpdated 2026-03-25

The Random Number Generator instantly creates one or more random integers or decimals within any range you specify. Set the minimum, maximum, how many numbers to generate, and whether duplicates are allowed. The generator uses a cryptographically secure algorithm for true unpredictability. Common uses include lottery number selection, random sampling for research, classroom activities (random student picker, random team assignment), game development, fair decision-making, and statistical simulations. All generation happens in your browser — no server required.

Advertisement

Random Number Generator

Advertisement

Examples

UK Lotto: 6 Numbers from 1–59

Generate 6 unique random numbers between 1 and 59 (UK National Lottery).

e.g., 7, 14, 23, 38, 45, 52 (example — each generation is unique)

Random Team Assignment: Pick from 1–30

Pick a random student number from a class of 30.

e.g., 17

Statistical Sample: 10 Numbers from 1–100

Generate 10 unique random numbers for a random sample from a 100-item population.

e.g., 3, 18, 27, 34, 49, 56, 63, 71, 88, 95

Roll Two Dice

Simulate rolling two standard 6-sided dice.

e.g., 4 and 6 (total: 10)

Tips

  • For raffles, generate one number per entry and use "no duplicates" to ensure fair selection.
  • For classroom activities, set range to 1–[class size] and generate to pick random participants.
  • Generate multiple sets and pick one for extra unpredictability.
  • For decision-making between N options, generate 1 number from 1–N and assign each option a number.

Frequently Asked Questions

Is this truly random?

This generator uses a cryptographically secure pseudo-random number generator (CSPRNG) via the Web Crypto API. While technically deterministic (all computer randomness is), CSPRNG output is statistically indistinguishable from true randomness for all practical purposes.

Can I generate numbers without repeats?

Yes. Enable the "No duplicates" option to ensure each generated number appears only once in the set. The pool size must be at least as large as the quantity you want to generate.

What is the maximum range I can use?

You can use any integer range within JavaScript's safe integer limits: from −9,007,199,254,740,991 to +9,007,199,254,740,991. For practical use, the range can be as small as 1–2 or as large as 1–10,000,000.

Can I use this for lottery number picking?

Yes. Set the range to your lottery's numbers (e.g., 1–49 for UK Lotto or 1–69 for US Powerball), set quantity to 6 (or your lottery's draw count), and enable no duplicates. Note that lottery results are independent of previous draws — past numbers don't affect future ones.

What does "uniform distribution" mean?

Uniform distribution means every number in the range has an equal probability of being selected. This generator produces uniformly distributed numbers — no number is more likely than any other.

How is this different from flipping a coin or rolling dice?

A coin flip is a range of 1–2 (heads=1, tails=2). A standard die is 1–6. This generator extends that principle to any range with any number of results. Set 1–6, quantity 2, with duplicates allowed to simulate rolling two dice.

Advertisement

Related Calculators