How to Make a Stacked Bar Chart
A stacked bar chart is one of the most effective ways to show how different pieces contribute to a whole. Instead of letting raw numbers sit in a spreadsheet, you can instantly turn them into a clear, comparative story. This article will walk you through what a stacked bar chart is, when you should use one, and provide simple, step-by-step instructions for creating one in Google Sheets, Excel, and Power BI.
What Exactly Is a Stacked Bar Chart?
Imagine a standard bar chart that shows total sales for each quarter. Now, imagine breaking down each of those bars to show which product categories contributed to the total. That’s a stacked bar chart. It’s a visualization that displays the composition of different categories, allowing you to see both the total value and the individual components within that total.
They’re fantastic for comparing part-to-whole relationships across several groups. The entire length of the bar represents the total value, while the different colored segments, or "stacks," represent the discrete parts that make up that total.
The Two Main Flavors: Standard vs. 100% Stacked
Stacked bar charts come in two primary types, each serving a slightly different purpose.
- Standard Stacked Bar Chart: This is the most common type. It shows the absolute value of each sub-category. For example, if you sold $5,000 in services and $10,000 in products in Q1, the bar for Q1 would extend to $15,000, with a segment representing $5k and another representing $10k. You use this when the total value of each bar is just as important as its components.
- 100% Stacked Bar Chart: This type shows the relative percentage of each part within a whole. Every bar is the same length (representing 100%), and the segments show the proportion each sub-category contributes. Using the sales example, the Q1 bar would show one segment making up 33.3% (services) and the other making up 66.7% (products). This is ideal for comparing the composition of categories when the actual totals aren't important, or if the totals vary so widely that comparison is difficult.
When to Use (and When to Avoid) a Stacked Bar Chart
Like any tool, a stacked bar chart is perfect for some jobs and less so for others. Knowing the difference is key to creating clear, honest data visualizations.
Use a Stacked Bar Chart When You Want To:
- Show Part-to-Whole Relationships: This is their primary strength. When you need to illustrate the composition of a total figure, like regional sales contributions to quarterly revenue or a breakdown of website traffic by source, a stacked chart is an excellent choice.
- Compare Composition Across Categories: A 100% stacked bar chart is perfect for comparing the proportional breakdown between different groups. For example, you can see if the demographic breakdown of survey respondents is consistent across different age groups.
- Visualize Survey Data: They work well for displaying responses to questions like "How satisfied are you?" where the answers might be "Very Satisfied," "Satisfied," and "Dissatisfied." You can see the proportions of each answer for different user segments.
Avoid a Stacked Bar Chart When:
- You Have Too Many Segments: If you try to stack ten different product categories, the chart becomes a crowded, unreadable "rainbow chart." As a rule of thumb, stick to 3-5 segments for clarity.
- You Need to Precisely Compare Segments: It's easy to compare the bottom-most segment in each bar because they share a common baseline (zero). However, comparing any other segments is difficult because they start at different points. If precise comparison between individual components is your goal, a clustered bar chart or separate line charts might be better.
- You Are Working with Negative Numbers: Most viewers find it confusing when stacked charts include both positive and negative values. The logic of "stacking" breaks down, and it's difficult to represent clearly.
How to Make a Stacked Bar Chart in Google Sheets
Google Sheets makes creating charts an extremely simple process. Let's create a chart showing quarterly sales split by three product lines.
First, organize your data in a clean table like this:
Now, follow these steps:
- Select Your Data: Click and drag your mouse to highlight the entire table, including your headers (cell A1 through D5 in this example).
- Insert Chart: Navigate to the menu and click Insert > Chart.
- Choose the Chart Type: Google Sheets will often default to a good chart type, but if not, the Chart editor pane will appear on the right. Under the Setup tab, click the dropdown menu for 'Chart type'.
- Select Stacked Bar Chart: Scroll down to the 'Bar' section and choose the icon for 'Stacked bar chart'. Alternatively, you can select the "Stacked column chart" if you prefer vertical bars.
- Customize: Use the Customize tab in the Chart editor to add a title, adjust colors, and format your axes to make the chart easy to read.
That's it! Your data is now visualized in an easy-to-understand stacked bar chart.
How to Make a Stacked Bar Chart in Excel
The process in Excel is very similar. We'll use the same dataset as our Google Sheets example.
- Select Your Data: Highlight your range of cells containing the sales data, including the headers.
- Go to the Insert Tab: In the top ribbon, click on the Insert tab.
- Find the Bar Chart Icon: In the 'Charts' group, click on the icon that looks like a bar chart ("Insert Column or Bar Chart"). A dropdown menu will appear.
- Choose Stacked Bar: Hover over the options under '2-D Bar'. You will see three choices: Clustered Bar, Stacked Bar, and 100% Stacked Bar. Click on the middle icon for 'Stacked Bar'.
- Format and Refine: Your chart will appear on the worksheet. You can click on the chart elements (like the title) to edit them directly. For more options, use the Chart Design and Format tabs that appear in the ribbon when the chart is selected, or use the
+icon next to the chart to add data labels, a legend, or axis titles.
How to Make a Stacked Bar Chart in Power BI
Power BI is a more powerful business intelligence tool, but creating basic charts like this is just as straightforward. We'll assume you have already connected your data source.
- Add the Visual: In your Power BI Desktop report, look at the Visualizations pane on the right-hand side. Click the icon for 'Stacked bar chart'. A blank chart template will appear on your report canvas.
- Assign Your Data Fields: Now you need to tell Power BI what data to build the chart with.
- Power BI Builds the Chart: As soon as you drop the fields into the correct spots, Power BI automatically generates the stacked bar chart.
- Customize Appearance: To refine its look, select the chart and click on the paintbrush icon ('Format your visual') in the Visualizations pane. From here, you can change colors, adjust text size, add data labels, and much more.
Best Practices for Clearer Stacked Bar Charts
Now that you know how to build the chart, follow these simple tips to make sure it’s effective and easy to understand.
- Limit Segments: Stick to a small number of sub-categories (ideally fewer than five). Too many make the bars difficult to decipher.
- Order Logically: Arrange the segments within each bar in a consistent and logical order. Placing the largest segment at the bottom provides a stable baseline for comparison. Whatever you choose, keep the order the same from bar to bar.
- Use Color Smartly: Use contrasting colors for each category, but don't go overboard. If categories are related, consider using different shades of the same color. Avoid reds and greens next to each other, as they can be difficult for color-blind viewers to distinguish.
- Always Label Clearly: A chart without a clear title, axis labels, and a legend is just a collection of colored blocks. Be direct and concise. For charts with only a few segments, consider adding data labels directly to the bars and removing the y-axis for a cleaner look.
- Start Your Axis at Zero: Never truncate the axis of a bar chart. Starting at a value other than zero will misrepresent the data by exaggerating the differences between bars, which can be misleading.
Final Thoughts
Stacked bar charts are a powerful tool for showing how different components make up a whole. Whether you're in Google Sheets, Excel, or a more advanced tool like Power BI, the process of creating them is simple once you have your data correctly organized. They provide an at-a-glance insight that's often lost in a plain table of numbers.
We know that even with simple instructions, pulling and organizing data from multiple platforms can be a huge time-sink. That’s why we built Graphed. Instead of manually exporting CSVs from Shopify, Google Analytics, and Facebook Ads, you can connect your sources once, then just ask a question in plain English like, "Show me a stacked bar chart of my revenue by product category from Shopify for the past 6 months." We handle building the real-time, interactive dashboard for you in seconds, so you can skip the setup and get straight to the insights.
Related Articles
How to Enable Data Analysis in Excel
Enable Excel's hidden data analysis tools with our step-by-step guide. Uncover trends, make forecasts, and turn raw numbers into actionable insights today!
What SEO Tools Work with Google Analytics?
Discover which SEO tools integrate seamlessly with Google Analytics to provide a comprehensive view of your site's performance. Optimize your SEO strategy now!
Looker Studio vs Metabase: Which BI Tool Actually Fits Your Team?
Looker Studio and Metabase both help you turn raw data into dashboards, but they take completely different approaches. This guide breaks down where each tool fits, what they are good at, and which one matches your actual workflow.