Category: FUNCTION | Updated: 2026-11-22

How to Use the N Function | Convert Values to Numbers and Add Comments Inside Formulas

Syntax

=N(value)
  • value: Specifies the value or cell reference you want to convert to a number.

Practical Table Example

This example converts various data in column A into numbers using the N function.

Cell Input Value Formula Result How Conversion Works
A2 250 =N(A2) 250 Numbers are returned as-is
A3 2026/11/22 =N(A3) 46348 Dates are converted to serial values
A4 TRUE =N(A4) 1 TRUE becomes 1, FALSE becomes 0
A5 Excluded =N(A5) 0 All text strings become 0
A6 =1/0 =N(A6) #DIV/0! Error values are returned as-is

Common Errors and Precautions

  • Numeric strings are not converted: Passing a number stored as text such as "100" to the N function returns 0, not 100. Use the VALUE function to convert numeric strings into numbers.
  • Precaution for in-formula comments: When leaving a note such as =SUM(A2:A5)+N("November total"), use it only on formulas that return a numeric result. Adding +N(...) to a formula that returns text causes a #VALUE! error.

Frequently Asked Questions

Q. What happens if you pass text to the N function?

A. When text is specified, '0' is returned. Using this property, you can embed comments at the end of a formula such as '+N("note")'.

Q. What does the N function return when given a date?

A. It returns the 'serial value' (the number of days elapsed since December 30, 1899 as 0) managed internally by Google Sheets.