# How to show numbers in thousands (K) and millions (M) in Excel

For a text label, pick the unit with IF and let TEXT scale the number: commas at the end of a format divide by 1,000 each, as in TEXT(B2,"0.0,,")&"M".

**Excel:** `=IF(B2>=1000000,TEXT(B2,"0.0,,")&"M",IF(B2>=1000,TEXT(B2,"0.0,")&"K",TEXT(B2,"0")))` (Every current version)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C |
| --- | --- | --- |
| Metric | Value | Label |
| Revenue | 1250000 |  |
| Pipeline | 48500 |  |
| Visitors | 3420000 |  |
| Signups | 9800 |  |
| Refunds | 725 |  |

Formula in C2, filled to C6: `=IF(B2>=1000000,TEXT(B2,"0.0,,")&"M",IF(B2>=1000,TEXT(B2,"0.0,")&"K",TEXT(B2,"0")))`

Result: 1.3M; 48.5K; 3.4M; 9.8K; 725

## How it works

A comma at the end of a number format divides by 1,000, and two commas divide by 1,000,000, so `"0.0,,"` turns 1,250,000 into 1.3. The IF picks the right scale and adds the letter. The result is text, which is what labels, titles and joined sentences need.

## Other ways

- `=IF(B2>=1000000,TEXT(B2,"$0.0,,")&"M",IF(B2>=1000,TEXT(B2,"$0.0,")&"K",TEXT(B2,"$0")))`: The same with a dollar sign in each format. ("$1.3M", "$48.5K" and so on.)

## Common mistakes

- The labels are text, so charts and SUM can't use them. To keep real numbers, use a custom number format instead: `[>=1000000]0.0,,"M";[>=1000]0.0,"K";0`.
- Values just under a million, like 999,960, round up to "1000.0K". Test against 999,950 if that matters.

## Questions

**How do I show thousands without a decimal?**

Use `TEXT(B2,"0,")&"K"`: 48,500 becomes "49K".

**Does this work in Google Sheets?**

Yes. TEXT with trailing commas works the same in Google Sheets.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/show-numbers-in-thousands-and-millions
