Math

Taking the gap between two numbers

Definition

Taking the absolute difference of two numbers means wrapping their subtract in ABS.

Syntax

=ABS(number)

Arguments

Argument Meaning
number The difference to make positive, for example B2-C2.

Worked example

A stock sheet stores the plan in B2 and the count in C2. The count is lower, so the raw subtract is negative.

A: Bin B: Plan C: Count
A 20 12
B 9 9
C 6 11

Formula: =ABS(B2-C2)

Result: 8. 20 minus 12 is -8, and ABS turns that gap into 8.

Practice

Cell A2 holds 3. Cell B2 holds 10. In C2, write a formula that returns the absolute difference between A2 and B2.

  1. In C2, write an ABS formula for A2 minus B2.
Step 1 of 2
Formulas here use English function names, such as SUM, and a period as the decimal separator, in every language.
Loading the sheet…

Related functions

ABS is the function that turns that difference into a positive gap.

Common mistake

Leaving ABS out, as in =B2-C2: the result is -8 instead of the gap 8.

Related functions

These links are related functions.