Random Gaussian Number Generator – Normally Distributed Values
A Gaussian random number generator produces values that cluster around a chosen center point rather than spreading evenly across a range. This "bell curve" shape — technically called the normal distribution — describes an enormous range of real-world phenomena, from human heights and exam scores to measurement noise and manufacturing tolerances. Statisticians, data scientists, game developers, and students all rely on normally distributed random data to simulate realistic datasets, seed Monte Carlo experiments, or demonstrate concepts like the Central Limit Theorem in a classroom setting.
How the Generator Works
This tool uses the Box-Muller transform, a classic method for converting pairs of uniformly distributed random numbers into normally distributed ones. Given two independent uniform values u1 and u2 in (0, 1), the transform computes:
z0 = sqrt(-2 · ln(u1)) · cos(2π · u2)
The result z0 is a standard-normal value (mean 0, standard deviation 1), which is then scaled and shifted using your chosen mean (μ) and standard deviation (σ): x = μ + z0 × σ. Every calculation runs locally in your browser — no data is ever sent to a server.
Mean, Standard Deviation, and the 68-95-99.7 Rule
The mean (μ) sets the center of the distribution, and the standard deviation (σ) controls how spread out the values are. For any normal distribution, roughly 68% of values fall within one standard deviation of the mean, 95% within two standard deviations, and 99.7% within three — the well-known empirical rule. A larger σ produces a wider, flatter curve; a smaller σ produces values tightly clustered near μ.
Bounded (Truncated) Generation
Setting a minimum and/or maximum bound switches the tool into truncated normal mode: any generated value outside your range is discarded and re-drawn using rejection sampling, so the final sample only ever contains values inside [min, max]. This is useful when you need normally distributed data that must also respect a hard physical or logical limit, such as test scores between 0 and 100.
Integer Output and Precision
Turn on Integer only to round every generated value to the nearest whole number — ideal for simulating discrete data like dice-like scores or headcounts. Otherwise, use the precision setting (0 to 10 decimal places) to control how many digits appear after the decimal point.
Reproducible Results with a Seed
Entering a seed switches the generator to a deterministic mode powered by a seeded pseudo-random algorithm (mulberry32). The same seed, mean, standard deviation, and count will always reproduce the exact same sequence of values, which is invaluable for automated testing, teaching, or sharing a repeatable example. Leave the seed blank for a fresh, unpredictable sample every time you click Generate.
Sample Statistics and Visualization
After generating values, the tool reports the sample mean, sample standard deviation, minimum, and maximum of the actual output, so you can compare them against your requested μ and σ. A histogram overlays the observed frequency of your sample against the theoretical bell curve, making it easy to see how closely a particular batch matches the underlying distribution — and how much random variation to expect with smaller sample sizes.
Export and Reuse
Copy the generated values to your clipboard in comma-separated, newline-separated, or JSON array format, or download the full batch as a .txt or .csv file for use in a spreadsheet, simulation, or analysis pipeline.