CalculatorsToolsGuides 日本語
BenchFig › Guides › Error bars in scientific graphs: SD, SEM or 95% CI?
Statistics

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.

Updated: BenchFig日本語

What each error bar shows

Error barDescribesQuestion it answersAs n grows
SD (standard deviation)Spread of the dataHow scattered are individual values?Stays about the same
SEM (standard error)Precision of the meanHow certain is the mean?Shrinks as 1/√n
95% CI (confidence interval)Plausible range for the population meanWhere is the true mean?Shrinks (about like SEM)
SD = s = √Σ (xi − x̄)²n − 1
SEM = s√n
95% CI = x̄ ± t0.975, n−1 × SEMt is the upper 2.5% point of the t distribution with n − 1 df: 4.30 for n = 3, 2.36 for n = 8, approaching 1.96 for large n.
Key points
  • 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).

95% CI = mean ± 2.365 × SEM (t with 7 df).
GroupnMean (g)SDSEM95% CI
WT824.700.860.3023.98 to 25.42
KO828.541.180.4227.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.

20222426283032WTKOBody weight (g)
SD
20222426283032WTKOBody weight (g)
SEM
20222426283032WTKOBody weight (g)
95% CI
The same data (n = 8 per group) with three kinds of error bar. SD is the longest, SEM is SD/√8, and the 95% CI is about 2.36 × SEM (t with 7 df). To make the bars easy to compare, this figure starts the y axis at 20 g (in a paper, bar graphs should start at 0).
Compare error bars yourselfChoose SD, SEM or 95% CI on sample data and overlay individual points on the bars. No sign-up.
Open for free →

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:

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.

Data are mean ± SD (n = 8 mice per group). Each dot represents one mouse.

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.

Switch error bars on sample dataIn the graph screen, choose SD, SEM or 95% CI under “Error bars” and the plot redraws instantly, with individual data points.
Open for free →
Your own data, all the way to the final figure.Loading your files, saving, and journal-ready export (PDF, TIFF, PNG, SVG) are in BenchFig Pro for Windows, updated based on researchers’ requests: ¥3,980/year (2 PCs), with lab and perpetual licenses too.
About the app →

Related guides

Product and journal names are trademarks or registered trademarks of their respective owners.