Random number generator

Pick random numbers in any range, draw without repeats, or sample from statistical distributions. The histogram shows what you actually got.

Quick ranges: 1–101–501–1001–1000

Distribution
…

Why add up random numbers and get a bell curve?

Roll one die and every face is equally likely: a flat, uniform distribution. Add two dice and 7 turns up six times as often as 2, because six combinations make 7 and only one makes 2. Add more dice and the shape closes in on the normal distribution. That’s the central limit theorem, and it’s why heights, measurement errors and exam scores so often form a bell.

1Sum of 1 die6
0 rolls

The normal option in the generator above uses the Box–Muller transform, which turns two uniform random numbers straight into a normally distributed one without summing anything.

Choosing a distribution

DistributionModelsTypical test use
UniformEvery value equally likelyIDs, dice, picks, random sampling
NormalValues clustered around a meanHeights, response times with jitter, sensor noise
ExponentialTime between independent eventsRequest inter-arrival times for load tests
PoissonNumber of events in a fixed intervalOrders per minute, errors per hour
BinomialSuccesses in n yes/no trialsConversions out of visitors, pass/fail counts

For a normal distribution, about 68% of values fall within one standard deviation of the mean and 95% within two. Generate 10,000 values and the sample statistics will come out close to the parameters you set.

Questions people ask

Is this random number generator truly random?

It uses crypto.getRandomValues, a cryptographically secure pseudo-random generator seeded by your operating system’s entropy (hardware events, timing jitter and, on modern CPUs, instructions like RDRAND). Its output can’t be told apart from true randomness, and integers are drawn with rejection sampling so every value in your range is exactly equally likely.

How do I generate random numbers without repeats?

Tick “No repeats”. The generator then draws distinct values, like pulling numbered balls from a bag, which is what you need for raffles, lottery-style picks and sampling without replacement.

What distributions are supported?

Uniform integers and decimals, normal (Gaussian) with any mean and standard deviation, exponential (waiting times), Poisson (counts of events per interval) and binomial (successes in n trials). The histogram and sample statistics let you check the output matches the parameters.

Can I use it for a giveaway or raffle?

Yes. Number your entries, set the range to match, choose how many winners, and tick “No repeats”. For names rather than numbers, the list randomizer picks winners straight from a pasted list.

What is the largest range allowed?

Integers up to ±9 quadrillion (2^53), the largest whole numbers JavaScript represents exactly, and up to 10,000 results per click.

Related generators