Treemap Chart in Excel: Create and Format One

Charts & pivot tables · Updated November 20, 2026

To create a treemap chart in Excel for Microsoft 365 on Windows, arrange your data in columns with category levels followed by a numeric value, select the range, then choose Insert > Insert Hierarchy Chart > Treemap. Excel displays the values as nested rectangles, with larger values taking up more area.

What a Treemap Chart Shows

A treemap is a way to compare parts of a whole while preserving some of the hierarchy between those parts. Each rectangle represents a data item, and its area corresponds to that item’s value. When your data has parent and child categories, the children appear as smaller rectangles grouped inside their parent category.

For example, imagine a retailer tracking sales by department and product. A large rectangle for Furniture can contain separate rectangles for Chairs, Desks, and Tables. If Chairs account for more sales than Tables, the chair rectangle is larger. The combined area of the products in a department represents that department’s share of the total shown in the chart.

Treemaps are useful when you want readers to spot major contributors, compare relative proportions, and see how items belong together. They are less useful for reading precise values or following a time trend. A rectangle that looks twice as large does not make its exact value obvious, so include labels or keep the source table nearby when exact figures matter.

Arrange the Source Data

Excel needs category columns and a numeric measure. Put each level of the hierarchy in its own column, with the value column last. Use one row for each lowest-level item, and repeat its parent category on every relevant row. A small example might look like this:

  • Department: Furniture; Product: Chair; Sales: 120
  • Department: Furniture; Product: Desk; Sales: 90
  • Department: Furniture; Product: Table; Sales: 60
  • Department: Lighting; Product: Floor lamp; Sales: 80
  • Department: Lighting; Product: Desk lamp; Sales: 50

Put the column headings in the first row, such as Department, Product, and Sales. Select the complete range, including those headings, when inserting the chart. Excel uses the text fields to identify category levels and the numeric field to size the rectangles. With the sample above, Furniture totals 270 and Lighting totals 130, for an overall total of 400. The department areas therefore reflect 270 and 130, while each product occupies part of its department’s area.

Before charting, check that the values are genuine numbers rather than numbers stored as text. Remove blank rows and avoid merged cells in the data range. Decide how to handle missing, zero, or negative values: a treemap is designed to show positive contributions, and zero or negative amounts do not create meaningful positive rectangle areas. If those values have business meaning, document the treatment or consider a different chart.

Insert a Treemap in Excel

  1. Click a cell in your data range, or select the full range with its headings.
  2. On the ribbon, choose Insert > Insert Hierarchy Chart > Treemap. The chart appears in the worksheet.
  3. Use the chart’s title to describe the measure and reporting period, such as “Sales by Department and Product.”
  4. Move or resize the chart by dragging it. To make a more precise adjustment, select the chart and use the sizing controls on the ribbon’s chart format options.

If you select only one cell, Excel generally detects the surrounding data block. Still, selecting the intended range yourself helps avoid accidentally including notes, totals, or unrelated columns. Keep a grand-total row out of the plotted rows: including it as another item can make the total appear alongside the components it already summarizes, distorting the story.

In Excel for Mac, the chart is also available from the Insert tab’s hierarchy-chart options in supported versions. Ribbon wording and placement can vary slightly by release. Excel for the web may offer a different chart-insertion interface or a more limited set of formatting controls; if you cannot find Treemap there, open the workbook in the desktop Excel app. Treemap charts are available in modern Excel versions, including Microsoft 365.

Read the Rectangles and Hierarchy

In a treemap, area—not position along an axis—is the main encoding. There is no conventional horizontal or vertical value axis to read. A parent category is represented by the overall region containing its children; its size is the sum of the values represented by those children. The chart is most helpful for questions such as “Which departments account for the largest share?” or “Which products dominate this department?”

Color provides another visual cue, but do not assume it always communicates a separate numerical measure. Depending on the chart’s styling, colors may distinguish branches or categories rather than encode high and low values. Explain any meaningful color scheme in a title, note, or accompanying text. Avoid relying on color alone to communicate a critical distinction, since similar shades can be hard to tell apart and may be inaccessible to some readers.

Treemaps are not ideal for comparing many similarly sized rectangles. Their positions and proportions can make close comparisons difficult, especially when a chart contains numerous small leaves. Labels can also become cramped or disappear when the rectangles are too small. For a presentation, consider showing only the most useful category levels or filtering the source data to a clear question rather than trying to fit every record into one chart.

Format Labels, Colors, and Layout

Select the chart to reveal the chart tabs, then use Chart Design to choose a style, adjust the chart layout, or add chart elements. To change label details, click a data label if one is shown, right-click, and choose Format Data Labels. Available label options depend on the chart and Excel version; check the options offered in the formatting pane rather than assuming every label type is available.

Labels are most useful when readers need names or exact values as well as relative area. If there are many small rectangles, displaying every value may clutter the chart. Try a short title, readable category names, and only the labels that fit. If an item’s name is cut off or absent, enlarge the chart, reduce the number of plotted items, or provide a separate table with the complete detail.

Use chart styles and colors to improve contrast without suggesting a ranking the data does not support. A clear chart title should say what the values measure; a separate subtitle or nearby note can state the date range, units, or exclusions. For example, “Online orders by product, Q2” is more informative than “Product breakdown.” Check the chart at the size it will actually be viewed or printed, not just while it fills your screen.

Choose the Right Level of Detail

The number of category columns determines how much hierarchy the chart can show. A two-level data set such as Region and Sales can show regions as the leaves; adding City creates another level. More levels are not automatically better. Use categories that answer a real comparison question, and keep names consistent so that Excel groups related records as intended. “North,” “N.”, and “Northern” may be treated as different labels rather than one region.

Decide whether your chart should include all records or focus on a manageable subset. A long tail of tiny values can take up little space while making the chart harder to interpret. You might group minor products under “Other” in a prepared summary table, but do so transparently and make sure the grouped total is calculated correctly. Do not quietly remove values that change the interpretation.

For an effective chart, consider these questions before sharing it:

  • Do the category levels reflect how readers naturally group the items?
  • Are the values measured on the same basis and for the same period?
  • Are the total and units clear, especially if the chart is separated from its source table?
  • Can a reader distinguish the important rectangles without zooming in?

Common Problems and Fixes

If Treemap is unavailable or Excel inserts a different chart, check that you are using a supported Excel version and that you selected a range containing category text and numeric values. Confirm that the numeric column contains numbers, not text or error values. Also make sure the selection does not include unrelated columns or a total row that should not be treated as a data item.

If a category appears in an unexpected group, inspect spelling, spaces, and the placement of the category columns. Excel builds the hierarchy from the row-level labels it receives; it does not know that two differently written names are intended to mean the same thing. If the chart’s hierarchy seems backwards, rearrange the category columns so the broadest parent category comes before the more specific child category, then recreate or adjust the chart from the corrected source.

If the chart is hard to read, the problem may be too many items rather than a formatting error. Reduce the number of levels, summarize the data, enlarge the chart, or use a table for small categories. If updated records do not appear, check that the chart’s source range includes them. Formatting the source data as an Excel Table before creating the chart can make it easier to manage expanding data; charts based on a table generally include rows added to that table.

Treemap Compared with Other Charts

A treemap is a strong choice for part-to-whole comparisons across categories, particularly when the hierarchy matters and there are many items. A pie chart is usually limited to a small set of parts at one level; comparing several pies or many slices can be difficult. A treemap can show nested levels in one view, though its areas are also harder to compare precisely than aligned bars.

Choose a bar chart when the main task is ranking values or comparing exact differences. Bar lengths share a common baseline, so readers can judge values more reliably than they can judge the areas of nested rectangles. Choose a line chart when the key question is how a measure changes over time. A treemap can show the composition at one point or for one reporting period, but it is not a substitute for a time-series chart.

A sunburst chart is another hierarchy chart in Excel. It uses concentric rings to show category levels, with broader levels nearer the center and more detailed categories in outer rings. It can make the sequence of levels especially visible, while a treemap often uses screen space efficiently for comparing large and small parts. Choose based on the question and the audience; neither chart makes every category comparison equally easy.

Frequently Asked Questions

Can I make a treemap chart in Excel?
Yes. In supported desktop versions, select hierarchical category data and a numeric value column, then choose Insert > Insert Hierarchy Chart > Treemap. Excel builds the nested rectangles from the categories and sizes them by value.

How many columns do I need for a treemap?
You need at least one category column and one numeric value column. Add more category columns when you want to show parent-and-child levels, such as Department, Product, and Sales. Put broader categories before more specific ones.

Can a treemap show percentages?
A treemap’s rectangle areas represent each item’s share of the total shown, but the chart may not print a percentage on every rectangle by default. Check the available options in Format Data Labels. You can also calculate percentages in the source table and include them as labels if that is supported by your chart setup.

Why are some treemap labels missing?
Excel may leave labels off when a rectangle is too small to display them legibly. Try enlarging the chart, reducing the number of items, or showing fewer label details. Keep a table alongside the chart when readers need every name and value.

Can I use negative values in a treemap?
A treemap is intended to compare positive parts by area, so negative values cannot be represented as ordinary positive rectangles in a meaningful way. Review the data and choose a chart suited to the question, such as a bar chart that can show values on both sides of zero.

Related

Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.

More in Charts & pivot tables

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.