Error bars in scientific graphs: SD, SEM or 95% CI?
Bar graphs in papers usually show one of three error bars: the standard deviation (SD), the standard error of the mean (SEM) or the 95% confidence interval (CI). They describe completely different quantities, and on the same data their lengths can differ by a factor of two to five. Choose by what you want to show, and always state which one you used.
What each error bar shows
| Error bar | Describes | Question it answers | As n grows |
|---|---|---|---|
| SD (standard deviation) | Spread of the data | How scattered are individual values? | Stays about the same |
| SEM (standard error) | Precision of the mean | How certain is the mean? | Shrinks as 1/√n |
| 95% CI (confidence interval) | Plausible range for the population mean | Where is the true mean? | Shrinks (about like SEM) |
- SD to show variability; 95% CI to show how well the mean (or a difference) is estimated
- SEM looks short but is not the spread of the data. If you use it, write “mean ± SEM” in the legend
- With small n, show every data point rather than relying on error bars
- Do not judge significance from overlap. Report the test
The same data, three ways
Sample data: body weight of wild-type (WT) and knockout (KO) mice, 8 per group (made up).
| Group | n | Mean (g) | SD | SEM | 95% CI |
|---|---|---|---|---|---|
| WT | 8 | 24.70 | 0.86 | 0.30 | 23.98 to 25.42 |
| KO | 8 | 28.54 | 1.18 | 0.42 | 27.55 to 29.53 |
For WT, SD = 0.86 g, SEM = 0.86 / √8 = 0.30 g, and the half-width of the 95% CI is 2.365 × 0.305 = 0.72 g. On the same data, the SD bar is about 2.8 times (√8) as long as the SEM bar.
Which one to choose
To show variability: SD
SD shows the typical scatter of measurements. It suits data where the distribution of individual values matters, such as cell size, body weight or clinical values. If the distribution is skewed, mean ± SD can extend to impossible values (such as negative concentrations); individual points (or a box plot) are more accurate then. BenchFig can overlay individual points, or draw box plots and dots with median and IQR (“Graph type” on the graph screen).
To show an estimate of the mean or a difference: 95% CI
A CI gives a range for the true mean and connects directly to hypothesis testing. Reporting the 95% CI of the difference itself (here KO − WT = 3.84 g, 95% CI 2.73 to 4.95 g) conveys the size of the effect.
When SEM is used
SEM is an intermediate step toward the CI and is hard to interpret on its own. If your field uses SEM by convention, always give n and show individual points to avoid misreading.
Why overlap is not a significance test
How overlap relates to P depends on the type of bar, on n, and on whether the groups are independent. Cumming, Fidler and Vaux (2007, J Cell Biol 177:7–11) give rules of thumb for two independent groups with n of about 10 or more:
- 95% CI bars overlapping by about half of an average arm → P ≈ 0.05
- A gap between SEM bars of about one arm → P ≈ 0.05
So “SEM bars do not overlap” does not mean significant, and CI bars that overlap slightly can still be significant. With small n, repeated measures on the same subjects, or multiple comparisons among three or more groups, even these rules do not hold. Test differences with an appropriate test.
With small n, show every point
For n of about 3 to 10, bars and error bars hide the shape of the distribution and outliers. Overlaying individual points lets readers judge the spread themselves, and many journals ask for individual data points when n is small. For experiments repeated several times, a SuperPlot that colors each run is clearer still. To do this in Excel, see how to add SD error bars and data points in Excel.
Writing the legend
Always state the type of error bar and n in the figure legend.
Also make clear what n counts (animals, independent experiments or cells). Formats for test results are in How to report statistics.
FAQ
SEM bars are shorter and look cleaner. Is it wrong to use them?
Not wrong, but SEM describes the precision of the mean, not the spread of the data. Using SEM when you mean to show variability makes the data look less variable than it is. Choose by purpose and state it in the legend.
What should I use when n = 3?
With small n, showing every data point is the most honest option. A 95% CI uses t with 2 df (4.30), so it is more than four times the SEM. Show all points and overlay the mean with SD or a 95% CI.
If error bars do not overlap, is the difference significant?
No. You cannot read a P value from non-overlapping SD bars or overlapping SEM bars. There are rules of thumb (Cumming et al. 2007), but they hold only under specific conditions. Test the difference and report the result.
Can I compare paired data (before/after in the same subjects) with error bars?
Group error bars include between-subject variability, so they do not show the paired difference. Show the spread of the differences, or connect each subject’s values with a line.
Related guides
Product and journal names are trademarks or registered trademarks of their respective owners.