Contact

SIGN Function (LibreOffice Calc)

Math Beginner LibreOffice Calc Introduction not established

The SIGN function in LibreOffice Calc returns the sign of a number: 1 for positive numbers, -1 for negative numbers, and 0 for zero. Learn syntax, examples, common errors, and best practices.

Verification status: Consult the documentation, examples and any stated test scope below. How formula examples are checked

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 **SIGN** function returns the sign of a number in LibreOffice Calc. It outputs `1` for positive numbers, `-1` for negative numbers, and `0` when the input is zero. `SIGN` is widely used in financial modeling, normalization, directional logic, and formulas where the direction of a value matters as much as its magnitude.

What the SIGN Function Does

  • Returns 1 for positive numbers
  • Returns -1 for negative numbers
  • Returns 0 when the number is zero
  • Works with cell references, formulas, and expressions
  • Useful for directional logic, normalization, and modeling
  • Often paired with ABS for magnitude + direction calculations

It is designed to be fast, predictable, and universally compatible.

Syntax

SIGN(number)

Arguments

  • number:
    Any numeric value, cell reference, or expression.
    Examples:
    • -10
    • A1
    • A1 - B1
    • SUM(A1:A5)

Basic Examples

Determine the sign of a positive number

=SIGN(25)

Returns 1.

Determine the sign of a negative number

=SIGN(-12)

Returns -1.

Determine the sign of zero

=SIGN(0)

Returns 0.

Use SIGN with a cell reference

=SIGN(A1)

Returns the sign of the value in A1.

Advanced Examples

Normalize a value to ±1

=SIGN(A1)

Useful for direction-only logic.

Apply the sign of one value to the magnitude of another

=ABS(A1) * SIGN(B1)

Returns the magnitude of A1 with the sign of B1.

SIGN with IF for directional messages

=IF(SIGN(A1) = 1; "Positive"; IF(SIGN(A1) = -1; "Negative"; "Zero"))

Classifies the value in A1.

SIGN with calculations

=SIGN(A1 - B1)

Returns the direction of the difference between A1 and B1.

SIGN with SUM

=SIGN(SUM(A1:A10))

Determines whether the total is positive, negative, or zero.

SIGN for financial modeling

=SIGN(A1) * 100

Applies direction to a fixed magnitude.

Common Errors and Fixes

SIGN returns 0 unexpectedly

Possible causes:

  • The input expression evaluates to 0
  • A number is stored as text
  • A referenced cell is empty

Fix:
Convert text to numbers using:
Data → Text to Columns → OK

SIGN returns 1 or -1 incorrectly

Often caused by:

  • Hidden spaces in numeric text
  • Incorrect arithmetic in the input expression
  • Cell formatting set to text

Err:502 — Invalid argument

Occurs when:

  • The argument is non‑numeric text
  • A formula returns an error passed into SIGN

Fix:
Wrap the expression with IFERROR:
IFERROR(SIGN(A1); 0)

Best Practices

  • Use SIGN when direction matters more than magnitude
  • Pair SIGN with ABS for normalized directional calculations
  • Use SIGN to simplify IF logic for positive/negative checks
  • Avoid mixing SIGN with text-formatted numbers
  • Use SIGN to detect the direction of change in comparisons
SIGN is perfect for “direction of change” logic, such as determining whether a value increased, decreased, or stayed the same.
  • Use ABS to get magnitude without direction
  • Use ROUND, INT, or TRUNC to control numeric precision
  • Use A1 > 0, A1 < 0, or A1 = 0 for direct comparisons
  • Use POWER(number; 2) and SQRT for distance calculations

By mastering SIGN and its combinations with other math functions, you can build precise, direction-aware numeric models in LibreOffice Calc that behave consistently across all data scenarios.


Reproducible example (tested in LibreOffice Calc)

This standalone example was calculated in LibreOffice Calc 25.2.3.2 and matched the expected value. It is a practical cross-check of one usage, not proof that every example elsewhere on this page is correct.

=SIGN(-5)

Expected result: -1.

Identify whether a number is negative, zero or positive.

If the result differs, check the referenced cells, argument separators and number formatting. For more information, consult the LibreOffice Calc official help.