AlphaCalcs

Math

Random Number Generator

Draw random whole numbers in any range. Turn off repeats for raffles, team picks and lottery-style draws.

Where the randomness comes from

This generator uses the Web Crypto API (crypto.getRandomValues), which draws from your operating system's cryptographically secure entropy pool rather than the ordinary pseudo-random function. It also rejects values in the small unusable tail of the 32-bit range before taking a remainder, which removes the modulo bias that makes naive generators favour lower numbers very slightly.

Unique draws

With repeats turned off, the generator builds the full range, picks a position at random and removes it, then repeats. Every remaining number stays equally likely at every step, which is what you want for a raffle, a team draw or lottery-style numbers.

Common uses

  • Dice: 1 to 6, one number, repeats allowed.
  • Coin flip: 1 to 2.
  • Lottery-style pick: 1 to 49, six numbers, no repeats.
  • Raffle: 1 to the number of tickets sold, one draw per prize, no repeats.
  • Random sampling: number your rows, then draw the sample size you need without repeats.

What randomness does not mean

A genuinely random draw can produce 4, 5, 6, 7, 8, 9 — that sequence is exactly as likely as any other specific combination. Runs and clusters are expected in random data, and their absence is what should look suspicious. Past draws also carry no information about future ones; each draw starts fresh. For everyday maths rather than random draws, try the scientific calculator.

Frequently asked questions

Is this random number generator truly random?

It uses your browser's cryptographically secure random source, which is suitable for raffles, sampling and games. Physical hardware generators are used where regulatory certification is required.

Can I use it for a prize draw?

Yes. Number the entries, set the range to match, turn repeats off and draw as many as you have prizes. Record the result at the time to keep the draw auditable.

Are the numbers stored anywhere?

No. They are generated in your browser and disappear when you refresh the page.

How do I generate random numbers with decimals?

This tool draws whole numbers. For decimals, pick a wider integer range and divide — for two decimal places between 0 and 1, draw between 0 and 100 and divide by 100.