Jump to content

Documentation/Calc Functions/SIGN

From The Document Foundation Wiki


Function name:

SIGN

Category:

Mathematical

Summary:

Determines the sign of a number.

Syntax:

SIGN(Number)

Returns:

Returns 1 if the number is positive, -1 if the number is negative, and 0 if the number is equal to zero.

Arguments:

Number is a real number, or a reference to a cell containing that number, whose sign is to be determined.

  • If Number is non-numeric, then SIGN reports a #VALUE! error.

Additional details:

The figure below illustrates the SIGN function.

SIGN function

Examples:

Formula Description Returns
=SIGN(3.4) Here the function returns 1 to indicate that the specified number is positive. 1
=SIGN(D1) where cell D1 contains the number -4.5. Here the function returns -1 to indicate that the specified number is negative. −1
=SIGN(0) Here the function returns 0, to indicate that the specified number is equal to zero. 0

Related LibreOffice functions:

ABS

ODF standard:

Section 6.16.54, part 2

Related (or similar) Excel functions:

SIGN