normalpdf(x, μ, σ) returns the density, normalcdf(lower, upper, μ, σ) the probability between two values and invnorm(p, μ, σ) the value for a given probability, in the same order as a TI-84.Jump to: the formulas, PDF vs CDF, z-scores, the 68-95-99.7 rule, a worked example, calculator syntax, binomial, Poisson or summary statistics. To get an answer straight away, enter your mean, standard deviation and value in the normal distribution calculator; it shows the z-score, the shaded area and every step.
What is the normal distribution function?
The normal distribution, also called the Gaussian distribution, describes a continuous quantity whose values cluster around a mean and thin out symmetrically on both sides: heights, measurement errors and many test scores follow it closely. Two numbers fix the curve completely. The mean μ sets where the peak sits, and the standard deviation σ sets how wide the bell is. About two-thirds of the area lies within one standard deviation of the mean.
- x
- The value at which the curve is evaluated.
- μ (mu)
- The mean, which is also the median and the mode, because the curve is symmetric.
- σ (sigma)
- The standard deviation, greater than 0. The variance is σ².
- e and π
- The constants 2.718281828… and 3.141592654…
The density f(x) is the height of the curve, not a probability. For a continuous variable the probability of any single exact value is 0; probabilities are areas under the curve. The area to the left of x is the cumulative distribution function F(x), and the whole area is exactly 1.
The CDF has no formula in elementary functions, which is why printed z-tables exist. Calculators evaluate it through the error function, and so does this one: 0.5(1 + erf(1.5/sqrt(2))) and normalcdf(-inf, 1.5) both give 0.9331927987.
Normal distribution PDF vs CDF vs inverse CDF
Most mix-ups come from using the wrong one of three related functions. Each answers a different question about the same curve:
| Function | Question it answers | ScientifiCalc and TI-84 | Example |
|---|---|---|---|
| PDF, f(x) | How high is the curve at x? | normalpdf(x, μ, σ) | normalpdf(85, 70, 10) = 0.01295175957 |
| CDF, F(x) | What fraction of values is at or below x? | normalcdf(-inf, x, μ, σ) | normalcdf(-inf, 85, 70, 10) = 0.9331927987 |
| Inverse CDF, F⁻¹(p) | Which value has a fraction p of values below it? | invnorm(p, μ, σ) | invnorm(0.9, 70, 10) = 82.81551566 |
A probability question ("what share scores above 85?") needs the CDF. A cutoff question ("what score is the 90th percentile?") needs the inverse CDF. The PDF on its own is mainly for drawing the curve and for likelihood calculations. In Excel and Google Sheets the same three functions are NORM.DIST(x, μ, σ, FALSE), NORM.DIST(x, μ, σ, TRUE) and NORM.INV(p, μ, σ).
Standard normal distribution and z-scores
The standard normal distribution is the special case μ = 0 and σ = 1, usually written Z. Any normal value converts to it with the z-score, the number of standard deviations the value lies from the mean:
A score of 85 with μ = 70 and σ = 10 has z = 1.5, so P(X ≤ 85) = Φ(1.5). The table below gives Φ(z) for the values used most often; the z-score and normal distribution calculator prints the full z-table from 0.00 to 3.09.
| z | Φ(z) | Where it is used | Type |
|---|---|---|---|
| 0 | 0.5 | The mean splits the area in half | normalcdf(-inf, 0) |
| 1 | 0.8413447461 | One standard deviation above the mean | normalcdf(-inf, 1) |
| 1.645 | 0.9500150945 | One-sided 95% and two-sided 90% critical value | normalcdf(-inf, 1.645) |
| 1.96 | 0.9750021049 | Two-sided 95% confidence intervals | normalcdf(-inf, 1.96) |
| 2 | 0.9772498681 | Two standard deviations above the mean | normalcdf(-inf, 2) |
| 2.576 | 0.9950024677 | Two-sided 99% confidence intervals | normalcdf(-inf, 2.576) |
| 3 | 0.998650102 | Three standard deviations above the mean | normalcdf(-inf, 3) |
For negative z, use the symmetry of the curve: Φ(−z) = 1 − Φ(z), so Φ(−1) = 0.1586552539.
The 68-95-99.7 rule
The empirical rule summarizes the normal distribution function in three numbers: about 68% of values lie within one standard deviation of the mean, about 95% within two and about 99.7% within three. The exact areas come straight from the CDF:
| Range | Inside | Outside (both tails) | Type |
|---|---|---|---|
| μ ± 1σ | 0.6826894921 (68.27%) | 0.3173105079 | normalcdf(-1, 1) |
| μ ± 2σ | 0.9544997361 (95.45%) | 0.0455002639 | normalcdf(-2, 2) |
| μ ± 3σ | 0.9973002039 (99.73%) | 0.002699796063 | normalcdf(-3, 3) |
The rule never reaches 100%, because the normal curve approaches zero without ever touching it: some area always remains beyond any finite distance from the mean. Note also that 95% corresponds to ±1.96σ, not ±2σ, which is why confidence intervals use 1.96.
Worked example: exam scores
Exam scores are normally distributed with mean μ = 70 and standard deviation σ = 10. Find the height of the curve at 85, the share of students scoring 85 or less, the share scoring above 85 and the 90th percentile.
Standardize
z = (85 − 70) / 10 = 1.5, so 85 is one and a half standard deviations above the mean.
Evaluate the PDF
The front factor is = 0.03989422804 and the exponential is = 0.3246524674. Their product is f(85) = 0.01295175957, which
normalpdf(85, 70, 10)confirms.Evaluate the CDF
P(X ≤ 85) = Φ(1.5) = 0.9331927987. About 93.3% of students score 85 or less:
normalcdf(-inf, 85, 70, 10).Take the complement
P(X > 85) = 1 − 0.9331927987 = 0.06680720127, about 6.7%:
normalcdf(85, inf, 70, 10).Invert for the percentile
The 90th percentile is
invnorm(0.9, 70, 10)= 82.81551566. Check: z = 1.281551566, and 70 + 1.281551566 × 10 = 82.81551566.
The calculator below opens on the same example. Change the mean, the standard deviation or the question to see the z-score, the shaded area and each step of the working.
Result
P(X > 85)
0.06680720127
6.6807201%
- z-score (x − μ)/σ
- 1.5
- As a percentage
- 6.6807201%
- Complement P(X < 85)
- 0.9331927987
- Density f(85)Height of the curve at x (not a probability)
- 0.01295175957
- How often
- About 1 in 15
6.68072% of values from this distribution are above 85. The value 85 is 1.5 standard deviations above the mean.
For a continuous distribution, P(X < x) and P(X ≤ x) are equal: the probability of any single exact value is 0.
Step-by-step working (2 steps)
Standardize
Convert x to a z-score: how many standard deviations it lies from the mean.
Area to the right
By symmetry the right tail equals Φ(−z), which keeps full precision for small tails.
This is the z-score and normal distribution calculator, started with this page’s next example. Its own page adds more presets, the formulas and worked examples.
normalpdf, normalcdf and invnorm on the calculator
In the scientific calculator, the three normal distribution functions take the mean and standard deviation as optional last arguments. Leave them out for the standard normal.
| Function | Gives |
|---|---|
normalpdf(x, μ, σ) | The probability density at x (the height of the bell curve). |
normalcdf(lower, upper, μ, σ) | The probability of a value between lower and upper. Use -inf or inf for an open bound. |
invnorm(p, μ, σ) | The value with a left-tail area of p (the inverse of the cumulative distribution). |
| Question | Type | Result |
|---|---|---|
| Area within 1.96 standard deviations | normalcdf(-1.96, 1.96) | 0.9500042097 |
| P(Z < 1.5) | normalcdf(-inf, 1.5) | 0.9331927987 |
| Exam scores with μ = 70, σ = 10: P(60 < X < 80) | normalcdf(60, 80, 70, 10) | 0.6826894921 |
| Critical value for a 95% two-sided interval | invnorm(0.975) | 1.959963985 |
| 90th percentile when μ = 100, σ = 15 | invnorm(0.9, 100, 15) | 119.2232735 |
| Peak height of the standard normal curve | normalpdf(0) | 0.3989422804 |
invnorm always works from the left tail. For a right-tail area p, use invnorm(1 - p, μ, σ); for the middle 95%, the bounds are invnorm(0.025, μ, σ) and invnorm(0.975, μ, σ).
When the normal distribution applies
The central limit theorem explains why the normal curve turns up so often: the sum or mean of many independent random effects is approximately normal, whatever the shape of each effect. That makes the normal distribution a good model for sample means and measurement errors, and the basis of z-tests and confidence intervals.
It is a poor model for data that are bounded at zero and skewed, such as incomes, waiting times or reaction times, and for counts. Check a histogram before relying on it. Skewed positive data are often closer to normal after taking logarithms, and counts follow the two other probability distribution functions below, binomial and Poisson.
Binomial distribution function
binompdf(n, p, k) is the probability of exactly k successes in n independent trials, each with success probability p. binomcdf(n, p, k) is the probability of at most k successes. The mean is np and the standard deviation is √(np(1 − p)). Other questions follow from these two functions:
| Question | Type | Result |
|---|---|---|
| P(X = 6) | binompdf(20, 0.3, 6) | 0.1916389828 |
| P(X ≤ 6) | binomcdf(20, 0.3, 6) | 0.6080098122 |
| P(X ≥ 7), that is 1 − P(X ≤ 6) | 1 - binomcdf(20, 0.3, 6) | 0.3919901878 |
In the same way, P(X < k) is binomcdf(n, p, k - 1), and P(a ≤ X ≤ b) is binomcdf(n, p, b) - binomcdf(n, p, a - 1). The binomial distribution calculator answers the same questions through a form and draws the bar chart.
Poisson distribution function
poissonpdf(λ, k) is the probability of exactly k events when the average number of events is λ, and poissoncdf(λ, k) the probability of at most k. If a help desk receives on average 4 calls an hour, the chance of no calls in an hour is poissonpdf(4, 0) = 0.01831563889, the chance of at most 6 calls is poissoncdf(4, 6) = 0.8893260216, and the chance of more than 6 is 1 - poissoncdf(4, 6) = 0.1106739784. The Poisson distribution calculator shows the same results with the formula.
Summary statistics functions
The mean and standard deviation that a normal model needs can be computed in the same calculator. List the values as arguments separated by commas (or by semicolons when the decimal separator is set to comma). The table uses the data set 12, 15, 11, 18, 14.
| Function | Computes | Result |
|---|---|---|
mean(…) | Arithmetic mean (aliases avg, average) | 14 |
median(…) | Middle value after sorting | 14 |
stdev(…) | Sample standard deviation, dividing by n − 1 | 2.738612788 |
stdevp(…) | Population standard deviation, dividing by n | 2.449489743 |
variance(…) | Sample variance, dividing by n − 1 | 7.5 |
variancep(…) | Population variance, dividing by n | 6 |
min(…) and max(…) | Smallest and largest value | 11 and 18 |
total(…) | Sum of the values | 70 |
The sample versions need at least two values. Functions can be combined: the z-score of 18 in this data set is (18 - mean(12, 15, 11, 18, 14)) / stdev(12, 15, 11, 18, 14) = 1.460593487. To avoid typing a long list twice, use a custom function or store results in variables.
Sample or population?
Use the sample functions (stdev, variance) when your numbers are a sample drawn from a larger group and you want to estimate the spread of that group. Dividing by n − 1 instead of n corrects the tendency of a sample to underestimate the spread. Use the population functions (stdevp, variancep) only when the data include every member of the group you are describing, such as the scores of everyone in one class.
Dedicated statistics calculators
For more than a handful of values, the statistics calculator and the standard deviation calculator take a whole data set at once and explain the formulas behind each result. Paste or type the values separated by commas, spaces, semicolons or line breaks; a column copied from a spreadsheet works as it is. Use a decimal point in data lists, because commas separate values there, and leave out thousands separators. For paired data, the regression calculator finds the line of best fit.
Accuracy
The distribution functions are built on special functions (the error function, the incomplete gamma and beta functions) computed to about 14 significant digits, and invnorm is refined with Halley’s method against the exact cumulative distribution. Results are shown to 10 significant digits. The methodology page lists every method.