Bar Graph Maker with Error Bars

Paste your measurements and get the mean, SD, SE and 95% confidence interval, drawn as a bar graph with error bars. Free, no sign-up.

PNG, SVG or CSV download. Runs in your browser.

Your measurements

Example data is loaded so you can see how it works. Replace it with your own numbers.

Labels

The unit you enter below is added in brackets.

Chart options
Bars run
Colors
Text size

Large text suits slides and posters. On a phone the preview stays normal size, but downloads and copied images use large text.

Leave these blank and the axis starts at 0 with even steps.

On a shared or school computer, uncheck this or clear your chart when you're done.

Hover over or tap a bar to see its value. From the keyboard, tab to the chart and use the arrow keys.

Written from your data. Edit it if you like, then copy it into your document or web page.

Show data table
On this page

How the numbers are calculated

  1. Mean: x̄ = Σx ÷ n
  2. Sample standard deviation: s = √( Σ(x − x̄)² ÷ (n − 1) )
  3. Standard error: SE = s ÷ √n
  4. 95% confidence interval: x̄ ± t × SE, where t comes from the 0.975 column (two-sided 95%) of the NIST t table at n − 1 degrees of freedom. For 4 degrees of freedom, t is 2.776. Pick 90% or 99% under Confidence level and t comes from the matching column instead (2.132 or 4.604 for 4 degrees of freedom).

Up to 100 degrees of freedom the tool uses the exact NIST row. From 101 to 999 it uses the row for 100, which gives a slightly wider interval, and at 1,000 or more it uses the normal value, 1.960 for 95%.

With five measurements per group, each arm of a 95% CI is about 2.8 times as long as the SE arm, so the bar type really changes the picture.

Worked example with your data

SD, SE or 95% CI: which should you show?

  • Standard deviation describes how spread out the measurements are.
  • Standard error describes how precisely the mean is estimated. It shrinks as n grows.
  • A 95% confidence interval gives a range for the mean.

Cumming, Fidler and Vaux make the point plainly: "figure legends must make clear what error bars represent." That's why this tool always writes the error bar type and n into the caption, the alt text and the downloaded image. Source: Cumming G, Fidler F, Vaux DL. Error bars in experimental biology. J Cell Biol. 2007;177(1):7-11, via PubMed, doi:10.1083/jcb.200611141.

Reading someone else's chart? The guide to reading error bars on a bar graph covers what the whiskers tell you and what they don't.

Tips for lab reports

  • Label the value axis with what was measured and its unit, like "Mean height (cm)".
  • State the error bar type and n in the figure caption. Copy the caption the tool writes.
  • Keep it flat. 3D bars make heights and error bars harder to read.
  • If a group has only one measurement, it can't have a standard deviation. The tool draws the bar without an error bar and tells you why.
  • Turn on Show individual measurements when you have only a few values per group, so readers see the real data.
  • If you ran a test, add its result with Significance markers. The bracket and label go in the chart, and the caption says the tests were run separately. The Copy figure legend button gives you the full caption sentence.

This tool describes your data. It doesn't run a significance test.

How to add error bars in Excel

Excel can put error bars on a column or bar chart in a few clicks. The catch is which numbers it uses. Here's the quick way, then the way that matches a lab report.

The quick way: Chart Elements

  1. Click anywhere in your chart.
  2. Click the Chart Elements button (the plus sign) next to the chart and check Error Bars.
  3. Click the arrow next to Error Bars and pick Standard Error, Percentage or Standard Deviation. Pick More Options to open the Format Error Bars pane, where you can set your own amounts, the direction and the end style.

Those steps come from Microsoft's error bars help page, which covers Microsoft 365 and Excel 2016 through 2024 on Windows and Mac, with separate Windows and macOS tabs. If your buttons look different, check the tab for your system.

Why the built-in SD and SE options usually aren't what you want

Microsoft's help lists the equations behind the Standard Deviation and Standard Error options, and they're built from the data values plotted in the chart (the points in each series). Your chart only plots the means, so Excel works from the bar heights, not the raw measurements behind each bar. Excel MVP Jon Peltier notes that the Standard Error option plots the same value for every point. A lab report needs each group's own spread, so use Custom instead.

The right way: compute per group, then use Custom

  1. Next to each group's raw values, compute the spread. If one group's measurements sit in B2:B6 (example data range), the sample standard deviation is =STDEV.S(B2:B6) and the standard error is =STDEV.S(B2:B6)/SQRT(COUNT(B2:B6)). STDEV.S estimates standard deviation from a sample, SQRT returns the square root, and COUNT counts the cells that hold numbers.
  2. Put one SD or SE per group in a column, in the same order as your bars.
  3. Add error bars, choose More Options, and under Error Amount pick Custom, then Specify Value.
  4. Select your SD or SE column for both Positive Error Value and Negative Error Value, then click OK.

Clear the whole entry box before you select a range. Leftover text like ={1} makes Excel throw an error.

Plan on using the desktop app for the Custom option. Custom error bars reportedly aren't available in Excel for the web, according to a Microsoft Q&A answer, so open the file in the desktop app if you don't see the option. Menu names may vary by version.

Want to skip the formulas? The calculator at the top of this page does the per-group math and draws the chart for you. Download its CSV and copy the SD or SE column straight into Excel's Custom error bars.

Related tools and guides

Frequently asked questions

What do error bars show?

They show uncertainty or spread around each bar's value. The same-looking bar can mean three different things: the standard deviation of the measurements, the standard error of the mean, or a confidence interval. That's why the caption has to say which one it is and give the sample size.

SD or SE: which should I use?

Use standard deviation when you want to show how spread out the measurements are. Use standard error or a 95% confidence interval when you want to show how precisely you've estimated the mean. Either way, say which one in the caption and give n. If your teacher or journal names one, use that.

How do I calculate standard error?

Divide the sample standard deviation by the square root of the number of measurements: SE = SD ÷ √n. With SD = 0.239 and n = 5, SE = 0.239 ÷ 2.236 ≈ 0.107. Paste your raw values into the tool and it does this for every group.

What does it mean when error bars overlap?

Not as much as people think. Whether bars overlap depends on which type they are and on the sample size, so overlap on its own isn't a significance test. Cumming, Fidler and Vaux explain how to read overlap for each type of bar in their Journal of Cell Biology article.

How do I add error bars in Excel?

Add error bars from the Chart Elements button (the plus sign next to the chart). For real SD or SE bars, compute each group's value first and enter it with the Custom option. Our Excel error bars steps walk through it, or paste your raw values into this tool and it does the math for you.

How this page is checked

Cedrick Reese built this calculator. The mean, sample standard deviation (n − 1), standard error and 95% confidence interval were recalculated separately from the tool's own code for the example groups and for edge cases: one measurement, two measurements, identical values and negative numbers. The t values are taken from the NIST/SEMATECH e-Handbook t table, and the caption rule follows Cumming, Fidler and Vaux in the Journal of Cell Biology (PubMed, doi:10.1083/jcb.200611141). The Excel steps were checked against Microsoft Support's error bars, STDEV.S and SQRT pages. Microsoft only says More Options lets you make custom error bars, so the Custom and Specify Value steps were checked against Peltier Tech's custom error bars guide. The 90% and 99% t values come from the 0.95 and 0.995 columns of the same NIST table. The Excel steps are checked again when Excel's chart menus change, and the worked numbers are rerun whenever the calculator changes.

Last updated: