A regular bar chart gives you one number per category. A stacked bar chart shows you where that number came from. Each bar gets split into colored segments, one per data series, so the total and the breakdown are visible at once.
That's the appeal. But stacked charts have a real limitation, and ignoring it produces charts that confuse more than they clarify. Knowing when to use one versus when a grouped chart or a different format would serve better makes a bigger practical difference than most people expect. The bar graph examples page shows how the formats compare side by side.
What Is a Stacked Bar Chart?
- Stacked bar chart
- A variant of the standard bar chart where each bar is subdivided into colored segments. Each segment represents the value of one data series within a category. The segments are placed end-to-end so their combined length equals the total for that category.
The critical thing to understand is the baseline. The bottom segment always starts at zero, same as every other bar, so you can compare it reliably across categories. Every segment above it starts where the one below it ends. That floating starting point is why stacked charts get misread: readers can't easily judge the size of a middle or top segment the way they can judge the base one.
William Playfair invented the bar chart in 1786 in his Commercial and Political Atlas, which showed Scotland's trade data as a series of bars comparing imports and exports across 17 trading partners. It was the first chart to represent discrete categorical comparisons through bar length rather than position or time. The stacked bar chart developed as a distinct format later in the 19th and 20th centuries, and by the mid-20th century it was standard in economic reporting and government statistics. Today it's a default chart type in every major tool from Excel to Tableau to D3.js.
Stacked bars can run vertically or horizontally. Horizontal layouts work better when category labels are long, since vertical bars leave little room for text below the axis. The stacking logic is the same either way.
Absolute Stacked vs. 100% Stacked
The two versions look similar but tell very different stories. Picking the wrong one is a common mistake, and it usually comes from not being clear on what the chart is actually supposed to communicate.
Absolute Stacked Bar Chart
Absolute stacking keeps real values on the axis. Each bar's full height is the actual total for that category, so you can see both how large each category is and how it breaks down. Use this version when the size of the totals matters, not just the proportional split.
100% Stacked Bar Chart
The 100% version, also called normalized or proportional, stretches every bar to the same height and switches the axis to percentages. All bars end at 100%, which makes it easy to compare the proportional mix across categories. But actual totals disappear entirely. If one category's total is three times another's, that won't show up here. Use the 100% version when the proportion is the story and the raw numbers aren't.
| Feature | Absolute Stacked | 100% Stacked |
|---|---|---|
| Axis unit | Actual values | Percentage (0 to 100%) |
| Bar heights | Vary by category total | All bars equal height |
| Communicates | Totals and bottom-segment values | Proportional composition only |
| Hides | Nothing; all magnitudes visible | Actual values for every segment |
| Best when | Total size and breakdown both matter | Part-to-whole ratios are the story |
| Example use | Quarterly revenue by product line | Traffic share by device type over time |
When to Use a Stacked Bar Chart
Stacked bar charts work when you need to show both a total and where it came from, at the same time, in the same chart. Two rules make a big difference: keep segments to five or fewer, and put the series you care most about at the base. The bottom position is the only one with a stable zero baseline, so it's the only segment readers can judge accurately by length. If the most important data sits in the middle of the stack, a different chart will serve you better.
Common scenarios where stacked bars earn their place include annual revenue split by product line across several years, national energy consumption divided by fuel source over decades, or survey results showing response distributions for multiple questions side by side. The format is standard in financial reporting, public health dashboards, and data journalism.
Stacked bar charts are a native chart type in Microsoft Excel, Google Sheets, Tableau, and Power BI, which makes them among the most frequently produced visualizations in business settings. Developers building interactive data products can create stacked bar charts programmatically using Chart.js, D3.js, or similar libraries. BarGraphCreator provides a free online stacked bar chart generator that exports PNG and SVG directly from the browser.
If you need people to compare a specific segment's value across multiple categories, switch to a grouped bar chart. With grouped bars, every series gets its own baseline at zero, so readers can compare them directly without any mental math. Stacked bars force that comparison across floating baselines, which most readers won't do accurately.
Stacked charts also get compared to pie and donut charts, which cover similar ground. If you're working with a single category and just want to show how it breaks down, there's a real choice between formats. The bar chart vs. pie chart guide covers when each one makes more sense.
What Are the Common Pitfalls of Stacked Bar Charts?
Stephen Few has been making this argument for years: the only segment with a reliable baseline is the bottom one. Everything above it floats, which means readers have to judge lengths that don't start from the same point. That's something people do poorly. His bottom line is that stacked bars are only worth using when the total is the point, and comparing individual segments isn't.
Knaflic's angle in Storytelling with Data is slightly different from Few's. She's less concerned with the perceptual mechanics and more focused on what readers actually do when they encounter a chart. If the people looking at it need to compare segments, they'll try to subtract the lower layers mentally, and most won't do it accurately. Her framing is that a chart should make the comparison you want people to make as easy as possible. For individual segment comparison, stacked bars make it harder, not easier.
A few other things trip people up beyond the baseline issue:
- Stacking too many segments is the most common problem. Five is about the limit before the legend becomes harder to read than the chart itself. If the dataset has more components, group the smaller ones into an "Other" bucket or reconsider the chart type entirely.
- Color choices matter more than people expect. Adjacent segments in similar shades are hard to tell apart, especially for anyone with color vision differences. Using a colorblind-safe palette with real contrast between segments is a straightforward fix that most people skip.
- Thin segments without labels put all the identification work on color alone. If a segment is too narrow for a label, that's usually a sign the data doesn't support a stacked chart at that level of granularity.
- Too many category bars with multiple segments each turns a chart into a visual wall. When a dataset gets that large, a table or small-multiple layout usually communicates more clearly than trying to fit everything into one stacked chart.
- Inconsistent segment order across related charts is a subtle problem that adds up. If the base segment changes from chart to chart in the same report, readers have to re-learn the visual each time. Pick an order and stick to it.
How to Make a Stacked Bar Chart with BarGraphCreator
The BarGraphCreator tool handles stacked bar charts without any signup or software. Everything runs in your browser and your data stays on your device. Here's how to build one.
Ready to build?
BarGraphCreator is free and runs entirely in your browser. No sign-up, no data sent to a server.
For a complete walkthrough of the BarGraphCreator interface, including data formatting requirements, color and label options, and export settings, see the how to make a bar graph guide.
Frequently Asked Questions
What is the difference between a stacked bar chart and a grouped bar chart?
The structural difference comes down to baselines. Stacked puts all series in one bar, so readers see the combined total immediately, but comparing any individual segment across bars requires subtracting the layers below it mentally. Grouped gives each series its own bar from a shared zero baseline, so any segment comparison is direct. You gain precision on individual series but lose the combined total at a glance. Which one to use depends on which comparison matters more to the people reading the chart.
When should I use a 100% stacked bar chart instead of an absolute stacked chart?
Use 100% when proportions are the story and the actual numbers don't matter. Tracking how desktop vs. mobile vs. tablet traffic has shifted over time is a good fit: the story is about the proportion change, not total visitor count. If the total volume matters alongside the breakdown, use absolute stacking. The bars will vary in height, which is the point.
How many segments can a stacked bar chart have before it becomes hard to read?
Five is where most charts start breaking down. The color problem is real: beyond five distinct hues, even people with normal color vision start confusing adjacent segments, and for anyone with color differences it's worse. If you're hitting that ceiling, two options. Collapse the smallest categories into an "Other" segment so you stay under five. Or step back and ask whether the dataset actually suits a stacked chart at all. Sometimes the honest answer is it doesn't, and a grouped chart or a simple table will communicate the data more clearly.
Can stacked bar charts display negative values?
They can, but it gets messy. Negative segments extend in the opposite direction from positive ones, which breaks the stacking logic that makes the chart readable in the first place. A diverging bar chart handles this much more cleanly: positive values extend one way, negative the other, both from a shared center baseline.
Is a stacked bar chart the same as a stacked column chart?
Mostly, yes. "Column chart" just means vertical bars, while "bar chart" can go either direction. So a stacked column chart is just a vertical stacked bar chart with a different name. Different tools use different terminology, but the chart structure and the data format are identical.
Test Your Stacked Bar Chart Knowledge
Five questions based on what's covered on this page. No sign-in required. Pick the best answer for each, then check your score.
Sources & References
- Wikipedia, "Bar chart," Wikipedia: The Free Encyclopedia. https://en.wikipedia.org/wiki/Bar_chart
- Cole Nussbaumer Knaflic, Storytelling with Data: A Data Visualization Guide for Business Professionals (Wiley, 2015). Book information at: https://www.storytellingwithdata.com/books
- Stephen Few, "Displaying Data for Time-Series and Part-to-Whole Comparisons," Perceptual Edge (2011). Note: Perceptual Edge is an archive of Few's work from 2003 to 2017. perceptualedge.com, article PDF
- Chart.js Documentation, "Bar Chart," including stacked bar chart configuration. https://www.chartjs.org/docs/latest/charts/bar.html
- W3C Web Accessibility Initiative, "Understanding Success Criterion 1.4.1: Use of Color," WCAG 2.2. https://www.w3.org/WAI/WCAG22/Understanding/use-of-color.html