Home / Chart types / Stacked Bar Chart
Stacked bar chart maker
Totals and their composition, in one chart. Paste your numbers and get a stacked bar with segments in a consistent order across every bar. Free to use, with no account.
Your stacked bar chart will appear here
Paste a table or describe your numbers, then press Generate chart.
Switching type redraws the data you already have. Nothing you paste is stored — the chart lives in this browser tab until you export it.
Two questions, one chart
A stacked bar answers two things at once: how big was each total, and what was it made of. The full height of each bar is the total; the bands within it are the parts.
That is a genuinely efficient chart when the mix is the story — when you want to say "revenue grew, and the growth came almost entirely from Enterprise." A grouped bar shows the parts clearly but makes the reader add them up to get the total. A plain bar chart shows the total and hides the mix. The stacked bar is the only one that does both.
The price it pays is precision, and the reason is worth understanding, because it explains every other rule on this page.
The shared baseline problem
Only the bottom segment starts at the same place in every bar.
The bottom band always begins at zero, so bottom segments can be compared across bars accurately. Everything above it begins wherever the segment below happened to end. If your middle band sits on a base of 40 in Q1 and 62 in Q4, the reader cannot compare those two middles by eye — they are floating at different heights, and length judgements against a moving baseline are unreliable.
Three consequences follow directly:
- Put your most important series at the bottom. Whichever segment you most want compared across bars goes on the baseline. This is a decision, not a default — think about it before you generate.
- Keep the segment order identical in every bar. If the order shifts between bars, no comparison is possible at all. ChartGPT fixes the order across all bars automatically.
- Do not use a stacked bar to compare middle segments. If that comparison is the point, you need a grouped bar or small multiples.
Showing values or showing share
Two different arguments, often confused.
Actual values. Bars have different heights, each showing its real total. Use when the total is part of the story: revenue grew from $4.2 million to $6.8 million, and the mix shifted. This is what ChartGPT draws.
Share. If only the mix matters, convert your numbers to percentages of each period's total before you paste them, and say so in the prompt. Be careful with this: percentages hide whether the total grew or collapsed. A category can rise from 20% to 40% of the mix while shrinking in absolute terms, so if someone might read growth into your percentages, show the actual values instead.
When to use a stacked bar
It works well for:
- Revenue by product line across quarters — total plus mix, the canonical use
- Headcount by function over several years
- Budget composition across departments or periods
- Survey results by segment, where each bar is a group and the bands are responses
- Any total that splits into two to four consistent parts
Reach for something else when:
| Your situation | Better chart | Why |
|---|---|---|
| Comparing individual parts precisely | Grouped bar | Every bar starts at zero, so all parts are comparable |
| More than about four segments | Grouped bar or small multiples | Thin bands stop being readable |
| Only the total matters | Bar chart | Do not add complexity you are not using |
| One period, one split | Pie or donut | A single stacked bar is a worse pie |
| More than about twelve periods | Fewer, wider periods | Aggregate to quarters or years; thin bars stop being readable before the data runs out |
| Any value can be negative | Grouped bar | Negative segments break the stack |
Ordering the segments
Sorting a stacked bar means two separate decisions, and they are independent.
Bar order — same rules as a plain bar chart. Time keeps calendar order. Categories usually sort by total, descending.
Segment order within each bar — this is the stacked-bar-specific decision, and there are three defensible strategies:
- Most important at the bottom. The series you want compared gets the shared baseline. Usually the right call.
- Largest at the bottom. Produces the most stable-looking chart, because the biggest band anchors everything.
- Most stable at the bottom. If one series barely moves, putting it on the baseline means the bands above it wobble less and the shape stays readable.
What is never acceptable is a different order in different bars. Say put Enterprise at the bottom to override.
A worked example
Revenue mix over time
Data:
Quarter Core Pro Enterprise Q1 3200 740 260 Q2 3350 910 420 Q3 3400 1120 680 Q4 3480 1390 1010
Prompt: Stacked bar of revenue by product across quarters, in $ thousand. The point is that growth came from Enterprise.
What you get: four bars in calendar order, three bands each in a fixed order. Core sits on the baseline because it is both the largest and the most stable — which makes the Enterprise band's growth easy to see at the top.
Four things that ruin a stacked bar
1. Too many segments. Six bands per bar and the middle ones are slivers floating on shifting baselines. Four is the practical ceiling. Group the tail into "Other" and put it at the top, where its imprecision does least damage.
2. Inconsistent segment order. Fatal. The reader has no way to track a series across bars.
3. Using it to compare middle bands. The chart cannot support that comparison. If it is what you need, use grouped bars.
4. Percentages presented as growth. Share and volume are different things, and percentages that rise while the business shrinks are a genuinely misleading combination.
Getting your data in
A stacked bar needs a wide table: the first column is your category or time period, and each subsequent column is one segment.
Quarter Core Pro Enterprise Q1 3200 740 260
Column headers become segment names in the legend, so keep them.
Blank cells are treated as zero for that segment, not as missing data. If a product genuinely did not exist in Q1, zero is correct. If the number is simply unknown, say so, because a silent zero shrinks the total and misstates the chart.
The paste limit is 500 rows, on every plan.
How to make one
- Paste a wide table — category first, then one column per segment.
- Say
stacked bar chartso it does not infer the type. - Name your units so the axis and subtitle read correctly.
- Say which segment goes at the bottom — it is the only one readers can compare across bars.
- Adjust in words.
Put Enterprise at the bottom.Group the small segments into Other.Keep calendar order. - Export — SVG for slides, PNG for a quick paste, PDF for print.
Related chart types
- Grouped bar — the same data with bars side by side. Every part comparable, totals no longer visible.
- Area chart — one accumulating quantity over time, as a continuous filled shape, and free on every plan.
- Donut chart — composition of a single total, with the figure in the middle.
Exporting
SVG, PNG and PDF on every plan. SVG is the one to use for anything projected or resized.
Stacked bar FAQ
Why can't I compare the middle segments?
Only the bottom segment starts at zero in every bar. The bands above it begin wherever the band below ended, so their positions shift from bar to bar and length comparisons become unreliable. Put the series you care about most at the bottom, or use a grouped bar.
How many segments can I have?
Four is the practical ceiling. Beyond that the bands become too thin to compare, especially in the middle of the stack.
Which segment should go at the bottom?
Whichever you most want compared across bars, since only the bottom band shares a baseline. Failing that, the largest or the most stable series.
Can I show percentage share instead of values?
Convert your numbers to percentages of each period's total before pasting them. Be careful: share hides whether the total grew or shrank, so if that matters, chart the actual values instead.
Stacked or grouped — how do I choose?
Stacked when the total is part of the story. Grouped when comparing the individual parts is the story. You cannot have both perfectly in one chart.
Can I use negative values?
Not sensibly. Negative segments break the stack, because there is no coherent way to add a negative band to a total. Use a grouped bar instead.
Is the stacked bar chart maker free?
Yes. Stacked bars are on the free plan, like all nine chart types, with PNG, SVG and PDF export and no account needed to try it. The free plan covers 15 charts a calendar month and pastes of up to 500 rows. If you want a single period rather than a series of them, a donut or a pie is the simpler read. See pricing.
Make your stacked bar chart now.
Paste your numbers into the box and export in a few seconds. Nothing to install, nothing to sign up for.