Example 1
Remove the sign
B2 =ABS(A2)
Result: 12.5
The negative sign is removed. A positive number would be returned as it is.
B2 =ABS(A2) returns 12.5
Returns the absolute value of a number: its size without the sign. ABS(-12.5) and ABS(12.5) are both 12.5.
Syntax
=ABS()
All versions of Excel.
Try it
Edit the formula in B2 or change the inputs. The sheet recalculates as you type.
B2 =ABS(A2) returns 12.5
ABS returns a number's distance from zero. It turns a negative number into a positive one and leaves positive numbers and zero alone. Use it whenever the size of a difference matters but the direction doesn't.
The most common use is the gap between two figures. =ABS(C2-B2) gives the difference between actual and budget as a positive number, whichever is bigger. To see how large the miss is as a share of the budget, divide: =ABS(C2-B2)/B2.
To judge a whole table, total the absolute differences with SUMPRODUCT: =SUMPRODUCT(ABS(C2:C9-B2:B9)). This is the sum of the errors with no cancelling out. Without ABS, an over-forecast in one row would cancel an under-forecast in another and make the total look better than it is.
ABS makes a "within tolerance" test work in both directions: =IF(ABS(C2-B2)<=50, "On budget", "Review") flags any row more than 50 away, high or low. Writing the same test without ABS needs two conditions joined with AND.
=ABS(B2).=ABS(B2)>ABS(C2).=SIGN(B2)*ABS(B2) returns B2.=B2*-1 flips the sign of every number. ABS makes every number positive.=MAX(B2, -B2) also returns the absolute value, but ABS is clearer.=SQRT(ABS(B2)) is a way to avoid #NUM!, if taking the size of the number is really what you want.ABS works on numbers and on text that can be read as numbers. A cell containing "n/a" returns #VALUE!. Dates are numbers, so =ABS(A2-B2) gives the number of days between two dates, whichever comes first. A blank cell counts as 0.
B2 or C2-B2.Each example is a live sheet. Change the inputs or the formula and watch the result.
Example 1
B2 =ABS(A2)
Result: 12.5
The negative sign is removed. A positive number would be returned as it is.
B2 =ABS(A2) returns 12.5
Example 2
D3 =ABS(C3-B3)
Result: 300
Software came in 300 under budget. ABS reports the 300 without the minus sign.
D3 =ABS(C3-B3) returns 300
Example 3
E3 =ABS(C3-B3)/B3
Result: 9.4%
300 divided by 3,200 is 9.375%.
E3 =ABS(C3-B3)/B3 returns 9.4%
Example 4
B7 =SUMPRODUCT(ABS(C2:C5-B2:B5))
Result: 1,350
400 + 300 + 0 + 650. A plain total of the differences would be 750, because the software saving cancels part of the overspend.
B7 =SUMPRODUCT(ABS(C2:C5-B2:B5)) returns 1,350
Example 5
D4 =IF(ABS(C4-B4)<=50,"On budget","Review")
Result: On budget
Training is 20 over. The same test would catch it 20 under, with no second condition.
D4 =IF(ABS(C4-B4)<=50,"On budget","Review") returns On budget
Solve it in the sheet. Every answer is checked, with hints if you need them.
Task 1 of 2
In D2, return the size of the forecast error: the gap between B2 and C2 without a sign. Fill it down to D6.
Answer in D2, then it fills down to D6.
ABS(SUM(...)) lets over- and under-runs cancel.SUM(ABS(range)) needs Ctrl+Shift+Enter. Use SUMPRODUCT instead, which handles arrays natively.#VALUE!. Clean the column or wrap the formula in IFERROR.Use `=ABS(B2)`. It returns the number without its sign: ABS(-12.5) is 12.5, and positive numbers are unchanged.
Use `=ABS(B2-C2)`. Both orders give the same result.
Use `=SUMPRODUCT(ABS(B2:B9))`. In Microsoft 365, `=SUM(ABS(B2:B9))` also works. In older versions it needs Ctrl+Shift+Enter.
ABS returns the size of a number and drops the direction. SIGN returns the direction as 1, -1 or 0 and drops the size.
Use `=ABS(A2-B2)`. Dates are numbers, so the difference is in days.
Tracks take you from the basics to modelling, one graded exercise at a time.