Written and maintained by CASRAI Editorial Board
Last updated
A histogram with a normal distribution curve puts a bell-shaped line over the bars so you can see how far your data depart from a normal shape. The overlay is only meaningful when the bars and the curve share a scale: either the bars are drawn as densities (total area 1) or the curve is multiplied by the sample size times the bin width. This guide shows that scaling, works one example by hand, and gives the Excel, R and Python versions.
What a histogram with a normal curve shows
A histogram summarises a single variable by splitting its range into equal-sized bins (classes) and plotting how many observations fall in each. The NIST/SEMATECH e-Handbook describes its purpose as graphically summarising the distribution of a univariate data set, and lists the questions it answers: where the data are located, how spread out they are, whether they are symmetric or skewed, whether there are outliers, and what kind of population distribution the data come from. For the general method, see CASRAI’s guide to histograms.
Adding a normal curve turns the last of those questions into a visual test. If the bars follow the curve closely, a normal model is a reasonable description of the data. If they do not, the pattern of the gap (lopsided, flat-topped, two humps) points to what is wrong.
Normal distribution on a histogram: the density formula and its symbols
The curve that is drawn is the normal probability density function. NIST gives it as:
f(x) = exp( -(x - μ)2 / (2σ2) ) / ( σ × √(2π) )
- x: a value on the horizontal axis of the histogram.
- μ (mu): the location parameter, the centre of the curve. When fitting to data, use the sample mean.
- σ (sigma): the scale parameter, the spread of the curve. When fitting to data, use the sample standard deviation (see the standard deviation guide).
- π: about 3.14159. The factor 1/(σ√(2π)) makes the area under the curve equal to 1.
Why the scale matters when you overlay the curve
The formula returns a density, not a count. A histogram of counts can reach 50 on its vertical axis while the density curve peaks near 0.027, so drawn together the curve looks flat. There are two consistent ways to fix this:
- Density histogram. Plot the bars as densities so the total bar area is one. In R this is
freq = FALSE, which the R documentation describes as plotting probability densities so that the histogram has a total area of one. Then draw the curve as is. - Count histogram. Keep the bars as counts and multiply the curve by n × w, where n is the number of observations and w is the bin width. The curve then gives the expected count per bin.
Worked example: histogram counts against a normal curve
Illustrative data set, constructed for this guide and not drawn from a real study. Suppose n = 200 scores, summarised by a mean of μ = 100 and a standard deviation of σ = 15, grouped into bins of width w = 10.
Step 1: height of the scaled curve at the centre. Density at x = 100: 1 / (15 × 2.5066) = 0.02660. Scaled to counts: 0.02660 × 200 × 10 = 53.19. The curve should peak at about 53 on a count axis.
Step 2: expected count in each bin. Convert each bin edge to a z-score, z = (edge − 100) / 15, find the normal cumulative probability Φ(z), subtract, and multiply by 200. For the 100–110 bin: z runs from 0 to 0.667, Φ(0.667) − Φ(0) = 0.7475 − 0.5 = 0.2475, and 0.2475 × 200 = 49.5. For the 70–80 bin: z runs from −2.000 to −1.333, 0.0912 − 0.0228 = 0.0685, and 0.0685 × 200 = 13.7.
| Bin | Observed count | Expected count (normal, μ = 100, σ = 15) | Observed − expected |
|---|---|---|---|
| 60–70 | 4 | 3.8 | +0.2 |
| 70–80 | 14 | 13.7 | +0.3 |
| 80–90 | 31 | 32.3 | −1.3 |
| 90–100 | 50 | 49.5 | +0.5 |
| 100–110 | 52 | 49.5 | +2.5 |
| 110–120 | 31 | 32.3 | −1.3 |
| 120–130 | 13 | 13.7 | −0.7 |
| 130–140 | 4 | 3.8 | +0.2 |
| 140–150 | 1 | 0.7 | +0.3 |
The observed counts sum to 200. Every bin is within 2.5 of its expected count, and the differences have no sign pattern, so the histogram looks like a normal histogram distribution. Expected counts below 60 and above 150 are each under one observation, so cutting the display there loses nothing.
Reading a histogram of a normal distribution
| What you see against the curve | What it suggests |
|---|---|
| Bars rise and fall symmetrically around the curve’s peak | A normal model is a reasonable description |
| One long tail, bars above the curve on one side and below on the other | Skewness; see left-skewed vs right-skewed |
| Two separate humps | Possibly two groups mixed together (two modes) |
| Isolated bars far from the rest | Possible outliers |
These readings follow the questions NIST lists for the histogram, including whether the data are symmetric or skewed and whether there are outliers. NIST does not set a numeric threshold for how close the bars must be, which is why a histogram is a screening tool and not a test.
Normal curve histogram: assumptions and common mistakes
- Mismatched scales. A count histogram with an unscaled density curve produces a flat line near zero. Use one of the two fixes above.
- Bin width changes the picture. The same data can look ragged with narrow bins and smooth with wide ones. Try more than one bin width before judging.
- Small samples. With few observations the bars are noisy even when the population is normal.
- Using the histogram as the only check. NIST describes the normal probability plot as a way to assess whether a data set is approximately normally distributed; points bending away from a straight line show departures such as skew or short and long tails. Pair the two views, and see assessing normality for formal tests.
- Assuming raw data must be normal. Many methods concern the sampling distribution of a mean, covered by the central limit theorem.
How to report a histogram and normal distribution (APA example)
State what the figure shows and give the summary statistics, then refer to the figure by number. For example: The distribution of scores was approximately symmetric and close to normal (M = 100, SD = 15, n = 200; see Figure 1). Figure 1 caption: Histogram of scores with a normal curve (M = 100, SD = 15) overlaid. Report the mean and standard deviation used to draw the curve. Check your own style manual for figure formatting details.
Histogram with normal curve in Excel, R and Python
Excel
Excel has no one-click overlay, so build the expected counts. With data in A2:A201, bin lower limits in C2:C10 and upper limits in D2:D10 (width 10), and the mean and standard deviation in F1 and F2 (=AVERAGE(A2:A201), =STDEV.S(A2:A201)):
Observed (E2): =COUNTIFS($A$2:$A$201,">="&C2,$A$2:$A$201,"<"&D2)
Expected (G2): =COUNT($A$2:$A$201)*(NORM.DIST(D2,$F$1,$F$2,TRUE)-NORM.DIST(C2,$F$1,$F$2,TRUE))
Fill both columns down, then chart E as columns and G as a line on the same axis.
R
hist(x, freq = FALSE)
curve(dnorm(x, mean(x), sd(x)), add = TRUE)
For a count histogram, plot the curve as n * binwidth * dnorm(...).
Python
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import norm
mu, sigma = x.mean(), x.std(ddof=1)
plt.hist(x, bins=9, density=True, edgecolor="black")
grid = np.linspace(x.min(), x.max(), 200)
plt.plot(grid, norm.pdf(grid, mu, sigma))
plt.show()
For software-specific menus, see CASRAI’s guides to histograms in R and histograms in SPSS.
FAQ
How do you put a normal distribution on a histogram?
Compute the mean and standard deviation of the data, then plot the normal density with those values over a histogram drawn as densities, or multiply the density by n times the bin width if the bars are counts.
Does a normal-looking histogram prove the data are normal?
No. A histogram is a visual screen. Confirm with a normal probability plot or a formal test.
Why does my normal curve look flat on the histogram?
The bars are counts and the curve is a density. Rescale one to match the other.
Which mean and standard deviation should the curve use?
The sample mean and sample standard deviation, so the curve is centred and spread like your data.
Sources
- NIST/SEMATECH e-Handbook of Statistical Methods, Histogram, checked 29 October 2026.
- NIST/SEMATECH e-Handbook, Normal distribution, checked 29 October 2026.
- NIST/SEMATECH e-Handbook, Normal probability plot, checked 29 October 2026.
- R Documentation, hist {graphics}, checked 29 October 2026.








