What is a stacked bar chart?
In a stacked bar chart, each bar is divided into segments. The total length of the bar is the sum of its segments, and each segment shows one sub-category. The first row of your data is treated as the header — it names the series (e.g., Software, Hardware, Services) — and each subsequent row is one stacked bar.
When to use it
- You want to compare totals across categories AND show the composition within each.
- The parts add up to a meaningful whole: shares of revenue, headcount across departments, votes across candidates.
- You have two to five sub-categories — beyond that, segments get too thin to read.
How to read it
Total length compares totals across categories; segment length compares composition. The catch: only the bottom-most segment shares a common baseline, so it's the only one whose lengths can be compared accurately across bars. To compare a middle segment across categories, switch to a 100% stacked or grouped bar chart instead.
Common mistakes
- Stacking too many series. Past four or five, the chart turns into a mosaic that nobody can decode.
- Using rainbow colors instead of an ordered palette. Stacks usually have a natural order (top-to-bottom = best-to-worst, or biggest-to-smallest), and the colors should reflect that.
- Forgetting to label or legend the segments. Without a legend, segments are just stripes.
Examples
Quarterly revenue stacked by product line. Survey responses stacked by answer (Strongly disagree → Strongly agree). Population stacked by age group. Energy use stacked by source. Whenever the question is "what does this total break down into, across these categories?", a stacked bar chart fits.
Frequently asked
How do I format data for a stacked bar chart?
The first line is a header: "Category, SeriesA, SeriesB, SeriesC". Each subsequent line is one bar, e.g., "Q1, 100, 50, 25". The tool stacks the values for each row.
When should I use a 100% stacked bar chart instead?
When you only care about composition, not totals. 100% stacks normalize every bar to the same length so you can compare proportions directly.
How many series can I stack?
Technically as many as you put in the header row, but for readability stay under five. If you have more, group smaller categories into "Other".
Can stacked bars be horizontal?
Yes. Switch the orientation control. Horizontal stacked bars work especially well for survey results with longer category labels.
Pasted your data? Open the full bar chart maker for the same tool plus more options.
Open the maker