Gaussian Random Number Generator

Normally distributed random numbers for statistics

Ad placeholder (leaderboard)

Sample from a bell curve on demand

While most random tools give you uniform numbers, real-world quantities like measurement noise, heights, or returns tend to follow a normal (Gaussian) distribution. This generator produces values clustered around a mean you choose, with a spread set by the standard deviation — perfect for simulations, statistics lessons, and generating realistic-looking test data.

How it works

Uniform random numbers cannot be reshaped into a bell curve by simple scaling, so the tool uses the classic Box-Muller transform. It draws two independent uniform values U1 and U2 in the range (0, 1) and computes a standard normal value:

z = sqrt(-2 * ln(U1)) * cos(2 * pi * U2)

This z has mean 0 and standard deviation 1. Each sample is then shifted and scaled to your parameters with x = mean + stdDev * z. After generating the requested count of samples, the tool reports the sample mean, the sample standard deviation (using the unbiased n − 1 divisor), and the minimum and maximum so you can confirm the output matches the distribution you asked for.

Tips and notes

Generate a large sample, such as several hundred values, to see the sample mean and standard deviation closely match your inputs — small samples will wander more. About 68 percent of values should land within one standard deviation of the mean and roughly 95 percent within two, a quick sanity check you can perform on the output. These numbers rely on Math.random() and are suitable for modelling and testing, but not for cryptographic use.

Ad placeholder (rectangle)