N function
Converts a value to a number: numbers stay as they are, dates become serial numbers, TRUE becomes 1, and text or FALSE becomes 0.
Available in All versions of Excel, including Microsoft 365 and Excel for the web
In every Excel versionWorks in Google Sheets
Syntax
N(value)| Argument | What it means | |
|---|---|---|
value | Required | The value to convert. |
Returns: A number: the value itself for numbers, the serial number for dates, 1 for TRUE, 0 for FALSE and text; errors are passed through.
How N works
N turns whatever it is given into a number, as far as possible. A number comes back unchanged, a date comes back as its serial number, TRUE becomes 1 and FALSE becomes 0. Text — including text that looks like a number, such as "189" — becomes 0. An error stays an error.
You rarely need N for calculations, because Excel converts values automatically in most formulas. It has two classic uses. First, safe arithmetic over cells that may contain a label instead of a number: =N(B2)*C2 returns 0 instead of #VALUE! when B2 holds text. Second, adding a comment inside a formula: +N("note") adds 0, so the note sits in the formula bar without changing the result.
Examples
1A date becomes its serial number
| A | B | C | |
|---|---|---|---|
| 1 | Order | Due date | |
| 2 | SO-114 | 2026-03-15 | 46096 |
Result: 46096
Excel stores 15 March 2026 as the serial number 46096 (days since 1 January 1900, with 1 January 1900 = 1). Format the result as General to see it.
2Text becomes 0 in a calculation
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Item | Qty | Price | |
| 2 | Paper | tbc | 15 | 0 |
| 3 | Toner | 5 | 90 |
Result: 0
The quantity is the text tbc. =B2*C2 would show #VALUE!; with N the text counts as 0, so the line total is 0 until a real quantity is entered.
3A note inside a formula
| A | B | |
|---|---|---|
| 1 | Month | Sales |
| 2 | Jan | 4200 |
| 3 | Feb | 3900 |
| 4 | Mar | 5100 |
| 5 | 13200 |
Result: 13200
N of a text string is 0, so the total is unchanged: 4,200 + 3,900 + 5,100 = 13,200. The note documents the formula for whoever opens it next.
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#N/A, #DIV/0!, ... | N passes errors through unchanged. | Wrap the source in IFERROR if errors should become 0. |
Tips
- N does not convert numbers stored as text —
N("189")is 0. Use VALUE or--B2for that. - The text counterpart is T, which returns text values and turns everything else into empty text.
Google Sheets
N also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
N in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.