Documentation/Calc Functions/ABS

From The Document Foundation Wiki
Jump to navigation Jump to search
Other languages:
English • ‎dansk • ‎italiano • ‎עברית • ‎فارسی



Function name:

ABS

Category:

Mathematical

Summary:

Calculates the absolute value or modulus of a real number.

Syntax:

ABS(Number)

Returns:

Returns a non-negative, real number which is the absolute value of the real number passed as argument.

Arguments:

Number is the real number, or a reference to a cell containing that number, whose absolute value is to be calculated.

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

Additional details:

The absolute value of a number is its value without the +/- sign. If Number is negative, the corresponding positive value is returned. If Number is not negative, its value is returned without change.

The figure below illustrates the ABS function:

ABS function

Examples:

Formula Description Returns
=ABS(234.5) Absolute value of 234.5 234.5
=ABS(D1) where D1 contains the value -123 Absolute value of -123 123
=ABS(0) Absolute value of 0 0

Related LibreOffice functions:

IMABS

SIGN

ODF standard:

Section 6.16.2, part 2.

Equivalent Excel functions:

ABS