Math & Trig

ABS Formula

ABS returns the absolute value of a number, converting negative numbers to positive while leaving positive numbers unchanged. It is used when you need the magnitude of a number without its sign, such as calculating the difference between two values regardless of direction, measuring distance, or working with variances.

Syntax

ABS(number)
ParameterDescription
number Parameter of the ABS function.
Try ABS in Viztab — free, no signup

Examples

Get absolute difference between two values

Formula
=ABS(A2-B2)
Returns: 15 — the unsigned difference between the two values, whether A2 or B2 is larger

Convert negative numbers to positive

Formula
=ABS(A2)
Returns: 42 — from either -42 or 42, the result is always 42

Calculate variance magnitude

Formula
=IF(ABS(A2-B2)>100, "Significant", "Normal")
Returns: "Significant" if budget and actual differ by more than $100 in either direction

Common Errors

#VALUE!

The argument is text, not a number. ABS requires a numeric value or a cell reference containing a number.

Tips

Percentage difference

=ABS(A1-B1)/A1 gives the absolute percentage change, always positive regardless of increase or decrease.

Distance formula

=ABS(A1-B1)+ABS(A2-B2) calculates Manhattan distance. For Euclidean distance, use SQRT(A^2+B^2).

Error margins

=ABS(actual-expected)<tolerance is a common pattern for checking if a value is within an acceptable range.

Try ABS in Viztab

Import your data and use ABS with 370+ other formulas. No signup required.

Open Viztab

Related Formulas