Excel Chart Millions Format: Axis Labels in Millions
In this article
To show chart axis values in millions in Excel, right-click the value axis, choose Format Axis, open the Number section, and enter a custom format code such as #,##0,,"M" in the Format Code box. Each trailing comma divides the displayed number by a thousand, so two commas turn 25,000,000 into 25M without changing the underlying data. The same custom code works on data labels, and the same idea handles thousands (one comma) and billions (three commas).
This guide is written for Excel on Windows and Mac desktop. Menu labels can differ slightly by version and region, and Excel for the web has a reduced Format Axis pane, so a few steps below may not be available there.
What You'll Need
- Excel for Windows or Mac (desktop version recommended for full axis formatting)
- A chart already created from your data, with a value axis showing large numbers
- Your source numbers stored as real numbers, not text
Step-by-Step
- Select the chart. Click once inside the chart area so the chart tools appear on the ribbon.
- Click the value axis. Click directly on the numbers running along the vertical axis (or the horizontal axis on a bar chart). Small handles appear around the axis when it is selected. If clicking is fiddly, use the Chart Elements button (the plus sign at the top-right of the chart) and hover over Axes to confirm you have the value axis rather than the category axis.
- Open Format Axis. Right-click the selected axis and choose Format Axis. A task pane opens on the right side of the window.
- Find the Number section. In the Axis Options tab, scroll down and expand Number. If you cannot see it, make sure Axis Options (not Text Options) is selected at the top of the pane.
- Choose Custom. Open the Category dropdown and select Custom.
- Type the format code. In the Format Code box, enter:
#,##0,,"M"
This shows whole millions with a thousands separator and an M suffix, so 25,000,000 displays as 25M. For one decimal place use#,##0.0,,"M"(25.0M). For thousands use one comma:#,##0,"K". For billions use three:#,##0,,"B"(adjust the suffix accordingly). - Apply it. Click Add if your version shows that button, or simply press Enter or click elsewhere in the pane. The axis labels update immediately.
- Repeat for data labels if needed. If you show values on the chart, click a data label, open Format Data Labels, expand Number, choose Custom, and paste the same code. This keeps axis and labels consistent.
- Check the axis title. If the axis title still says the raw unit, edit it to read something like "Revenue (millions)" so readers know the scale. Double-click the axis title text to edit it.
- Save the workbook. The custom format is stored with the chart, so it persists when you reopen the file.
Common Mistakes
- Using one comma instead of two. One comma divides by a thousand, not a million. Two commas are required for millions.
- Formatting the category axis. Text categories ignore number formats. Make sure you selected the value axis.
- Typing the M without quotes. Letters in a custom code need double quotes (
"M"), otherwise Excel may reject the code or treat the letter as a date or placeholder. - Changing the cell data instead. Dividing your source cells by a million alters the real values and breaks totals. Format the chart, not the data.
- Numbers stored as text. If axis values behave oddly or the format has no effect, check that the source cells are numeric. A green triangle in the corner of a cell is a common clue.
- Expecting Excel for the web to match. The browser version offers fewer axis number options; open the file in desktop Excel if the Custom category is missing.
Tips
- The comma trick works in cells too: select cells, press Ctrl+1 (Cmd+1 on Mac), choose Custom, and enter the same code. The underlying value stays intact for formulas.
- Use
#,##0.0,,"M"when differences between bars are small; one decimal keeps them readable. - Keep the axis title unit and the suffix consistent. If labels say M, the title should not also say "in millions" in a way that reads as double counting.
- For a quick alternative, some versions offer a Display units dropdown in Format Axis where you can pick Millions. It is simpler but less flexible than a custom code, and availability varies.
- Apply the same code to a second chart by copying the formatted axis and pasting it onto the other chart's axis, or by reusing the format code from the dropdown list.
Troubleshooting
The axis still shows full numbers. Confirm you edited the value axis and that Custom is selected in the Category dropdown. Re-enter the code and press Enter.
Excel rejects the format code. Check the quotation marks around the suffix and that you used straight quotes, not curly ones. Remove any stray spaces.
Labels show 0M or strange values. The source cells are probably text or contain errors. Convert them to numbers (Data tab, Text to Columns, or multiply by 1 in a helper column) and refresh the chart.
Only some labels changed. You may have formatted a single label rather than the whole axis or label set. Select the axis or the full label series and reapply.
The Format Axis pane looks different. Excel for the web and older versions vary. Try the desktop app, and remember that labels can differ by version and region.
Frequently Asked Questions
Why two commas instead of one?
Each comma after the number placeholder scales the display down by a factor of 1,000. Two commas divide by a million, three by a billion.
Does this change my actual data?
No. Number formats only change how values are displayed. The stored numbers and any formulas that use them are untouched.
Can I show millions without the M?
Yes. Use #,##0,, and put the unit in the axis title instead, for example "Revenue (millions)".
Can I use this on a pie chart or data labels only?
Pie charts have no value axis, but you can apply the same custom code to data labels through Format Data Labels and the Number section.
Will the format survive if I copy the chart to PowerPoint?
Yes, when you paste the chart as a chart object or picture, the formatted labels carry over. Pasting as a linked chart keeps the link to the workbook.
Why does the custom option not appear?
You are likely in Excel for the web or a version with a simplified pane. Open the file in desktop Excel to access custom number formats.