To show Excel chart data labels in millions, select the labels, open Format Data Labels, then under Number enter #,##0.0,,"M" in Format Code and choose Add. The two commas scale the displayed number by one million; the underlying worksheet values stay unchanged.
What the millions format does
Excel’s custom number formats can change how a number appears without changing the number stored in a cell or plotted in a chart. In a format such as #,##0.0,,"M", the two commas after the number placeholders tell Excel to display the value divided by 1,000 twice: first by 1,000, then by another 1,000. The quoted M is a literal character added to the displayed label.
For example, a chart point with a value of 1,260,000 appears as 1.3M with that format. Its actual value remains 1,260,000, so calculations, chart scaling, and source data are not converted. This is a display choice, not a data transformation.
The format’s placeholders also control the appearance:
#,##0,,"M"displays whole millions, such as 1M.#,##0.0,,"M"displays one decimal place, such as 1.3M.#,##0.00,,"M"displays two decimal places, such as 1.26M.
The comma before the decimal placeholder adds thousands separators to the displayed number where relevant. Since the value is scaled to millions, those separators will usually be most noticeable in values of a billion or more, such as 1,250M.
Apply a custom format to chart data labels
These steps are for Excel for Microsoft 365 on Windows. First make sure the chart has data labels. Select the chart, then use Chart Design > Add Chart Element > Data Labels and choose a position, or use the chart’s plus button and turn on Data Labels. If labels are already present, you can skip this step.
- Click a data label once to select all labels in that series. If you click again on one individual label, Excel may select just that point’s label; click a blank area of the chart and try again if needed.
- Right-click a selected label and choose Format Data Labels. The formatting pane opens. You can also select the labels and press Ctrl+1 on Windows to open the format pane.
- In the pane, open Number. If Linked to source is checked, clear it when you want the chart labels to use a format independent of the source cells.
- Choose Custom if a category selector is shown, enter
#,##0.0,,"M"in Format Code, then select Add. The selected labels should update to show millions.
Excel for Mac has the same general approach: select the chart labels, open the formatting pane for the labels, and set the custom code under Number. The exact pane layout can vary by release. In Excel for the web, chart-formatting controls may be more limited than in the Windows desktop app; if the Number section does not offer the custom-code control, open the workbook in the desktop app to apply the format.
Choose precision that suits the chart
The right number of decimal places depends on the size of the values and the point the chart needs to make. Whole millions are compact, but can conceal meaningful differences. A value of 1,240,000 becomes 1M with no decimal places, while one decimal place displays it as 1.2M. Two places display it as 1.24M.
Remember that displayed labels are rounded. A value of 1,249,999 shown with one decimal place appears as 1.2M; 1,260,000 appears as 1.3M. If readers need to compare close values, use more precision or provide the exact figures in a table or accompanying note. Adding many decimal places, on the other hand, can make a crowded chart harder to read.
Small values need special attention. With one decimal place, 250,000 displays as 0.3M. That may be mathematically reasonable but less intuitive than 250K. If the data ranges from thousands to billions, consider whether one unit is appropriate for every point, or whether a separate view or table would communicate the figures more clearly.
Format labels without changing source cells
A chart label can use its own number format, or it can inherit formatting from the cells that supply the values. Keeping Linked to source selected is useful when the worksheet’s cell format is already the one you want and you want labels to follow later changes. Clear the checkbox when you want the chart to show millions while the worksheet continues to show full values.
For instance, a source cell can display 1,260,000 with separators while its chart label displays 1.3M. The cell still contains the full number. This distinction matters if someone reads the worksheet, copies values, or uses them in formulas: number formatting does not replace the stored data.
If the custom label format appears to have no effect, check whether Linked to source is enabled and whether the code was added. Also check that you formatted the labels rather than the chart axis. Labels and axes have separate format settings, even though they may display the same series.
Use separate formats for negatives and zero
A custom number format can specify different appearances for positive numbers, negative numbers, and zero. Sections are separated by semicolons in this order: positive; negative; zero; text. For example, #,##0.0,,"M";(#,##0.0,,"M");"-" displays positive values with an M suffix, puts negative values in parentheses, and displays zero as a dash.
Test a multi-section format against the actual range of your data. The zero section changes how zero appears, but it does not hide a small nonzero value that rounds to 0.0M. For example, 20,000 formatted to one decimal place in millions can appear as 0.0M. If that could mislead readers, show additional decimal places, use thousands instead, or choose a different label strategy.
You can include a currency symbol when appropriate. A format such as $#,##0.0,,"M" displays a value of 1,260,000 as $1.3M. Currency symbols and separators can depend on the workbook’s regional settings; check the result in your own Excel installation and use a consistent convention throughout the chart.
Data labels and axis labels are different
Formatting data labels changes the numbers printed next to individual chart points. It does not automatically change the vertical or horizontal axis. If the axis still shows full values, format it separately: select the axis, open Format Axis, and use the Number section to enter the appropriate custom format. In some chart types, the axis pane also provides display-unit choices such as millions; those choices affect the axis scale, not necessarily the data labels.
Data labels and axis display units can be combined, but avoid communicating the same scaling twice. If the axis is labeled in millions and the data labels also carry an M suffix, readers should be able to tell that both represent millions. A clear axis title such as “Revenue (millions of dollars)” can help, but if the labels themselves show $1.3M, make sure the axis description does not imply a different unit.
Common problems and how to fix them
- The labels show full values: Confirm you selected the data labels, not the series or axis. In the Number section, clear Linked to source if it is overriding the custom label format, then apply the code again.
- The M does not appear: Put the literal letter in straight quotation marks in the format code, as in
#,##0.0,,"M". The quotation marks tell Excel to display M as text rather than treat it as part of the format syntax. - The result is far too small: Check the number of scaling commas. One trailing scaling comma divides by 1,000; two divide by 1,000,000. A third comma would scale by another factor of 1,000.
- Only one label changes: You may have selected a single data point’s label. Select the series labels as a group to apply the format to all of them, or repeat the process for other series.
- Small values appear as 0.0M: Increase the decimal precision or choose a smaller display unit. Formatting rounds what is shown; it does not change the source value.
- Labels become crowded or overlap: Reduce decimal places, change the label position, enlarge the chart, or label only the most important points. A technically accurate format can still be difficult to read when too many labels compete for space.
Keep the chart readable and interpretable
Use one unit convention consistently across the chart, its title, and any notes. If the label says 1.3M, readers should not have to guess whether M means millions of units, dollars, or another measure. For financial values, include the currency in the label or make it explicit in the chart title or axis title. Avoid mixing values in thousands and millions without clearly identifying the difference.
Also consider whether every point needs a label. Dense line charts and charts with many categories can become cluttered even when values are abbreviated. You might label selected points, use a table beside the chart, or rely on a clearly scaled axis. The goal is not merely to shorten numbers; it is to make comparisons easy without hiding the scale or precision readers need.
Frequently Asked Questions
What Excel format code displays millions in chart labels?
Use #,##0,,"M" for whole millions or #,##0.0,,"M" for one decimal place. Apply it in the data label’s Format Data Labels > Number settings.
Does formatting a chart label in millions change the original data?
No. A number format changes how Excel displays the value, not the value stored in the worksheet or used to plot the chart.
How do I show two decimal places in millions?
Use #,##0.00,,"M". A value of 1,260,000 then appears as 1.26M, subject to normal display rounding.
Why does my chart axis still show full numbers?
Data labels and axes have separate formatting. Select the axis and format its Number settings independently, or use an available display-unit option in Format Axis.
Can I show negative values in parentheses?
Yes. Use a separate negative section, such as #,##0.0,,"M";(#,##0.0,,"M");"-". The first section applies to positives, the second to negatives, and the third to zero.
Related
- Move a Row Up or Down in Excel Without Losing Data
- How to Move Cells Down in Excel Without Overwriting Data
- How to Merge Cells in Excel: Steps and Safe Options
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Excel Line Chart With Multiple Lines: How to Create OneTo create an Excel line chart with multiple lines, put the shared categories—such as dates—in the first column…
- Excel Gantt Chart by Week: Build a Weekly TimelineTo make an Excel Gantt chart by week, list each task’s start and finish dates, put consecutive Monday…
- Excel Graph With Drop-Down Selection: Build a Dynamic ChartYes. In Excel for Microsoft 365 on Windows, create a drop-down with Data Validation, then connect a chart…
- Excel Combo and Stacked Charts: How to Combine ThemYes. In Excel for Microsoft 365 on Windows, you can combine stacked columns with another chart type, such…
- Add a Line to a Waterfall Chart in ExcelExcel for Microsoft 365 does not provide a supported Combo Chart option for adding a data-driven line series…
- Excel Line Chart With Two Y-Axes: How to Create OneYes. In Excel for Microsoft 365 on Windows, create a line chart, select the series that needs its…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.