Stacked Bar Chart
A bar chart where segments are stacked on top of each other — showing both the total and how each part contributes to it. Perfect for comparing composition across categories.
// 01 — The chart
What it looks like
A stacked bar chart showing revenue by region, broken down by product line. Each bar’s total height represents overall regional revenue, while segments show each product’s contribution.
// 02 — Definition
What is a stacked bar chart?
A stacked bar chart is a variation of the standard bar chart where each bar is divided into segments stacked on top of each other. Each segment represents a sub-category, and the total bar height shows the combined value. This lets you see both the whole (total bar height) and the parts (individual segment sizes) simultaneously.
Unlike a grouped bar chart (where sub-categories sit side by side), stacking emphasizes the total while still showing composition. The trade-off is that only the bottom segment sits on a common baseline — upper segments are harder to compare precisely because they start at different heights.
Stacked bar charts are a workhorse of business reporting, survey analysis, and any scenario where you need to answer two questions at once: “How big is each group?” and “What makes up each group?”
Origin: Stacked bar charts evolved naturally from bar charts, which were invented by William Playfair in 1786. The stacked variant emerged in the 19th century as statisticians began exploring ways to show composition within comparisons. Florence Nightingale used stacked and segmented charts in her famous 1858 report on mortality in the Crimean War.
// 03 — Anatomy
Parts of a stacked bar chart
// 04 — Usage
When to use it — and when not to
- You want to show both totals and composition across categories
- Comparing how sub-categories contribute to the whole in each group
- You have 2–5 sub-categories per bar (segments stay readable)
- The total value across groups is an important comparison
- Showing budget breakdowns, survey responses, or resource allocation
- Your audience needs to see part-to-whole relationships across multiple groups
- Precise comparison between middle segments is critical — they don't share a baseline
- You have more than 5–6 sub-categories — the stack becomes unreadable
- You only need to compare totals — a simple bar chart is cleaner
- Sub-categories have negative values — stacking breaks down conceptually
- You need to show change over time for each sub-category — use a line chart
- All sub-categories are nearly equal — differences will be invisible in the stack
// 05 — Reading guide
How to read a stacked bar chart
Follow these steps whenever you encounter a stacked bar chart in the wild.
Read the title, axes, and legend first
Understand what each color segment represents before looking at the data. The legend is essential — without it, you can't identify which sub-category is which. Check the Y-axis units (dollars, percentages, counts).
Compare total bar heights first
The overall height of each bar represents the total. Scan across bars to see which group has the largest and smallest totals. This is the first and most reliable comparison the chart offers.
Focus on the bottom segment for precise comparison
Only the bottom segment sits on the zero baseline across all bars, making it the easiest to compare accurately. If the bottom segment represents the most important sub-category, the designer chose the stacking order well.
Look for dominant segments and shifts
Which color takes up the most space in each bar? Does a segment's share grow or shrink from bar to bar? These compositional shifts are the main insight stacked bars reveal.
Don't over-interpret middle segments
Middle segments are hard to compare precisely because their baselines differ between bars. Use them for rough 'bigger vs smaller' judgments, not exact measurements. If you need precision for a specific sub-category, check the data table or use a grouped bar chart.
// 06 — Common mistakes
Mistakes to watch out for
Too many segments per bar
More than 5–6 stacked segments become a confusing rainbow. The middle segments get squeezed into thin slivers that are impossible to read or compare. Combine small categories into 'Other' or switch to a different chart type.
Inconsistent segment ordering
Each bar's segments must appear in the same order (same color on top, same color on bottom). Changing the stacking order between bars destroys the reader's ability to track any sub-category across groups.
Using stacked bars for time series
While you can stack bars over time (e.g., monthly revenue by product), readers will struggle to see trends in individual segments because the baselines shift. Use a stacked area chart or separate line charts for time-series composition.
Truncated Y-axis
Just like regular bar charts, stacked bars must start at zero. A truncated axis exaggerates the differences between totals and distorts the proportional relationships between segments.
Hiding the most important sub-category in the middle
The bottom and top segments are the easiest to read. If your key sub-category is buried in the middle of the stack, readers can't compare it accurately. Reorder segments to put the most important one on the bottom.
// 07 — Real-world examples
Where you’ll see stacked bar charts used
Business: Quarterly revenue by product line
A CFO's board presentation showing revenue for each quarter, with segments for subscriptions, consulting, and hardware. The stacked format lets the board see total growth quarter-over-quarter while also tracking whether subscription revenue is growing as a percentage of the total — a key strategic metric.
Business AnalyticsSurvey research: Likert scale responses
A market research report showing customer satisfaction responses (Strongly Agree to Strongly Disagree) for five different product features. Each bar represents a feature, and segments show the distribution of responses. The 100% stacked variant makes it easy to compare response proportions across features.
ResearchGovernment: Budget allocation by department
A state government's annual budget report showing spending by category (education, healthcare, infrastructure, defense, etc.) across five fiscal years. Stacked bars reveal both the growing total budget and the shifting priorities — education's share might be growing while infrastructure's is shrinking.
Public Policy// 08 — At a glance
Quick reference
// 09 — Variations
Types of stacked bar charts
The stacked bar has several important variants, each optimized for different analytical needs.
100% stacked bar chart
All bars are the same height (100%), emphasizing proportional composition rather than absolute totals. Best for comparing shares across groups.
Horizontal stacked bar
Bars run left-to-right. Ideal when category labels are long text strings that would overlap on a vertical axis.
Diverging stacked bar
Bars extend in both directions from a center line. Perfect for Likert scales (agree/disagree) or positive/negative splits.
Stacked area chart
The continuous version of stacked bars, best for showing composition changes over time with smooth transitions.
// 10 — FAQs
Frequently asked questions
What is a stacked bar chart?+
A stacked bar chart is a variation of the standard bar chart where each bar is divided into segments stacked on top of each other. Each segment represents a sub-category, and the total bar height shows the combined value. This lets you see both the whole (total bar height) and the parts (individual segment sizes) simultaneously.
When should you use a stacked bar chart?+
Use a stacked bar chart when you want to show both totals and composition across categories. It also works well when comparing how sub-categories contribute to the whole in each group, and when you have 2–5 sub-categories per bar (segments stay readable).
When should you avoid a stacked bar chart?+
Avoid a stacked bar chart when precise comparison between middle segments is critical — they don't share a baseline. It is also a poor fit when you have more than 5–6 sub-categories — the stack becomes unreadable, or when you only need to compare totals — a simple bar chart is cleaner.
How is a stacked bar chart different from a bar chart?+
Both a stacked bar chart and a bar chart can look similar at first glance, but they answer different questions. Reach for a stacked bar chart when the comparisons and patterns it was designed to reveal match what you need to communicate, and choose a bar chart when its particular strengths better fit your data and audience.
Is a stacked bar chart suitable for dashboards?+
Yes — a stacked bar chart can work well in dashboards as long as the panel is large enough for readers to perceive the encoded values, has a clear title, and includes the legend or axis labels needed to interpret it.
What category of chart is a stacked bar chart?+
Stacked Bar Chart belongs to the Part-to-whole family of charts. Charts in that family are designed to answer the same kind of question, so they often work as alternatives when one doesn't quite fit your data.