In Excel, a “tree chart” usually means a Treemap: a chart that displays hierarchical categories as nested rectangles sized according to their values. To make one in Microsoft 365 for Windows, arrange category levels in separate columns and the numbers in the last column, select the data, then choose Insert > Insert Hierarchy Chart > Treemap.
What a tree chart means in Excel
Excel’s chart type is called a Treemap, rather than a tree chart. It is useful when you want to see how parts of a whole compare while also showing which smaller items belong to larger groups. The layout uses rectangles instead of the branches and nodes found in a family tree or organizational chart.
For example, a sales treemap could show regions, then departments within each region, then individual products within each department. The overall area represents the total value, and each product is shown as a smaller block inside its department and region. Larger values generally produce larger rectangles. The visual is therefore helpful for spotting which categories account for the biggest share at a glance.
A Treemap is not the best chart for every hierarchy. It emphasizes relative size and grouping, not a precise sequence or a detailed relationship between individual records. If you need to show reporting lines, a SmartArt organization chart may be more suitable; if you need to show a hierarchy with rings, consider a Sunburst chart.
Prepare the data for a Treemap
Set up the source as a simple table: put each level of the hierarchy in its own column, and put the value that determines rectangle size in the final column. Use one row for each lowest-level item, with its parent categories repeated on that row. Include a clear header for every column.
For instance, a small sales table might have the headers Region, Department, Product, and Sales. Rows could contain North, Software, Design app, 70; North, Software, Storage app, 30; North, Hardware, Keyboard, 20; and North, Hardware, Mouse, 10. Excel reads the columns as levels in the hierarchy, with Sales supplying the sizes. In this example the total is 130, and the two software products contribute 100 of it. The software group should occupy more area than hardware, while Design app should be larger than Storage app.
- Use consistent category names. Extra spaces or spelling variations can make what should be one category appear as separate labels.
- Use numbers for the size column, not amounts stored as text. Remove currency symbols typed into cells; apply a currency number format instead if needed.
- Keep the data rectangular and contiguous, with no blank rows, merged cells, or manually inserted subtotal rows in the middle.
- Summarize repeated records to the level you want to display. If the same product appears in many transaction rows, make a summary first so the chart shows a meaningful product total rather than a stack of repeated entries.
The order of the category columns matters because it defines which groups contain which items. Put the broadest category first and the most specific one immediately before the numeric values. If your data has only one category column and a value column, Excel can still make a Treemap, but it will show a flat set of blocks rather than a multilevel hierarchy.
Create a Treemap chart in Excel
- Click inside the prepared data range, or select the whole range including its headers.
- On the ribbon, choose Insert > Insert Hierarchy Chart > Treemap. In some ribbon layouts, the hierarchy-chart control is represented by an icon or appears within the Charts group.
- Excel inserts the chart on the worksheet. Drag a corner handle to resize it, and drag the chart itself to reposition it.
- Click the chart title and type a descriptive title, such as Sales by Region, Department, and Product.
If the chart includes the wrong rows or columns, select it and use Chart Design > Select Data to review the source range. If the chart is blank or does not resemble a hierarchy, check that the values are numeric and that category levels are arranged in columns before the value column. On Excel for Mac, use the Insert tab and look for Treemap under the hierarchy chart options; names and grouping can vary slightly between ribbon versions. The article’s menu path is for Microsoft 365 on Windows.
Read the rectangles and labels
In a Treemap, a parent category is represented by an area containing its child rectangles. The child blocks divide that parent’s space according to their values. The chart’s area is proportional to the data, but the exact shape and placement of blocks are chosen by the layout algorithm. Do not read a block’s width or height alone as a precise measurement; compare its overall area.
Labels can identify the categories, but they may become hard to read when the chart contains many small items or long names. With the chart selected, use Chart Design > Add Chart Element > Data Labels to add labels, then use the data-label formatting options to choose the information to display where available. You can also select the chart title and edit it, or use Chart Design > Change Colors to choose another palette. Keep in mind that color is a visual aid; rectangle size, not color intensity, represents the numerical value.
For a more readable chart, limit the number of levels and shorten labels in the source data when appropriate. A Treemap with hundreds of tiny blocks may technically include every record but communicate little. Consider grouping minor products into an “Other” category, or create a separate chart for a particular region or department.
Make the chart easier to maintain
If the source list will grow, convert it into an Excel table before creating the chart. Select a cell in the data and choose Insert > Table, confirm that the table has headers, and then build the Treemap from that table. Adding rows to a table can make the chart’s source easier to maintain than a fixed cell range, although you should check the chart after adding data to confirm the new rows are included.
For data that changes by reporting period, create a clean summary for the period you want to present and chart that summary. A Treemap is designed to show one set of values at a time; putting several months in the source as extra numeric columns does not automatically create a useful time comparison. To compare periods, make separate charts or choose a chart designed for change over time, such as a line chart.
It is also worth deciding whether rectangle size should represent sales, units, cost, or another measure. The chart cannot determine what “important” means: it simply sizes blocks from the numeric field you supply. A chart of revenue can look very different from a chart of profit or number of orders, so give the title and labels enough context to identify the measure.
Common problems and limitations
- Blocks appear at the wrong level: Check the column order. Excel uses the category columns as nested levels, so broad-to-specific order is important.
- One category appears more than once: Look for inconsistent spelling, spaces, or duplicate rows that were not summarized. A Treemap does not automatically clean up category names.
- Some blocks are missing or too small to label: Their values may be zero, very small compared with other values, or absent from the selected source range. Inspect the data and consider grouping small items.
- The chart is difficult to compare precisely: Treemaps are strongest for relative patterns, not exact comparisons between many similar-sized rectangles. Use a sorted bar chart when readers need to compare values accurately.
- Negative values cause problems: Rectangle area represents magnitude, so negative values do not fit the usual Treemap interpretation. Use a different chart or separate positive and negative measures rather than implying that negative amounts have ordinary positive area.
A further limitation is that the visual hierarchy is not a substitute for a clear data model. If a product can belong to multiple departments, repeating it under different parents may be valid for a specific analysis, but readers could mistake those entries for unique products. State what the grouping means and avoid presenting duplicated totals as though they were distinct items.
Treemap compared with Sunburst and other charts
Excel’s Sunburst chart also displays hierarchical data, but it uses concentric rings: the innermost ring is the top level and successive rings represent lower levels. It can make the levels of a hierarchy explicit, while a Treemap often makes it easier to use the available plotting area for many categories. Both can become crowded with long labels or too many leaves.
Choose a Treemap when the main question is “Which groups and items account for the largest share?” Choose a Sunburst when the reader needs to follow levels outward from a central category. For a reporting structure, use an organizational chart or SmartArt; for an ordered process, use a flowchart; for accurate ranking, use a bar chart. These visuals answer different questions, so the best alternative depends on whether the priority is hierarchy, sequence, or numerical comparison.
Frequently Asked Questions
Is a tree chart the same as a Treemap in Excel?
Usually, yes. Excel calls its nested-rectangle chart a Treemap. People may say “tree chart” informally, but that phrase can also refer to a family tree or an organizational diagram, which are different visuals.
Can I make a Treemap with only two columns?
Yes. A category column and a numeric value column can produce a Treemap with one level of blocks. To show nested groups, add another category column for each additional hierarchy level, keeping the value column last.
Why are some labels not showing?
Small rectangles may not have enough room for readable labels, and Excel may omit or limit labels to prevent overlap. Reduce the number of displayed items, shorten category names, enlarge the chart, or show only the most useful level of detail.
Can I use a Treemap to compare sales over time?
A Treemap shows the relative sizes in a selected set of values, not a time trend. Make separate Treemaps for different periods if the hierarchy comparison is important, or use a line or column chart when the main goal is to show how a measure changes over time.
Does a Treemap update when I change the source data?
It updates when values in its chart source change. New rows may require the source range to expand; using an Excel table can help keep an expanding list together, but verify that the chart includes added rows after changing the data.
When a Treemap is the right choice
Use a Treemap when the data has meaningful parent-and-child categories and the reader needs a quick view of relative contribution. Prepare the hierarchy carefully, select the Treemap option from Excel’s hierarchy charts, and keep labels and detail at a readable level. If the chart makes exact comparisons or the relationships difficult to understand, a bar chart, Sunburst, or diagram may communicate the same information more clearly.
Related
- Room List Template Excel: How to Build and Use One
- Resource List Excel Template: Set Up, Track, and Share
- Replace in Excel: Find and Replace Text, Values, and More
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- How to Make a Good Histogram in Excel: A Step-by-Step GuideTo make a good histogram in Excel, put your numeric measurements in one column, select the values, then…
- How to Put a Pivot Table in Google Sheets: Step by StepTo put a pivot table in Google Sheets, select a cell in your data, choose Insert > Pivot…
- Does Excel Have an Org Chart? How to Create OneYes. Microsoft Excel for Microsoft 365 includes an org chart option in SmartArt: select Insert > SmartArt >…
- Excel One Slicer for Multiple Pivot Tables: How to ConnectYes. In Excel for Microsoft 365 on Windows, one slicer can filter multiple PivotTables when they share a…
- Gantt Chart in Excel: Build a Project ScheduleCreate a Gantt chart schedule in Excel by listing tasks, start dates, and durations, then inserting a 2-D…
- Compare Two Excel Sheets With a Pivot TableTo compare two Excel sheets with a PivotTable, combine their rows into one table, add a column identifying…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.