DevTools Logo

Gaussian Random Number Generator

Gaussian Random Number Generator

Generate seeded normal, lognormal, uniform, exponential or Pareto samples with a live histogram and CSV export.

Runs in your browserSeeded & reproducible
Try an example

Sample settings

10,000 values

σ must be > 0

Same seed, distribution and parameters reproduce the same series; growing N extends the prefix.

Overrides auto-clip when both bounds are set

Cosine-only Box–Muller, mulberry32 seeded by xmur3. Seeded PRNG output — not cryptographically secure; never use it for keys or tokens.

Generated sample

No sample generated yet.

No sample generated yet

Choose a distribution, set N and a seed, then press Generate.

CSV has a value header and one row per value. Export builds the file on click.

The orange curve is the theoretical density; bars are normalized to the same scale.

Examples

Normally distributed test fixture

Set μ=100, σ=15, N=10,000 and seed demo-42, then export a CSV with the index column for a reproducible test-data fixture.

Model API latency

Choose Lognormal with μ=0 and σ=0.5 to generate positive, right-skewed response times; the displayed mean is exp(μ + σ²/2).

Simulate queue arrivals or heavy tails

Use Exponential λ=0.5 for Poisson-process inter-arrival times, or Pareto α=4 with log-scale histogram and auto-clip to inspect a heavy tail.

About this tool

The Gaussian Random Number Generator produces parameterized sample series directly in your browser — no scripts, spreadsheets or server round-trips. Pick from five distributions: normal (Gaussian) with mean μ and standard deviation σ, lognormal for latency-style positive skew, uniform between bounds a and b, exponential for inter-arrival times with rate λ, and Pareto for heavy tails with scale x_m and shape α.

Normal samples use cosine-only Box–Muller on a mulberry32 PRNG seeded by an xmur3 string hash. Two uniforms produce one output, so the same seed, distribution and parameters reproduce the exact same series — and increasing N extends the prefix. Leave the seed blank for fresh entropy from your browser; the derived seed is shown so the run can be reproduced later. This is a seeded PRNG, not a cryptographic random source: never use its output for keys, tokens or security decisions.

Set N from 10 to 1,000,000, choose 10–200 histogram bins and compare the bars with the theoretical density curve. The output tab reports count, mean, population standard deviation, min, max and p50/p90/p99 percentiles, plus warnings when a distribution has infinite theoretical moments or a tail dominates. Auto-clip the x-axis for heavy tails, switch the y-axis to log scale to see zero-count bins, and click any bar to inspect its range and count. Export the whole series as a CSV with a value header, an optional index column and 2–8 decimal places, or copy the first 1,000 values for a test fixture.

Typical uses include normally distributed test fixtures (μ=100, σ=15), modeling response times with a lognormal series, simulating queue arrivals with exponential inter-arrival times, and demonstrating heavy tails with Pareto samples. For uniform integer draws and raffles use the Random Number & Raffle Picker instead; for splitting exported series into chunks use Text Chunker. Everything runs locally: no input, seed or generated data is uploaded.

What this tool does not do

  • Processes only the inputs provided in this session without connecting to external accounts or background servers.
  • Runs entirely in the current browser tab; nothing is synced across devices or backed up to a server.

How to use this tool

  1. Select distribution and parameters

    Pick Normal, Lognormal, Uniform, Exponential, or Pareto and set μ/σ/λ bounds.

  2. Set sample count N and seed

    Generate 10 to 1,000,000 reproducible samples and tune histogram bin count.

  3. Inspect percentiles and export CSV

    Compare sample vs theoretical density, check p50/p90/p99, and download CSV.

Use cases

Normally distributed test fixture

Set μ=100, σ=15, N=10,000 and seed demo-42, then export a CSV with the index column for a reproducible test-data fixture.

Model API latency

Choose Lognormal with μ=0 and σ=0.5 to generate positive, right-skewed response times; the displayed mean is exp(μ + σ²/2).

Simulate queue arrivals or heavy tails

Use Exponential λ=0.5 for Poisson-process inter-arrival times, or Pareto α=4 with log-scale histogram and auto-clip to inspect a heavy tail.

Common mistakes

Mistake:Why does lognormal take underlying μ and σ parameters?

Fix:If Z ~ Normal(μ, σ), then X = exp(Z) follows a lognormal distribution whose arithmetic mean is exp(μ + σ²/2), ideal for modeling right-skewed API latencies.

Mistake:Can I reproduce a 100,000-row CSV fixture later?

Fix:Yes. Recording the seed string, distribution, and parameters reproduces the exact numerical sequence bit-for-bit.

Frequently asked questions

How are normal (Gaussian) samples generated?

Uniform draws from a seeded mulberry32 PRNG are transformed via the Box–Muller transform and scaled to your target mean μ and standard deviation σ.

Why does lognormal take underlying μ and σ parameters?

If Z ~ Normal(μ, σ), then X = exp(Z) follows a lognormal distribution whose arithmetic mean is exp(μ + σ²/2), ideal for modeling right-skewed API latencies.

Can I reproduce a 100,000-row CSV fixture later?

Yes. Recording the seed string, distribution, and parameters reproduces the exact numerical sequence bit-for-bit.

Should I use these numbers for cryptographic keys or passwords?

Never. Seeded statistical PRNGs are designed for simulation and test fixtures, not security—use Web Crypto tools for secrets.