Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Google Sheets N Function: How to Use It

· 4 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

The N function in Google Sheets converts a value to a number: text becomes 0, dates and times become their underlying serial numbers, TRUE becomes 1, FALSE becomes 0, and numbers stay unchanged. It is mainly used to force numeric output in formulas that would otherwise return text or errors, such as when summing mixed data or building conditional calculations.

What You'll Need

  • A Google account with access to Google Sheets (free with any Google account).
  • A spreadsheet open in a browser or the Google Sheets mobile app.
  • Basic familiarity with entering formulas (starting with =).

Step-by-Step

  1. Open your spreadsheet. Go to sheets.google.com and open an existing file or create a new blank spreadsheet. On mobile, open the Google Sheets app and tap the file.
  2. Select the cell where you want the result. Click or tap the cell. This is where the converted number will appear.
  3. Type the N formula. Start with an equals sign, then N and an opening parenthesis. For example, to convert the value in cell A1, type =N(A1). To convert a literal value, type =N("hello") or =N(TRUE).
  4. Press Enter (or the checkmark on mobile). The cell now shows the numeric result: 0 for text, 1 for TRUE, 0 for FALSE, the serial number for a date, and the original number for numeric input.
  5. Copy the formula down or across if needed. Drag the fill handle (the small square at the bottom-right of the cell) to apply the same conversion to a range. Relative references adjust automatically.
  6. Use N inside a larger formula when you need a numeric fallback. For example, =SUM(N(A1),N(B1)) adds the numeric versions of two cells, treating any text as zero instead of causing an error. Another common pattern is =IF(N(A1)=0,"missing",A1) to flag non-numeric entries.
  7. Check the result against the original data. If a cell that looks like a number returns 0, the value is probably stored as text (for example, imported with a leading apostrophe or formatted as plain text). Convert it with VALUE or by re-entering it as a number.

Common Mistakes

  • Expecting N to parse numeric text. N("123") returns 0, not 123. Use VALUE("123") or --"123" to convert text that looks like a number.
  • Assuming N converts dates to readable text. N returns the date's serial number (days since December 30, 1899 in Sheets). Format the result as a date if you need it displayed that way.
  • Using N on ranges. N accepts a single value, not a range like A1:A10. For ranges, use ARRAYFORMULA(N(A1:A10)) or apply N per cell.
  • Confusing N with NUMBERVALUE or TO_NUMBER. N does not handle locale-specific decimal separators or currency symbols; those functions do.
  • Forgetting that errors pass through. N does not suppress errors like #DIV/0! or #N/A; wrap with IFERROR if you need a clean fallback.

Tips

  • Use N to build robust sums when a column may contain notes or blanks: =SUM(ARRAYFORMULA(N(A1:A10))) treats text as 0 and adds only numbers.
  • Combine N with IF to create flags: =IF(N(A1)=0,"text or blank","number") quickly identifies non-numeric cells.
  • N is useful in array formulas where you need a consistent numeric type before applying math functions.
  • For boolean logic, N(TRUE)=1 and N(FALSE)=0 lets you count TRUE values with SUM: =SUM(ARRAYFORMULA(N(A1:A10))) counts TRUEs if the range contains booleans.
  • Remember that N returns 0 for empty cells, which can affect averages and counts; use COUNT or AVERAGE with care.

Troubleshooting

If N returns an unexpected 0 for a cell that looks numeric, the cell is likely formatted as text. Select the cell, then use Format > Number > Automatic or re-enter the value. If you see a #NAME? error, check that you typed N correctly and that the formula uses commas (or semicolons, depending on your locale) as argument separators. If N returns a date serial number instead of a date, apply date formatting to the result cell. If N inside an array formula does not spill as expected, ensure the range is correct and that the formula is entered in a single cell with ARRAYFORMULA. For errors like #VALUE!, verify that the argument is a single value, not a range, and wrap with IFERROR if needed.

Frequently Asked Questions

What does the N function do in Google Sheets?

N converts a value to a number: text becomes 0, TRUE becomes 1, FALSE becomes 0, dates become serial numbers, and numbers are returned unchanged.

Does N convert text that looks like a number?

No. N("123") returns 0. Use VALUE or the double unary operator (--) to convert numeric text.

Can N handle a range of cells?

No, N takes a single value. Use ARRAYFORMULA(N(A1:A10)) to apply it to a range.

Why does N return 0 for a date?

N returns the date's serial number, which may display as 0 if the cell is formatted as a number with no decimal places and the date is before the epoch. Format the result as a date to see it correctly.

Is N the same as TO_NUMBER?

No. TO_NUMBER is not a Google Sheets function; N is a legacy compatibility function. For text-to-number conversion, use VALUE.

Does N work in array formulas?

Yes, when wrapped in ARRAYFORMULA, N can process a range and return an array of numbers.