Math & trig function

ABS function

Returns the absolute value of a number: the number without its sign.

Available in All versions of Excel, Excel for the web, Excel for Mac

In every Excel versionWorks in Google Sheets

Syntax

ABS(number)
ArgumentWhat it means
numberRequiredThe number whose size you want, positive or negative.

Returns: A number greater than or equal to 0.

How ABS works

ABS removes the minus sign: ABS(-730) and ABS(730) both return 730. Use it whenever you care how big a difference is but not in which direction: how far actual spending is from budget, how far a measurement is from its target, how much stock moved in a day, or the size of a forecast error.

It is often combined with other functions: inside IF for tolerance checks, with SUMPRODUCT to add up sizes of mixed positive and negative values, or with MAX to find the largest deviation. Remember that ABS loses information on purpose; keep the original signed value if you also need to know whether you were over or under.

Examples

1Size of the budget variance

D2fx=ABS(C2-B2)
ABCD
1AccountBudgetActual
2Travel50005730730
3Training30002410
4Software80007950

Result: 730

Travel overspent by 730. Filled down, Training shows 590 (an underspend) and Software 50, so you can rank accounts by how far off they are.

2Tolerance check

D2fx=IF(ABS(C2-B2)<=0.05, "OK", "Reject")
ABCD
1PartTarget (mm)Measured (mm)
2Shaft A2525.04OK
3Shaft B2524.93

Result: OK

Shaft A is 0.04 mm off, within ±0.05 mm. In D3, Shaft B is 0.07 mm off and shows Reject.

3Total stock movement

B7fx=SUMPRODUCT(ABS(B2:B6))
AB
1DayStock change
2Mon120
3Tue-85
4Wed40
5Thu-150
6Fri60
7455

Result: 455

The net change is −15, but the total quantity moved in and out is 120 + 85 + 40 + 150 + 60 = 455.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 16 KB

Common errors and how to fix them

ErrorWhy it happensFix
#VALUE!The argument is text.Check the input.

Tips

  • Largest deviation in Microsoft 365: =MAX(ABS(C2:C4-B2:B4)).
  • Percentage variance regardless of direction: =ABS(C2-B2)/B2.
  • Compare two decimals safely: =ABS(A2-B2)<0.000001 instead of =A2=B2.

Questions

How do I turn a column of negative numbers positive?

Use =ABS(A2) in a helper column, or Paste Special > Multiply by −1 if all are negative.

Can ABS make a number negative?

No. For a forced negative use =-ABS(A2).

Google Sheets

ABS also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.

ABS in other languages

In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.

LanguageFunction name
FinnishITSEISARVO
ItalianASS
PolishMODUŁ.LICZBY
TurkishMUTLAK

Recipes that use ABS