How to Use the ABS Function in Google Sheets

By Tomosuke Hasegawa · Updated Oct 29, 2026 · Beginner · 4 min read · includes 2 free exercises

In short: ABS returns the absolute value of a number, which is its size without the sign. The formula is =ABS(value). =ABS(-26) returns 26.

What ABS does

The absolute value of a number is how far it is from zero, so -26 and 26 both have an absolute value of 26. In spreadsheets that is the quickest way to ask "how big is the difference?" without caring which side is bigger: planned versus actual, forecast versus result, this month versus last.

ABS syntax

=ABS(value)

Per Google's help page, value is the number whose absolute value is returned. The page gives these examples: =ABS(-26) returns 26, =ABS(-3.68) returns 3.68, and =ABS(-6/3) returns 2, since the division is calculated first.

A step-by-step example

Cell A2 holds a planned figure of 12 and B2 holds the actual figure of 5.

AB
1PlannedActual
2125
=ABS(A2 - B2)

This returns 7. Here is why: 12 minus 5 is 7, and the absolute value of 7 is 7. If the figures were the other way round, the subtraction would give -7, and ABS would still return 7. That makes it safe to fill down a whole column of variances.

Common mistakes

Try it yourself

Use the cells above (A2 and B2). Type your formula into the box, starting with =, then press Check.

Exercise 1: Size of -26

Write a formula that returns the absolute value of -26.

Hint: one argument.

Exercise 2: The difference

Write a formula that returns the size of the difference between A2 and B2, ignoring the sign.

Hint: subtract inside ABS.

What to learn next

Syntax and rules in this guide were checked against Google's ABS help page. See all guides.