➗ Math

Random Number Generator

Generate cryptographically secure random whole numbers within any range, with or without repeats.

Results

Random numbers

📊 Random Number Generator chart

Character composition of the result: letters, digits, spaces, punctuation and other symbols.

What is the Random Number Generator?

Generate cryptographically secure random whole numbers within any range, with or without repeats. Cryptographically secure random numbers give fair results for raffles, games, sampling and classroom activities, with or without repeats.

Random Number Generator – free online math tool illustration
Random Number Generator — free, exact and private.

How to use the Random Number Generator

  1. Enter your minimum, your maximum, your how many.
  2. Tick the options you need: no duplicates.
  3. Press the Generate button — press it again for a fresh result.
  4. Read the output: random numbers.
  5. Use the 📊 chart to see the result visually, then copy or share it.

Formula and method

Uses crypto.getRandomValues with rejection sampling (no modulo bias)

Where the Random Number Generator helps in real life

You are running a raffle with tickets numbered 1 to 500. Generating one number with no repeats picks a winner fairly, and you can draw more for runner-up prizes.

A researcher needs to choose 20 households at random from a numbered list of 1,200. Generating 20 unique numbers gives an unbiased sample.

Common mistakes to avoid

  • Allowing repeats when each number should only be drawn once.
  • Setting the range one too small, such as 1–499 for 500 tickets.
  • Re-generating until you like the result.
  • Assuming patterns in a short run mean the generator is biased.

💡 Practical tip: Each random number is independent — a number drawn before is no more or less likely to appear again when repeats are allowed.

Illustration: a classroom whiteboard with math formulas
Random Number Generator in everyday work — illustration.

Tips for better results

  • Turn off repeats for raffles and sampling.
  • Double-check the minimum and maximum before drawing.
  • Screenshot or note the results for transparency.

Frequently asked questions

What does the Random Number Generator do?

Generate cryptographically secure random whole numbers within any range, with or without repeats.

How is it calculated?

The Random Number Generator uses this method: Uses crypto.getRandomValues with rejection sampling (no modulo bias).

Is the Random Number Generator accurate?

Yes. It uses standard formulas and exact constants, and the results are verified by our automated test suite. Values are displayed to up to 12 significant digits.

Is this tool free and private?

Yes — the Random Number Generator is completely free with no sign-up, and it runs entirely in your browser, so the values you enter are never uploaded to our servers.

Related tools

📬 Get new tools first — free

Join Taurang to hear about new calculators, converters and features. No spam; unsubscribe anytime.

Create free account