To create a basic treemap chart in Excel, arrange your categories in columns from broadest to most specific, put a positive numeric value in the last column, select the data, then choose Insert > Insert Hierarchy Chart > Treemap. Excel turns the values into nested rectangles: larger values get more area, making it easy to compare parts of a whole and spot the biggest contributors. You will get the clearest result when each row represents one item at the lowest level of your hierarchy.
What You’ll Need
- Excel for Microsoft 365 on Windows, or a recent desktop version of Excel that includes hierarchy charts. The Treemap chart type is available in Excel 2016 and later.
- A small, tidy table with one column for each category level and a final column of positive numeric values, such as sales, units, or file sizes.
- A header row and at least a few records. A hierarchy with two or three levels is a good place to start.
The directions below use Microsoft 365 for Windows. In current Mac desktop versions, select the data and use Insert > Hierarchy > Treemap; wording and ribbon placement can vary slightly by release. If Excel for the web does not show Treemap in its chart options, open the workbook in desktop Excel to create or edit the chart.
Step-by-Step
- Plan the hierarchy. Decide what the largest grouping is and what the smallest items are. For example, you might organize revenue by Region, then Product Category, then Product. The broadest level belongs in the leftmost column; each column to its right should describe a more specific level. The final column will contain the measurement that determines rectangle size.
- Enter the data as one row per leaf item. Create a simple table such as Region | Category | Product | Sales. A few example records could be West | Hardware | Drill | 42000; West | Hardware | Saw | 28000; West | Software | Design app | 18000; East | Hardware | Drill | 31000; and East | Software | Design app | 12000. Use actual numbers in the Sales column, not values typed with currency symbols as text. In this example, each product record is a leaf, and the repeated region and category names tell Excel how the leaves belong together.
- Add useful column headers and check the values. Put a distinct heading at the top of every column, such as Region, Category, Product, and Sales. Make sure the value column contains numeric entries and that the labels do not contain accidental blank rows or merged cells. Treemaps are designed to show positive part-to-whole values. A zero has no visible area, and negative values cannot be represented as ordinary rectangle sizes, so review or exclude them before charting. Do not include a grand-total row alongside the detail records: doing so counts the total as an additional item and distorts the chart.
- Select the complete data range. Click a cell in the data, then select the entire table including the headers. If the range is contiguous, clicking inside it and pressing Ctrl+A usually selects the current data region; check that all hierarchy columns and the value column are included. On Mac, use Command+A after clicking in the table, and check the selection before proceeding. If the data is an Excel table, clicking inside it is often enough for Excel to use the whole table.
- Insert the treemap. On the Windows ribbon, select Insert > Insert Hierarchy Chart > Treemap. The chart appears on the worksheet, generally with each nested level represented by colored groups of rectangles. If the chart button is unavailable, confirm that you selected a range with category fields and a numeric values field, and that you are using a desktop Excel version with hierarchy charts.
- Check that Excel read the levels correctly. Look at the layout before formatting. The broadest categories should form the larger groups, with smaller category and item rectangles nested inside them. If the chart shows an unexpected arrangement, inspect the source headings and columns: Excel uses the order of the category columns to infer the hierarchy. A product name in the first category column, for example, can make the chart group items by product rather than by region.
- Add a chart title. Click the chart, then click the Chart Title box and type a concise description such as Sales by Region, Category, and Product. If the title is not showing, select the chart and use Chart Design > Add Chart Element > Chart Title, then choose an appropriate placement. A clear title helps readers understand both the subject and the measure being visualized.
- Show and adjust data labels. Select the chart, then use Chart Design > Add Chart Element > Data Labels to choose a label position if labels are available in your version. You can also use the green plus button next to the chart in Windows to turn Data Labels on. To change which label details appear, right-click a label and select Format Data Labels. Options depend on the chart and Excel release; category names and values are useful, but displaying every detail can make small rectangles unreadable. If labels overlap or disappear, use fewer label details or enlarge the chart.
- Resize and place the chart. Drag a corner handle to make the chart larger, or use the Chart Design tab to choose a visual style. A wider chart can help long category names fit; a taller chart may make a deep hierarchy easier to inspect. Keep the chart close to the table or on a dedicated chart sheet, depending on how it will be read. Check it at the size people will actually see or print it.
- Test the chart with a quick review. Compare a few large and small values in the table with their rectangles. A value that is about twice another should occupy roughly twice the area within the same overall chart, though exact shapes and layout are arranged automatically. Confirm that all intended records appear, that no total is double-counted, and that the labels and title explain what the rectangles represent.
For the example records, the listed sales total 131,000. West accounts for 88,000 and East for 43,000, so West should occupy roughly two-thirds of the chart area and East about one-third. The chart is useful for comparing contribution at a glance; it is not a substitute for reading exact figures when close numerical comparisons matter.
Common Mistakes
- Putting the value field in the wrong place. Keep the numeric measure in the last column, after the hierarchy labels. If it is mixed into the category fields, Excel may interpret numbers as labels rather than sizes.
- Including a total and its underlying detail. A total row is not a harmless summary in a treemap. It becomes another rectangle, making the overall proportions misleading. Chart either the detail rows or a set of summary rows, not both together.
- Using inconsistent names. Entries such as North, N, and Northern may be treated as different groups. Standardize spelling, punctuation, and spacing so each intended category is grouped consistently.
- Expecting negative numbers or blank categories to behave like normal values. Treemaps rely on positive rectangle areas. Decide how to handle missing, zero, or negative records before creating the chart, and explain any exclusions when the chart is shared.
- Trying to show too many labels. A chart with hundreds of small items may have rectangles too small to label. Use a summary level, filter the source to a meaningful subset, or provide the detailed records separately.
Tips
- Convert the source range to an Excel table with Ctrl+T on Windows (Control+T on Mac). Tables make it easier to maintain a consistent header row and expand the data range as you add records. Check that the chart includes newly added rows; if not, adjust its source data through Chart Design > Select Data.
- Keep category levels consistent. If some records have a missing middle-level category, fill it with a meaningful label such as Unassigned rather than leaving the hierarchy ambiguous.
- Use short, reader-friendly labels. If the underlying names are long, make a separate display-name column or shorten the labels in the source while preserving the full names elsewhere.
- Choose colors that distinguish groups without implying more than the data supports. Treemap colors are useful for separating categories, but area—not color intensity—is the main encoding for value. Avoid relying on color alone to communicate a critical distinction.
- For a presentation, consider adding a small note with the period, unit, and any exclusions, such as Revenue in thousands, Q2, excluding refunds. This prevents a colorful chart from being separated from the context needed to interpret it.
Troubleshooting
The Treemap option is missing. Confirm that you are using Excel 2016 or later and that the workbook is open in desktop Excel. Select a rectangular range containing category columns and a numeric value column, rather than selecting only the numbers or a chart object. If using the web version and the command is not available, open the workbook in the desktop app.
The chart is blank or some items are missing. Check that the values are numeric, not numbers stored as text, and that the source range includes the intended rows. Look for blanks, zeros, negative values, filters, or hidden records that may affect what is plotted. Try selecting the full source range again and inserting a fresh chart to distinguish a selection issue from a formatting issue.
The groups appear in the wrong order or at the wrong level. Recheck the order of the category columns. Put the parent field first and the most specific item field immediately before the value column. Ensure that repeated parent labels are spelled identically. If the source uses a different layout, reorganize it into one row per leaf item before charting.
The values look exaggerated or do not add up as expected. Search for duplicate detail records and grand totals included with the detail. Confirm that every value uses the same unit and that no numbers are stored as text. For the example, West’s values sum to 88,000 and East’s to 43,000, for 131,000 overall; if the displayed proportions do not broadly reflect that split, revisit the source data and selected range.
Labels are hard to read. Increase the chart size, shorten category labels, or show fewer label details. Small rectangles cannot always fit text, even when labels are enabled. If the hierarchy is too deep or the dataset is too large, create a simpler treemap at a higher level and keep the detailed table available for exact lookup.
Frequently Asked Questions
What is a treemap chart best used for?
It is useful for showing how positive values contribute to a whole across nested categories, such as sales by region and product. It is especially helpful for spotting large contributors, but a table or bar chart may be easier for precise comparisons.
How should I arrange data for a treemap in Excel?
Use one column for each category level, ordered from broadest to most specific, followed by one numeric value column. Put one record for each lowest-level item on each row, and use headers for every column.
Can an Excel treemap show negative values?
Not as ordinary proportional areas. A negative value has no positive rectangle area, so correct the source or make a clearly explained separate view that handles negative figures appropriately. Do not silently treat a negative as a positive.
Can I change the colors and labels?
Yes. Select the chart to use Chart Design options for styles and chart elements, and right-click a data label to open Format Data Labels. Available label choices depend on the Excel version, and labels may not fit in small rectangles.
Will the chart update when I add data?
If the chart is based on an Excel table, it can often include new table rows automatically, but verify the result after adding records. For a normal range, use Chart Design > Select Data to expand the chart’s source range if the new rows are not included.
Can I make a treemap in Excel for Mac?
Recent desktop versions of Excel for Mac include hierarchy charts. Select the data and look under Insert > Hierarchy for Treemap; the exact ribbon wording may differ by release. If the option is absent, update Excel or use a desktop version that supports hierarchy charts.
Related
- How to Insert a Leader Line in Microsoft Word
- How to Insert a Line Above a Letter in Microsoft Word
- How to Insert a Line Above a Table in Word
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Best Excel Gantt Chart Templates for Every ProjectFor most projects, the Vertex42 Gantt Chart Template is the best place to start: it gives you a…
- Excel Graph: Show Only Dates With DataYes. To make an Excel graph show only the dates represented by its data, set its horizontal category…
- How to Make an XY Graph in Google SheetsTo make an XY graph in Google Sheets, put your X values in one column and your matching…
- Excel Gantt Chart: Build, Format, and Manage a ScheduleYes. An Excel-based Gantt chart is a project schedule displayed as task rows and date columns, with colored…
- Excel Pivot Tables: Summarize Dates by MonthYes. In Excel for Microsoft 365 on Windows, put your dates in a PivotTable, right-click a date in…
- Excel Bar Graph Creation: Steps, Tips, and FixesTo create a bar graph in Excel for Microsoft 365 on Windows, select a labeled data range, then…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.