How to Add the Standard Deviation on Excel Graph
Seeing the average on a graph is helpful, but understanding the variability of your data is where the real insights are hiding. Simply looking at the mean can be misleading, hiding the peaks and valleys that tell the true story of performance and consistency. This guide will walk you through exactly how to calculate standard deviation in Excel and add it to your graph visually using error bars.
Why Add Standard Deviation to a Graph Anyway?
Before jumping into the how-to, let's quickly cover the why. Standard deviation is a measure of how spread out your data points are from the average (the mean). In simple terms:
- A low standard deviation means your data points are clustered tightly around the average. Things are consistent and predictable.
- A high standard deviation means your data points are spread out over a wide range. Things are volatile and less predictable.
Imagine you ran two different email campaigns for a month. Both campaigns averaged 50 sign-ups per day. On the surface, they performed equally well. But when you look at the standard deviation, you see a different story:
- Campaign A (Low Standard Deviation): Most days, you got between 48 and 52 sign-ups. It was a reliable, steady performer.
- Campaign B (High Standard Deviation): Some days you got 10 sign-ups, and other days you got 90. The average was the same, but the performance was wildly inconsistent.
Visualizing this on a chart helps you understand context at a glance. It exposes consistency, risk, and potential outliers in a way that a simple line showing the average just can't compete with.
Step 1: Calculate Standard Deviation in Excel
You can't add standard deviation to a graph until you have the number itself. Excel has a couple of simple formulas for this, and picking the right one is important.
STDEV.S vs. STDEV.P
The two main functions you'll use are STDEV.S and STDEV.P. The difference is straightforward:
STDEV.P: Use this when your data represents the entire population. For example, if you have final grades for every single student in a specific class, that's a population.STDEV.S: Use this when your data is a sample of a larger population. This is far more common in business analysis. Your sales data for May is a sample of your annual sales, and a user survey of 500 customers is a sample of your total customer base.
For most marketing, sales, and business reports, STDEV.S is the function you should use.
How to Calculate It
Let's use a sample dataset of monthly website traffic. Simply enter this data into your Excel sheet.
- Enter your data. Put "Month" in column A and "Website Sessions" in column B.
- Click on an empty cell where you want your standard deviation calculation to appear (e.g., cell E2).
- Type the following formula and press Enter:
=STDEV.S(B2:B7)
This formula tells Excel to calculate the sample standard deviation for the values in cells B2 through B7.
Excel will instantly give you the standard deviation value for your dataset. Now that we have this number, we can create a graph.
Step 2: Create a Basic Excel Chart
Before you can add error bars, you need a chart. Let's create a simple column chart using our website traffic data.
- Highlight your entire data range, including the headers (A1:B7 in our example).
- Go to the Insert tab on Excel's top ribbon.
- In the "Charts" group, click on the "Insert Column or Bar Chart" icon and select the first "2-D Column" option.
Excel will immediately generate a chart from your data. You can click on the chart title to rename it to something more descriptive, like "Monthly Website Sessions." Now you have the foundation to add your standard deviation visually.
Step 3: Add Standard Deviation as Error Bars
This is where we translate our calculated number into a visual element on the graph. We'll use Excel's "Error Bars" feature for this. The process is the same for column, bar, and line charts.
Using the Chart Elements Shortcut
The quickest way to get started is by using the chart tools shortcut in modern versions of Excel.
- First, click on your chart to select it. Make sure you see a border appear around the chart area.
- Look for a green plus (+) icon at the top-right corner of the chart. This is the Chart Elements button. Click it.
- In the menu that appears, hover your mouse over Error Bars and click the small black arrow that appears to the right.
- From the next menu, choose More Options... at the bottom.
This will open a sidebar on the right side of your screen titled "Format Error Bars."
Configuring the Custom Error Bars
In the "Format Error Bars" sidebar, Excel gives you several preset options, but we want to use the specific standard deviation value we calculated earlier.
- In the settings pane on the right, under Error Amount, select the radio button for Custom.
- Click the Specify Value button that appears.
- A small "Custom Error Bars" window will pop up. This window has two fields: Positive Error Value and Negative Error Value. This is where we will link to our standard deviation calculation.
- For the Positive Error Value, delete the
={1}text inside the box. Click the small spreadsheet icon with the red arrow next to the field, then click on the cell where you calculated your standard deviation (cell E2 in our example). Hit enter. - Repeat the exact same process for the Negative Error Value. Delete the existing text, click the icon, and select cell E2 again. Your window should now reference your standard deviation cell for both fields.
Click OK. You should now see error bars on your chart. Each bar extends above and below the top of the column by the same amount — your calculated standard deviation. You’ve successfully visualized the variability of your entire dataset!
A More Advanced Example: Standard Deviation for Grouped Data
Displaying a single standard deviation for the entire chart is useful, but the technique becomes even more powerful when you compare different categories. Let's say you want to compare the sales performance consistency of two different products.
First, set up your data with columns for each product, like so:
1. Calculate the Averages and Standard Deviations
Instead of one overall calculation, you'll need the average and standard deviation for each product separately. We’ll use the AVERAGE and STDEV.S formulas.
- Average for Product A:
=AVERAGE(B2:B7) - Average for Product B:
=AVERAGE(C2:C7) - Std Dev for Product A:
=STDEV.S(B2:B7) - Std Dev for Product B:
=STDEV.S(C2:C7)
2. Create a Chart of the Averages
A great way to compare groups is to create a column chart of their averages. In another area of your sheet, set up a small table with just the product names and their calculated averages. Now, create a column chart from that small table. You’ll end up with a simple chart showing just two columns: one for Product A’s average sales and one for Product B’s.
3. Add Standard Deviation for Each Group
Now, we repeat the error bar process, but with one key difference.
- Select your new chart, click the + icon, go to Error Bars -> More Options....
- In the settings pane, choose Custom -> Specify Value.
- For the Positive Error Value, delete the default text. Now, instead of selecting a single cell, click and drag to select the range containing both standard deviation values (cells F5 and G5 in our example).
- Do the same for the Negative Error Value.
- Click OK.
Excel is smart enough to apply the first standard deviation value to the first column (Product A) and the second value to the second column (Product B). Your chart now perfectly visualizes not only which product has higher average sales but also its sales consistency.
How to Read the Finished Chart
Now that your chart is built, what does it actually tell you?
- Short Error Bars (Small SD) indicate consistency. In our example, Product A has much smaller error bars, meaning its monthly sales figures are tightly packed around its average. It’s a very predictable product.
- Tall Error Bars (Large SD) indicate volatility. Product B clearly has a slightly higher average, but its very large error bars show that its sales figures are all over the place. Some months are great, others are poor. It’s an unpredictable product.
- Overlapping Bars: If the error bars of two categories overlap significantly, it suggests that the difference in their averages might not be statistically meaningful. A slight overlap isn’t a problem, but if one bar’s top is below another bar’s bottom, you can be more confident there’s a real performance difference.
Final Thoughts
Adding standard deviation to your Excel charts via error bars transforms a flat report into a rich story about performance and stability. It allows you to visualize not just the average outcome but also the range of possibilities, giving you a much deeper and more honest understanding of your data.
We know that even in Excel, calculating values, building charts, and formatting them takes time. It’s easy to get lost in formulas and settings instead of focusing on the insights. That’s why we built Graphed. We let you connect your data sources and simply ask in plain English for what you need — like, "Show me the average sales for Product A and Product B with standard deviation for last year." We instantly handle the calculations and generate a clean, live-updating chart, so you can go from question to insight in seconds.
Related Articles
What SEO Tools Work with Google Analytics?
Discover which SEO tools integrate seamlessly with Google Analytics to provide a comprehensive view of your site's performance. Optimize your SEO strategy now!
Looker Studio vs Metabase: Which BI Tool Actually Fits Your Team?
Looker Studio and Metabase both help you turn raw data into dashboards, but they take completely different approaches. This guide breaks down where each tool fits, what they are good at, and which one matches your actual workflow.
How to Create a Photo Album in Meta Business Suite
How to create a photo album in Meta Business Suite — step-by-step guide to organizing Facebook and Instagram photos into albums for your business page.