N Function (LibreOffice Calc)
Understand LibreOffice Calc N type conversion. Compare numeric values, logical values, numeric text, blanks, dates and errors without mistaking N for a text-number parser.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: N preserves numbers, maps TRUE/FALSE to1/0 and maps text to0. It propagates errors and does not parse numeric-looking text.
Availability and version history
- Introduced: Documented by LibreOffice 26.8.1.1; original introduction not established.
- Availability: Supported in LibreOffice 26.8.1.1, verified against its function registry. This identifies a supported release, not a final working version.
- Scope: Desktop Calc, using the English function name. Availability in other spreadsheet applications is separate.
- Checked: 2026-10-14 — function reference; versioned support. Documentation/source check; not a new native test. Existing example-specific test claims below retain their stated scope.
The N function in LibreOffice Calc is used for this task: Converts a value to a number. Convert a Boolean TRUE value into a numeric value.
This guide explains how to read the formula, reproduce a concrete example, interpret its result and recognize common input mistakes.
Syntax and arguments
N(value)
| Argument | Required? | Meaning |
|---|---|---|
Value |
Yes | The value to be interpreted as a number. |
Calc formulas normally use semicolons (;) between arguments in common configurations; the displayed separator may depend on settings or locale.
Worked example
=N(TRUE())
Expected result: 1.
Why it works: Convert a Boolean TRUE value into a numeric value.
How to use it in your own spreadsheet
- Identify the cells or inputs that correspond to the sample values above.
- Enter the formula in an empty cell, changing the references or literal values to match your sheet.
- Compare the output with a manual check on a small known example.
- Extend the formula to a larger dataset only after you understand the result.
Common problems and practical checks
- Be explicit about the difference between TRUE/FALSE, zero, blank cells and text values.
- Consider how errors are handled instead of automatically suppressing them.
- A pasted formula may produce an error when it uses the other program’s argument separator or unsupported options.
Additional worked application and edge cases
Conversion rules that matter
N applies a type-based conversion. It is not a general parser for imported numbers.
| Input kind | Expected N result |
|---|---|
| Numeric value | The same numeric value |
| TRUE | 1 |
| FALSE | 0 |
| Text, including numeric-looking text | 0 |
| Empty cell reference | 0 |
| Error value | The same error is propagated |
A date or time stored as a normal Calc number remains its underlying serial number. Changing its display format does not change that stored value. A string that looks like a date remains text and becomes0 rather than being parsed as a date.
Stepwise example: compare stored types
Put 12.5 as a number in A2, the formula ="12.5" in A3, =TRUE() in A4, =FALSE() in A5, and leave A6 genuinely empty. In B2 enter =N(A2) and copy through B6.
Expected outputs are 12.5, 0, 1, 0, 0. A2 and A3 can look almost identical on screen, but their stored types differ. The formula =ISTEXT(A3) is expected to return TRUE and helps expose the difference.
If imported numeric text should become a number, VALUE is the relevant parsing operation, subject to locale and text format. Replacing it with N would silently turn the text into0 and could corrupt totals.
Second example: a date’s serial value
With Calc’s standard December30,1899 date origin, =N(DATE(2026;1;1)) is expected to return 46023 when displayed with a normal numeric format. The serial was independently checked as the day difference from that origin.
A document using a different date origin can produce a different serial. This example is intentionally scoped to the stated setting. N does not transform the serial into a year number or count days from today.
Advanced application: turn a comparison into an indicator
For a numeric result of80 in D2, =N(D2>=75) has expected result 1; changing D2 to70 gives 0. This is useful when a model deliberately needs a numeric indicator rather than TRUE/FALSE.
Keep the comparison and data validation clear. N does not itself check that D2 is a suitable numeric measurement, and a type mismatch in an earlier step can change the comparison’s meaning.
Error propagation and troubleshooting
The official example =N(1/0) returns #DIV/0!. N is not an error-suppression function, and a zero result does not prove that the input was a valid numerical zero. It may have been FALSE, empty or text.
Likewise, =N("") returns0 because empty text is still text. If empty text, an empty cell and a real zero need distinct treatment, inspect them before conversion with ISTEXT, ISBLANK or an explicit validation rule. Once all are collapsed to0, N’s output alone cannot recover the original type.
The English formulas here use semicolons where there are multiple arguments. Decimal separators and date formatting follow document locale; distinguish how a number is displayed from whether a string can be parsed.
Verification scope for this addition: These added results were independently calculated or derived from the cited documentation/source. They were not newly tested in LibreOffice Calc. The original example-specific Calc 25.2.3.2 claims elsewhere on this page remain historical and apply only to those original examples. The cited 26.8.1.1 source tag is a code reference, not a claim of a new run in that release.
Related functions
Documentation and verification
- LibreOffice Calc Help
- The standalone example was calculated using LibreOffice Calc 25.2.3.2 on October 9, 2026 and its computed result matched the expected value. This does not certify every option, version, or other example.