Stacked Bar Graph Maker (Segmented Bar Graphs)

Split each bar into parts, or switch to 100% stacked to compare shares. Download PNG or SVG. Free, no sign-up.

Your data

Example data is loaded so you can see how it works. Replace it with your own numbers.

Chart type

Labels

Chart options
Bars run
Colors

Only shows when the chart has more than one data set. Hide it only if your title already names them.

Text size

Large text suits slides and posters. On a phone the preview stays normal size, but downloads and copied images use large text.

Adds a unit to the bar labels and the axis, like $ before or kg after. Up to 6 characters.

Leave these blank and the axis starts at 0 with even steps.

On a shared or school computer, uncheck this or clear your chart when you're done.

Hover over or tap a bar to see its value. From the keyboard, tab to the chart and use the arrow keys.

Written from your data. Edit it if you like, then copy it into your document or web page.

Show data table
On this page

What is a stacked bar graph?

A stacked bar graph splits each bar into segments that add up to the bar's total. A segmented bar graph is the same chart, usually drawn at 100% so each bar shows proportions.

Statistics Canada's data visualization guide puts the trade-off plainly: each bar "is broken down to show subcomponents in each category," but "only the first subcomponent can be visualized efficiently," because the others don't start from the same baseline.

How to use this maker

  1. Put your categories (the bars) in the first column and each part in its own column. The column headers become the legend.
  2. Paste from a spreadsheet or type into the grid. Use Add data set for another part.
  3. Choose Stacked to show counts or 100% stacked to show each bar as percentages that add to exactly 100.
  4. Check the legend order and colors, then download a PNG, SVG or CSV.

Stacked, 100% stacked or grouped?

ChartBest forWeak at
StackedComparing totals and seeing roughly what they're made ofComparing the middle segments across bars
100% stackedComparing the mix inside groups of different sizesShowing the totals, which all become 100
Grouped (double)Comparing each part directly across categoriesShowing the total for each category

Only have one whole to split, like a single survey question? A percentage bar graph maker draws it as one divided bar with the percents already worked out.

How to read a stacked bar

Read the whole bar first: its height is the total. Then read the bottom segment, which starts at zero in every bar, so it compares cleanly across bars. The segments above it start at different heights, so judging them by eye is harder. Look at the value labels for those, or switch to a grouped chart.

In the 100% version, every bar is the same height and the segments are shares of 100. The labels are rounded so each bar adds to exactly 100 instead of 99 or 101. The percentage bar graph maker explains how.

For a worked example with questions, see the part on reading stacked and double bar graphs.

Related tools and guides

Frequently asked questions

What is the difference between stacked and segmented bar graphs?

They're the same kind of chart. Each bar is split into segments that add up to the bar's total. People usually say segmented bar graph when every bar is scaled to 100%, so each segment shows a proportion instead of a count.

When should I use a 100% stacked bar chart?

Use it when the groups are different sizes and you care about the mix inside each one, not the totals. For example, if Grade 8 has more students than Grade 6, a 100% stacked bar still lets you compare what share of each grade takes the bus.

How do I compare the middle segments?

It's hard on a stacked chart, because only the bottom segment starts from the same line in every bar. The middle segments start at different heights. Turn on value labels, or switch to a double (grouped) bar graph when that comparison matters most.

Can a stacked bar graph have negative numbers?

Yes. Positive segments stack up from zero and negative segments stack down from zero, so each bar can extend both ways. The total label shows the sum.

How many segments can each bar have?

Up to eight data sets. More than four or five segments gets hard to read, so group small categories into Other if you can.

How this page is checked

Cedrick Reese built this stacked bar maker on the same chart engine as the rest of the site. The stacking was recalculated separately from the tool's own code for positive and negative segments, and the 100% labels were checked to confirm each bar adds to exactly 100 after rounding. The note on reading middle segments comes from Statistics Canada's data visualization best practices. If a change to the engine alters how stacks are drawn, these checks are run again.

Last updated: