How to Build a Treemap Chart in Excel Step by Step

Charts & pivot tables · Updated November 20, 2026

To build a treemap chart in Excel, arrange your categories in one or more columns and their numeric values in the last column, select the data, then choose Insert > Insert Hierarchy Chart > Treemap. Excel turns the values into nested rectangles, making it easy to compare the relative sizes of categories at a glance. Before you begin, decide what each rectangle should represent and make sure the values you want to compare are numeric and positive.

What You’ll Need

  • Excel for Microsoft 365 on Windows, or a recent Excel desktop version that includes treemap charts. Treemap charts are available in Excel 2016 and later; ribbon labels and chart options may vary slightly on Mac or the web.
  • A rectangular data range with a header row, category names, and one numeric measure, such as sales, units, or budget amounts.
  • Optional: two or more category columns if you want nested levels, such as department and product. Each data row should describe one lowest-level item.

Step-by-Step

  1. Choose the story the chart should tell. A treemap compares the size of categories using area: a larger value gets a larger rectangle. Decide whether you want to compare a flat list, such as sales by product, or show a hierarchy, such as sales by department and product. Use one meaningful measure for the whole chart. Mixing dollars, percentages, and unit counts in one value column makes rectangle sizes misleading.
  2. Arrange the data as a simple table. Put a clear heading at the top of each column. For a flat treemap, use a category column followed by a numeric value column. For a hierarchy, put the broadest category first, the next level beside it, and the numeric value last. For example, use columns named Department, Product, and Sales. Each row should identify one product and its sales. Repeat the department name on every relevant product row rather than leaving repeated labels blank. This makes the relationships explicit and helps Excel group the rectangles correctly.
  3. Check and clean the source values. Make sure the value column contains numbers, not amounts stored as text. Remove blank rows within the data, stray notes, and totals or subtotals mixed in with the detail rows. Do not include a department subtotal alongside its products: doing so counts that department twice and distorts the chart. If a category has no meaningful value, decide whether to exclude it or correct the source rather than assigning an arbitrary number. Treemaps are intended for positive values, so review zero and negative entries before charting.
  4. Select the full data range. Include the header row and every category and value column, but leave out unrelated notes or totals below the table. If your data is already an Excel table, click a cell inside it; Excel can use the table as the chart source and include new rows added later. For an ordinary range, select it with the mouse or click its first cell and use Ctrl+Shift+End on Windows when the used range is contiguous. On Mac, use Command+Shift+End where supported, or select the range directly to avoid including extra cells.
  5. Insert the treemap. On Windows, open the Insert tab, choose Insert Hierarchy Chart in the Charts group, and click Treemap. Excel creates the chart on the worksheet using the selected range. If Treemap is not visible in the first chart menu, look for the Hierarchy Chart option rather than selecting a pie or column chart. On Mac, go to Insert and find the Hierarchy chart choices; the button layout can differ by release. In Excel for the web, use the Insert chart options if Treemap is offered. If the option is missing, open the workbook in an up-to-date desktop version of Excel.
  6. Check that Excel understood the hierarchy. For a one-column category list, the chart should show separate rectangles for those categories. For multiple category columns, broader groups should contain smaller rectangles for the next level. If the nesting is not what you intended, use Chart Design > Select Data to inspect the chart’s source range, or delete the chart and select the correct columns in the correct order before inserting it again. Keep the measure column last and avoid selecting unrelated numeric fields.
  7. Add readable labels. Select the chart, then use Chart Design > Add Chart Element > Data Labels and choose an available label position. To adjust what appears, open More Data Label Options and use the Format Data Labels pane. Depending on the chart and Excel version, you can show category names and values. Start with category names; add values only if the rectangles have enough room. Very small tiles may not fit labels, and Excel may omit or crowd them. A chart title can be added from Chart Design > Add Chart Element > Chart Title.
  8. Format the chart and check its legibility. Use the chart’s Chart Design tab to try a different chart style or color palette. You can also select the chart title and type a specific, informative title, such as Sales by Department and Product. Resize the chart by dragging a corner handle, and move it away from dense worksheet data if labels are hard to read. Treemaps do not use conventional horizontal and vertical axes, so focus on clear labels, sensible color contrast, and enough chart area rather than looking for axis settings.
  9. Review the result against the source. Confirm that the largest tiles correspond to the largest values and that each nested group matches the intended parent category. Compare a few values with the worksheet, especially where categories have similar sizes. If the chart is for a report, make sure the reader can identify the measure and reporting period from the title or nearby text. Save the workbook after you are satisfied with the chart.

Common Mistakes

Including subtotals with detail rows: a parent total plus its individual child values duplicates amounts in the visual. Keep either the leaf-level records or a consistently aggregated set, not both. Leaving parent labels blank: blank cells can make the intended hierarchy unclear; repeat the parent name for each child row. Selecting unrelated columns: extra numeric fields may be interpreted as data or make the chart confusing, so select only the hierarchy labels and one measure. Using mixed units: a value of 500 dollars should not be compared directly with 500 items unless the intended comparison is explicitly meaningful. Expecting every label to fit: a treemap with many tiny tiles cannot display every name clearly. Filter or summarize the data instead of shrinking text until it becomes unreadable.

Tips

Sort the source data by parent category and then by value if that makes it easier to review; the chart’s area comparison comes from the values, not from the row order. Use concise category names and consistent naming, because long labels consume limited tile space. For a hierarchy with many levels, begin with two levels and add another only if it helps readers understand the data. Keep the title specific about both the measure and the subject. If you need to show change over time, create separate treemaps for comparable periods or choose a chart type designed for trends; a single treemap does not show the sequence of values over time. When the source is an Excel table, adding a new row can make the data easier to maintain, but check that the chart includes that row after updating the table.

Troubleshooting

The Treemap option is missing: confirm you are using a version of Excel that supports hierarchy charts, then check the Insert tab’s chart choices. Update Excel if needed, or open the workbook in the desktop app if you are using the web version and the chart option is unavailable.

The chart is blank or some tiles are missing: check that the selected range includes the numeric value column and that its entries are real numbers. Look for text-formatted numbers, blank cells, zeros, negative values, or accidental gaps in the source range. Correct the data, then select the chart and use Chart Design > Select Data to verify the source.

The nesting or labels look wrong: put the broadest category column first, followed by more specific category columns, and put the measure last. Repeat parent names on each detail row and remove subtotal rows. If the chart is difficult to read because it contains too many tiny rectangles, summarize or filter the data to a more useful level rather than trying to label every tile.

Colors or labels are hard to distinguish: enlarge the chart, choose a higher-contrast chart style, shorten long names in the source, or reduce the number of categories. If labels are no longer needed, select the chart and remove them with Chart Design > Add Chart Element > Data Labels > None. The exact label options can vary between desktop versions.

Frequently Asked Questions

What kind of data works best in an Excel treemap?
Use category labels arranged as a hierarchy, if applicable, and one positive numeric value for each lowest-level item. A compact list of sales by product or expenses by department is a good starting point.

Can an Excel treemap show more than one category level?
Yes. Put each level in its own column, from the broadest group to the most specific item, followed by the values. For example, Department, Product, and Sales creates department groups containing product tiles.

Can I make a treemap with negative numbers?
A treemap represents values as areas, so negative values do not make a meaningful tile size. Review the data and use a chart designed to show positive and negative amounts if both are important to the comparison.

How do I show the value on each rectangle?
Select the chart and choose Chart Design > Add Chart Element > Data Labels. Open the label options and enable Value if that option is available. Small rectangles may not have enough room to show both a name and a number.

Can the treemap update when I change the source data?
Yes. A chart linked to its worksheet data updates when the source values change. Using an Excel table can also help the chart source include rows added to the table, but verify the chart after adding data, especially if the new rows are outside its current source range.

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.