A treemap in Excel is a built-in chart type that shows hierarchical data as nested rectangles, where each rectangle's area is proportional to a number you choose (usually a value such as sales, spending or count) and rectangles are grouped into larger blocks by category. You can insert one in seconds: select your data, then go to Insert > Charts > Insert Hierarchy Chart (the treemap icon) on the ribbon. The chart does the sizing maths for you, which is why treemaps work well for spotting which categories dominate a total and which are thin slivers — something a long column of numbers makes surprisingly hard to see. The exact button labels and icons can differ slightly by Excel version, platform and region, so look for the hierarchy chart group rather than memorising one icon position.
Background: Where Treemaps Came From
The treemap was invented in the early 1990s by Ben Shneiderman at the University of Maryland as a way to visualise the disk usage of a file system — files as rectangles, folders as groups of rectangles. The idea was simple: use space itself as the measure. A large file genuinely takes up a large area on your disk, so it should take up a large area on the screen too.
Excel adopted it much later as part of the "hierarchy" chart family, alongside the sunburst chart. Both were added because spreadsheets had long handled two-level and three-level data (region > product > sub-product) badly: a bar chart with grouped bars gets crowded fast once you have dozens of categories, and a pie chart becomes unusable past a handful of slices. A treemap solves the crowding by recycling space instead of lengthening an axis. The trade-off is that it is bad at comparing precise values — which is exactly the distinction you should understand before using one.
How a Treemap Actually Works
Excel reads three things from your selected range: a category field (the grouping), an optional second category field nested inside the first, and a numeric value field. It then does the following:
- Packs rectangles into the chart area so that the total area of a group equals that group's share of the grand total.
- Sizes each individual rectangle within its group by that item's value.
- Uses the same group colour for all its children, so you can see at a glance which product lines belong to which region, or which cost lines belong to which department.
- Labels the largest rectangles where there is room and hides or truncates labels on small ones.
Because area is a two-dimensional measure, small differences are hard to judge but large differences are unmistakable. A category with 40% of the total will look roughly ten times the area of one with 4%. That is the core strength: relative magnitude, fast.
Setting One Up Step by Step
- Lay your data out with no merged cells and no blank rows or columns. Put column headers in a single header row: for example Region, Product, Sales.
- Select the whole block, including the headers. Do not select the grand total row — it will double the size of everything.
- Go to Insert and find the hierarchy chart group, then choose Treemap.
- If Excel guesses the hierarchy wrong (for example, it treats the numeric column as a category), open the chart's Select Data dialog and reorder or remove series so the largest grouping comes first.
- Format the chart: use Chart Styles to pick a readable palette, and Chart Elements to turn labels on or off. Right-click a rectangle and choose Format Data Series if labels are unreadable.
- Consider adding a value label on the larger boxes so readers do not have to guess at proportions from colour alone.
Choosing Between a Treemap and Other Charts
Use a treemap when all three of these hold: you have a part-to-whole story, you have many categories (roughly ten or more), and you have at least one level of grouping. If only the first two are true, a sorted bar chart is almost always better because it supports precise comparison.
- Bar chart: best for precise comparison and ranking. A treemap cannot tell you whether one region beat another by 3% because human eyes compare area poorly.
- Pie or doughnut: best for a handful of slices. Past about six slices the angles blur and the chart lies visually.
- Sunburst: the same hierarchy as a treemap, drawn as concentric rings. Sunbursts show depth more clearly; treemaps use the space more efficiently. Both come from the same hierarchy chart group.
- Stacked bar: good when you need exact totals per group across categories, which suits a single row of comparison rather than a whole canvas of sizes.
A common misconception is that a treemap is just a decorated pie chart. It is not: a pie is limited to one level of hierarchy, a treemap handles several, and the rectangular packing makes far better use of a wide screen. Another misconception is that the squares are meant to be read individually — they are not, unless labels are visible. A treemap is a summary chart.
Common Problems and Fixes
- Everything looks the same colour. Excel colours by the first hierarchy level. If your first column is unique per row, every box gets its own colour and the grouping is lost. Move a broader category into the leftmost column.
- Text is overlapping or missing. Small boxes cannot fit labels. Switch to tooltips for detail and label only the big boxes; recategorise tiny items into an "Other" bucket if they are not the story.
- One box swallows the chart. A single dominant value compresses everything else into slivers. Consider whether the dominant item belongs in the same comparison, or split the chart into two.
- Blank categories appear. Blank cells are treated as their own group. Fill or filter them out first.
- Negative values. Negative numbers have no sensible area, so they are not meaningfully represented in a treemap. Use a bar chart for anything that can go below zero, such as profit and loss by product.
If the chart simply refuses to build, check that the value column is genuinely numeric — numbers stored as text (often imported from another system) break the sizing. Convert them and reinsert the chart.
Frequently Asked Questions
Is treemap one word or two?
Both are used; "treemap" is the standard form in charting and in Excel's own interface, while "tree map" is a common informal spelling, especially in search queries and general writing. Neither is wrong in everyday use, but for professional documents stick to "treemap".
Where is the treemap option in Excel?
It sits in the Insert tab, inside the hierarchy chart group, alongside the sunburst and the waterfall chart. On Mac Excel the same group exists but the ribbon arrangement is slightly different. If you cannot see the icons, your data selection may not be in a form Excel recognises as chartable.
Can I make a treemap in Google Sheets?
Google Sheets does not offer a native treemap chart type. The practical alternatives are a packed bubble chart or a bar-and-table combination, or exporting to another tool. Do not rely on third-party add-ons unless they come from a trusted source.
Does a treemap need two category columns?
No. A single category column plus a value column works fine and produces a flat set of rectangles. The nested hierarchy is what makes the chart distinctive, so add a second column when your data genuinely has two levels, such as department and expense type.
Why do my treemap rectangles not line up with my numbers?
Almost always a data problem: hidden rows, a totals row included in the selection, or an extra series picked up by the Select Data dialog. Remove the totals row and confirm which fields are assigned to which level, then the areas will match the values.