Random Number Generator
Generate random integers or decimals (Uniform or Gaussian/bell-curve distribution) using a real crypto-secure, bias-free random source. Decimals now works correctly with 'Allow Duplicates' off, and Gaussian mode reliably delivers the exact count requested even with duplicates off.
How to Use This Tool
Set Min and Max values, then Count (1 to 100 numbers per generation).
Set Min and Max values, then Count (1 to 100 numbers per generation).
Choose Uniform (every value in range equally likely) or Gaussian (bell-curve, values cluster near the midpoint) distribution.
Choose Uniform (every value in range equally likely) or Gaussian (bell-curve, values cluster near the midpoint) distribution.
Pro Tip
Both distributions now handle 'Allow Duplicates' off reliably, including with decimal values — pick whichever distribution matches your actual need (Uniform for fair draws, Gaussian for realistic clustered data) rather than avoiding either combination.
About This Tool
When to Use
- A middle school teacher, Bianca, generates a random number 1-30 each morning to pick which student presents their homework first.
- A raffle organizer, Tomasz, draws 5 unique non-repeating numbers between 1 and 500 to match against sold raffle ticket stubs at a fundraiser.
- A data analyst, Priya, uses Gaussian distribution with 'Allow Duplicates' off to generate a realistically clustered, guaranteed-unique synthetic dataset for testing a new statistics dashboard before real data loads.
Key Details
A random number generator produces one or more integers or decimals within a specified range — this tool offers two real, distinct distributions: Uniform, where every value in range has an equal chanc...
Worked example
Tomasz sets minimum to 1, maximum to 500, count to 5, distribution to Uniform, and turns Allow Duplicates off. The tool draws 5 guaranteed-unique integers via repeated crypto-random draws into a set until it fills — for example 87, 412, 3, 256, 199. He reads each number aloud and matches it against the ticket stub table, awarding prizes to whoever holds the corresponding stub. Had he instead set Decimals to 2 with Allow Duplicates still off, the tool now correctly returns 5 unique 2-decimal values (e.g. 213.47, 88.02) instead of silently rounding to whole numbers.
Interpreting your result
A Uniform result with 'Allow Duplicates' on is genuinely uniformly distributed across your full range — trust it for fair draws. A Gaussian result clusters near the midpoint of your range by design; don't expect it to look 'fair' the way Uniform does, that's the intended behavior of a bell curve. With 'Allow Duplicates' off, you'll get exactly the count you requested (up to the number of distinct values actually available in your range at your chosen decimal precision) in either distribution.
Random Number Generator FAQ
How random are the numbers generated?
This generator uses window.crypto.getRandomValues() — a cryptographically secure random number generator built into every modern browser. Unlike Math.random() (fast but not cryptographically secure), crypto.getRandomValues() produces truly unpredictable numbers. It also converts that value to your range by division rather than modulo, confirmed via code read — unlike some naive implementations, it doesn't introduce modulo bias, a genuine technical strength.
Can I generate multiple random numbers at once?
Yes — set Count to generate up to 100 random numbers in a single request (100 is the field's real maximum). Turn 'Allow Duplicates' off if you need guaranteed-unique values, like a raffle draw — this works correctly with either distribution and with decimal values, not just integers.
Can I pick a random number between 1 and 100?
Yes. Set minimum to 1 and maximum to 100 and click Generate. With Uniform distribution (the default), the result is a uniformly distributed random integer with equal probability for each value. Common use cases: 1–6 (die roll), 1–52 (card draw), 1–100 (percentile roll), 1–10 (rating scale).
Is this truly random or pseudo-random?
It is cryptographically secure pseudo-random, which for all practical purposes is indistinguishable from true random. True randomness requires a physical entropy source (radioactive decay, atmospheric noise). Browser crypto APIs gather hardware entropy from your OS — making them suitable for all practical randomness needs including security applications.
Can I use this as a dice roller?
Yes. Set range 1–6 for a standard die, or any range for polyhedral dice: 1–4 (d4), 1–8 (d8), 1–10 (d10), 1–12 (d12), 1–20 (d20) for tabletop games like D&D. Keep distribution set to Uniform (Gaussian would skew results toward the middle values, which isn't how real dice work) and set count to roll multiple dice simultaneously.
What's the difference between Uniform and Gaussian distribution?
Uniform gives every value in your range an equal chance — the right choice for dice rolls, raffles, and fair sampling. Gaussian (bell-curve) clusters results near the midpoint of your range using a genuine Box-Muller transform, useful for simulating realistic, naturally-varying data (like test scores or measurement noise) rather than fair random draws. Both distributions work correctly with 'Allow Duplicates' off and with any Decimals setting — the tool re-samples as needed until it delivers the exact count you asked for, up to the number of distinct values actually available in your range at your chosen precision.
Can Decimals and Allow Duplicates be used together reliably?
Yes. Turning 'Allow Duplicates' off no longer forces whole numbers — a nonzero Decimals setting is respected, and the uniqueness cap is computed from the real number of distinct values representable at that precision (e.g. roughly 900 distinct 2-decimal values between 1 and 10), not just the size of the integer range.
Master Your Entire Toolkit
Access 500+ specialized calculators and tools designed for precision. No sign-up required, 100% free.
Built and reviewed by the Toolzip Team