Truncated Normal Generator & Visualizer

Generate bounded normal (truncated Gaussian) samples with lower/upper limits, then visualize histogram + PDF/CDF.

Everything runs in your browser; nothing is uploaded. Share URLs contain settings only (no generated samples).

Secure mode uses CSPRNG. Seeded mode is for reproducibility, not secrecy.

Other languages 日本語 | English | Español | Français

What is a truncated normal?

A truncated normal is a normal distribution conditioned to stay within bounds such as a≤X≤b. It is also known as a bounded normal or truncated Gaussian.

How it works: it uses the inverse CDF method (sample a uniform random number and map it through the truncated CDF). This avoids rejection-sampling slowdowns when truncation is extreme.

Use this tool as a learning reference for high-stakes domains (medical/financial/legal), and verify final decisions with qualified sources. You don’t need to enter personal information.

Presets

Pick a practical preset (you can tweak values after applying). It regenerates instantly.

Tip: presets are meant as starting points.

Generator

Set μ/σ and bounds, then generate samples and export results.

Sample stats

Samples (first 20)


      

How to use this tool

Use this page when a normal model is useful but values outside a lower or upper bound are impossible. For broader distribution browsing open the Distributions hub, use Distribution sampler for side-by-side models, and switch to Normal distribution calculator when you need untruncated CDF or quantile work.

Use in 3 steps

  1. Set the original normal mean and standard deviation, then define the lower and upper truncation bounds.
  2. Generate a sample and compare the histogram with the theoretical truncated mean, variance, and retained mass.
  3. Move one bound at a time to see whether the change comes from stronger truncation or from the original normal parameters.

How to read the result

The displayed mean and variance belong to the truncated distribution, not the original unconstrained normal. The retained-mass term shows how much of the original distribution survives between the two bounds.

Boundary checks

Frequently asked questions

Why does the mean move after truncation?
Removing mass below or above the bounds changes the balance of the remaining distribution, so the truncated mean shifts.
What does retained mass or Z mean?
It is the probability that the original normal falls between the two bounds before renormalization.
Why is this different from clipping values?
Clipping forces out-of-range values onto the bounds, while truncation removes them and renormalizes the remaining density.
Why might another calculator disagree?
Different parameter conventions, finite precision, or treating clipping as truncation can change the reported result.
What should I do first on this page?
Start with wide bounds, then tighten one side so you can see when truncation becomes the main driver of the output.