The Standard Engine.
MathematicsFinanceHealthPhysicsEngineeringBrowse all

Mathematics · Probability & Statistics

Normal Distribution Calculator

Calculate the probability density, cumulative probability, and z-score for any normal distribution given a mean and standard deviation.

Calculator

Advertisement

Formula

f(x) is the probability density at point x; μ (mu) is the population mean; σ (sigma) is the population standard deviation; π is pi (≈ 3.14159); exp() is the natural exponential function. The z-score is computed as z = (x − μ) / σ, and the cumulative probability P(X ≤ x) is the integral of f from −∞ to x, approximated using the error function erf.

Source: Abramowitz, M. & Stegun, I. A. (1964). Handbook of Mathematical Functions. National Bureau of Standards. Formula 26.2.1.

How it works

The normal distribution, also called the Gaussian distribution or bell curve, is a continuous probability distribution that is symmetric about its mean. It is fully characterized by two parameters: the mean (μ), which determines the center of the distribution, and the standard deviation (σ), which controls the spread or width of the bell curve. Approximately 68% of data falls within one standard deviation of the mean, 95% within two, and 99.7% within three — a rule known as the empirical rule or 68-95-99.7 rule.

The probability density function (PDF) gives the relative likelihood that a continuous random variable X takes on a specific value x. Because X is continuous, the probability of any exact value is technically zero; instead, the PDF is used to find probabilities over intervals. The PDF peaks at x = μ and decreases symmetrically toward zero in both directions. The cumulative distribution function (CDF) gives P(X ≤ x), the probability that X is less than or equal to a given value. It ranges from 0 (as x → −∞) to 1 (as x → +∞) and is computed by integrating the PDF from −∞ to x. Because this integral has no closed form, it is evaluated using the error function (erf), which is a standard mathematical function available in most numerical libraries and approximated here using the highly accurate Horner's method polynomial from Abramowitz and Stegun.

The z-score (also called a standard score) measures how many standard deviations a value x lies above or below the mean: z = (x − μ) / σ. A z-score of 0 means x equals the mean; a z-score of +2 means x is two standard deviations above the mean. Z-scores allow direct comparison of values from different normal distributions by converting them to the standard normal distribution (μ = 0, σ = 1). Z-scores are foundational to hypothesis testing, p-value calculation, and the construction of confidence intervals across virtually every scientific discipline.

Worked example

Suppose IQ scores follow a normal distribution with mean μ = 100 and standard deviation σ = 15. We want to find the probability that a randomly selected person has an IQ of 115 or less, i.e., P(X ≤ 115).

Step 1 — Compute the z-score:
z = (x − μ) / σ = (115 − 100) / 15 = 1.0000

Step 2 — Compute the PDF at x = 115:
f(115) = [1 / (15 × √(2π))] × exp(−0.5 × 1.0²)
= [1 / (15 × 2.50663)] × exp(−0.5)
= [1 / 37.5994] × 0.60653
= 0.021628

Step 3 — Compute the CDF at x = 115:
P(X ≤ 115) = Φ(z) = Φ(1.0) ≈ 0.8413

Interpretation: Approximately 84.13% of individuals have an IQ of 115 or below. In other words, a person with an IQ of 115 scores higher than roughly 84 out of every 100 people. The PDF value of 0.021628 tells us the relative density of the distribution at exactly x = 115, which is useful for comparing likelihoods across different points on the curve.

Limitations & notes

The normal distribution is a theoretical model and not all real-world data conforms to it. Data with significant skewness (asymmetry) or heavy tails (excess kurtosis) — such as income distributions, asset price returns, or extreme weather events — are poorly described by a normal distribution and may require log-normal, Student's t, or other distributions instead. The CDF computed here uses the Abramowitz and Stegun polynomial approximation, which has a maximum absolute error of approximately 1.5 × 10⁻⁷ — more than sufficient for practical work but not suitable for ultra-high-precision scientific computing. Additionally, the standard deviation σ must be strictly positive; a value of zero is undefined and physically meaningless because the distribution degenerates to a point mass (Dirac delta). When sample sizes are small (typically n < 30), the sample mean and standard deviation are estimates with their own uncertainty, and the Student's t-distribution should be used instead of the normal distribution for inferential statistics.

Frequently asked questions

What is the difference between the PDF and the CDF of a normal distribution?

The probability density function (PDF) gives the relative likelihood of the random variable taking a specific value — it describes the shape of the bell curve and its height at any point x. The cumulative distribution function (CDF) gives the total probability that the variable is less than or equal to x, ranging from 0 to 1 — it is the integral (area under the curve) of the PDF from negative infinity up to x. In practice, you use the CDF to answer questions like 'what percentage of values fall below 115?' and the PDF to compare relative likelihoods at different points.

What is a z-score and why is it useful?

A z-score standardizes a raw data value by expressing it as the number of standard deviations it lies from the mean: z = (x − μ) / σ. This is useful because it allows you to compare observations from different normal distributions on a common scale — for example, comparing a score from an exam graded out of 50 with one graded out of 100. Z-scores also map directly to probabilities via the standard normal distribution, making them central to hypothesis testing, p-value computation, and the identification of outliers.

What does the 68-95-99.7 rule mean?

The empirical rule states that for any normal distribution, approximately 68.27% of values fall within one standard deviation of the mean (μ ± 1σ), about 95.45% fall within two standard deviations (μ ± 2σ), and about 99.73% fall within three standard deviations (μ ± 3σ). This rule is a quick mental model for gauging the spread of normally distributed data without computing exact probabilities. Values beyond three standard deviations from the mean are statistically rare (about 1 in 370) and are often flagged as potential outliers.

Can I use this calculator for a standard normal distribution?

Yes — simply set the mean (μ) to 0 and the standard deviation (σ) to 1. The resulting distribution is the standard normal distribution, denoted N(0, 1), which is the reference distribution used in most statistical tables. In this case, the z-score output will equal the x-value you enter, and the CDF output will give you the classic Φ(z) values found in standard normal probability tables used in textbooks and exams.

How do I find the probability that X falls between two values, say a and b?

To find P(a ≤ X ≤ b), compute the CDF at both values separately using this calculator and then subtract: P(a ≤ X ≤ b) = P(X ≤ b) − P(X ≤ a). For example, if P(X ≤ 120) = 0.9088 and P(X ≤ 100) = 0.5000 for an IQ distribution with μ = 100, σ = 15, then P(100 ≤ X ≤ 120) = 0.9088 − 0.5000 = 0.4088, meaning about 40.88% of people have IQs between 100 and 120.

Last updated: 2025-01-15 · Formula verified against primary sources.