Skip to content

Error Bar Generator

Summarise each group of replicates (mean, SD, SEM, median, IQR and a confidence interval) and draw a bar chart with the error bars you choose.

Step 1: Add your replicates

Try an example:
Which error bar to use?
  • SD: how widely the replicates scatter.
  • SEM: how precisely the mean is estimated.
  • 95% CI: a range built so that 95% of such intervals contain the true mean. Comparing intervals by eye is only a rough guide: two that do not overlap point to a difference, but two that overlap can still differ. The pairwise table under the statistics gives the test.

Step 2: Plot

Error bars
Each mean as
Labelled with

The chart appears here

Each group's mean with SD, SEM or confidence-interval error bars, its replicates, and brackets over the pairs that differ. Add replicates in step 1, or try an example.

Step 3: Statistics per group

Label N Mean SD SEM Median IQR CV Min/Max t* 95% CI (±)
N, mean, SD, SEM, median, IQR, CV and the confidence interval for each group appear here.
Formulas used
How-to guide

How to compute error bars

Paste replicate measurements (or upload a CSV) with one group per row, and get the mean, SD, SEM, median, IQR and a Student-t confidence interval per group, plus a publication-ready chart with brackets over the groups that differ, and the Python script that draws it.

1

Arrange your data

One group per row: a text label in the first column, then its replicate measurements across the remaining columns. Or pick one of the examples under the box (Basic, Overlapping CIs, Many groups and more).

2

Set options

Leave First row is a header on Auto-detect (it figures out whether your top row names the columns), then choose a confidence level (90/95/99%) and the number of decimals.

3

Calculate & plot

Press Calculate statistics for the full stats table and the chart. Switch the error bars between SD, SEM and CI, draw each mean as a bar or a point, and choose which pairs get a significance bracket.

4

Style & export

Press Style to set the size, fonts, colours and axes, then save the chart as PDF, PNG or SVG. Copy the Python script, which recomputes the statistics and tests and draws the same figure with matplotlib, or download the table as CSV, where the CI column is the ± half-width (t* × SEM) at the confidence level you chose.

How the calculation works

Per-group pooling

Each row's numeric values are pooled as replicates of that group. A cell that is not a number is left out, and a note under the data counts such cells and shows one; write decimals with a point, since 6,1 is not read. Statistics use the sample standard deviation (dividing by n−1), matching how experimental replicates are normally summarised.

Student-t intervals

Confidence intervals use the two-tailed Student-t critical value with n−1 degrees of freedom, appropriate for the small samples typical in the lab, and wider (more honest) than a normal-approximation interval.

Significance brackets

Every pair of groups is compared with Welch’s t-test, which does not assume equal variances, and the p-values are adjusted for the number of pairs by Holm’s method. A bracket marks each pair whose adjusted p is below α = 1 − the confidence level you chose: 0.05 at 95%, 0.10 at 90%, 0.01 at 99%. The stars keep their usual meaning at every level: * for p < 0.05, ** for p < 0.01, *** for p < 0.001.

The same figure in Python

The Python script holds your replicates, recomputes every number above with numpy and scipy, prints them, and draws the chart as the page shows it, brackets included, with matplotlib.

Choose deliberately: SD shows the scatter of the raw data, SEM shows how precisely the mean is estimated, and the CI indicates where the true mean plausibly lies. SEM is always smaller than SD and should never be used to imply low variability.
Method and equations

The statistics behind the error bars

For each group the tool pools the replicate values and computes the mean, the sample standard deviation, the standard error of the mean, and a Student-t confidence interval.

Mean of n replicates:

\bar{x}=\frac{1}{n}\sum_{i=1}^{n}{x}_{i}

Sample standard deviation (Bessel-corrected, dividing by n-1):

s=\sqrt{\frac{\sum_{i=1}^{n}{({x}_{i}-\bar{x})}^{2}}{n-1}}

Standard error of the mean:

\mathrm{SE}=\frac{s}{\sqrt{n}}

Confidence interval (default 95%; selectable 90/95/99%):

\text{CI}=\bar{x}\pm{t}_{α/2,\,n-1}\cdot\mathrm{SE}

where \bar{x} is the group mean, s the sample standard deviation, \mathrm{SE} the standard error, and {t}_{α/2,n-1} the two-tailed Student-t critical value with n-1 degrees of freedom. Groups with n=1 have no SD, SEM or CI, since one value cannot estimate spread: the table shows a dash, the plot draws no error bar and the CSV leaves those cells blank. Use SD to show data scatter, SEM for the precision of the mean, and the CI for inference about the true mean.

Robust spread statistics (reported alongside the mean-based measures):

The median (\tilde{x}) is the middle value once sorted, unlike the mean, it is unaffected by a single extreme replicate. The interquartile range, \mathrm{IQR}={Q}_{3}-{Q}_{1}, measures the spread of the central 50% of the data (quartiles computed by linear interpolation). The coefficient of variation, \mathrm{CV}=\frac{s}{|\bar{x}|}\times100\%, expresses variability relative to the mean, letting you compare scatter across groups measured on different scales. The min/max give the raw range of replicates. Together these let you check whether a group's mean-based error bars might be distorted by skew or outliers, if the mean and median diverge sharply, prefer the robust measures.

Welch’s t-test between groups a and b, for the significance brackets:

t=\frac{\bar{x}_a-\bar{x}_b}{\sqrt{s_a^2/n_a+s_b^2/n_b}},\qquad \nu=\frac{\left(s_a^2/n_a+s_b^2/n_b\right)^2}{\frac{(s_a^2/n_a)^2}{n_a-1}+\frac{(s_b^2/n_b)^2}{n_b-1}}

The two-sided p-value comes from Student’s t on \nu degrees of freedom. With m pairs, Holm’s method sorts the p-values from smallest to largest, multiplies the k-th by m-k+1, and keeps each at least as large as the one before (and at most 1), which holds the chance of any false positive among the pairs at α, where α is 1 minus the confidence level (5% at the 95% level). A pair is called significant, and bracketed, when its adjusted p is below α; the stars mark p < 0.05, 0.01 and 0.001 whatever α is, so at the 90% level a pair between 0.05 and 0.10 is bracketed with its p-value in place of a star, and at the 99% level a pair can carry a star without a bracket. A group with one replicate is not tested, nor is a pair in which neither group has any spread. The brackets over the pairs are stacked narrowest first, each above the groups it spans and the brackets already over them.

References & documentation

  1. Altman, D. G., & Bland, J. M. (2005). Standard deviations and standard errors. BMJ, 331(7521), 903.
  2. Cumming, G., Fidler, F., & Vaux, D. L. (2007). Error bars in experimental biology. Journal of Cell Biology, 177(1), 7–11.
  3. Heckert, N. A., Filliben, J. J., Croarkin, C., et al. (2002). NIST/SEMATECH e-Handbook of Statistical Methods, §7.2. itl.nist.gov/div898/handbook.
  4. Cumming, G., & Finch, S. (2005). Inference by eye: Confidence intervals and how to read pictures of data. American Psychologist, 60(2), 170–180. (why overlapping intervals do not show that two groups are the same)
  5. Welch, B. L. (1947). The generalization of “Student’s” problem when several different population variances are involved. Biometrika, 34(1–2), 28–35.
  6. Holm, S. (1979). A simple sequentially rejective multiple test procedure. Scandinavian Journal of Statistics, 6(2), 65–70.
  7. Software: jStat (t-distribution quantiles), PapaParse (CSV parsing), and KaTeX (equation typesetting). The chart is previewed with Plotly as matplotlib will draw it from the Python script.

Frequently asked questions

Is my data uploaded anywhere?
No. Parsing and all statistics run locally in your browser via PapaParse and jStat.
Which standard deviation is used?
The sample standard deviation (Bessel's correction, dividing by n−1), the usual choice for summarising experimental replicates.
How is the confidence interval computed?
As mean ± t* × SEM, where t* is the two-tailed Student-t critical value for your chosen level with n−1 degrees of freedom.
What data layout is expected?
One group per row: a label in the first column followed by that group's replicate values. Wide (several replicate columns) and long (a single value column) layouts both work.
How are the significance brackets decided?
Every pair of groups with at least two replicates each is compared with Welch’s t-test, which does not assume equal variances, and the p-values are adjusted for the number of pairs by Holm’s method. A bracket marks each pair whose adjusted p is below 1 minus the confidence level you chose (0.05 at 95%, 0.10 at 90%, 0.01 at 99%). The stars mean the same at every level: * for p < 0.05, ** for p < 0.01 and *** for p < 0.001. You can bracket every pair instead, label them with the p-values, or turn the brackets off; the table under the statistics lists every test.
Why is the CI blank or zero for a group?
A group needs at least two values to estimate variability. For a single-measurement group the SD, SEM, t*, CI and CV cannot be estimated, so the table shows a dash, the plot draws no error bar and the CSV leaves those cells blank.

Statistics run entirely in your browser, no data leaves your device.