Excel ABS function: absolute value and plan-vs-actual deviation
How to get the absolute value of a number with ABS in Excel: plan vs actual deviation, forecast error, tolerance checks with IF, finding the closest value — examples and traps.
ABS returns the absolute value of a number — the number without its minus sign: =ABS(-250) → 250, =ABS(250) → 250.
When do you need it? When what matters is not which way a difference goes but how big it is. A branch beat its plan by 4.2 million or missed it by 1.1 million — both are “deviation from plan”. A stock shortage and a surplus are both discrepancies. ABS puts these deviations on one scale so you can compare, sort and add them.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Branch | Plan | Actual | Difference | Deviation | |
| 2 | Tashkent | 50 000 000 | 54 200 000 | 4 200 000 | 4 200 000 | |
| 3 | Samarkand | 30 000 000 | 28 900 000 | -1 100 000 | 1 100 000 | |
| 4 | Bukhara | 20 000 000 | 19 100 000 | -900 000 | 900 000 | |
| 5 | Namangan | 15 000 000 | 16 200 000 | 1 200 000 | 1 200 000 | |
| 6 |
=ABS(D3), holds the size of the deviation: 1,100,000Syntax
=ABS(number)
- number — the only argument: a number, a cell (
D2) or an expression (C2-B2).
The result is always 0 or a positive number. An empty cell gives 0. Text with letters or units (“500 soums”) gives #VALUE!. ABS doesn’t round or change the decimals: =ABS(-3,75) → 3.75.
Example
Formula:
=ABS(B2-A2)→ result: 11 — actual is 11 below plan, but the deviation comes out positive
Entering ABS
1
Select the result cell (D2). Формулы → Математические → ABS — it’s first in the list.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Branch | Plan | Actual | Deviation | |
| 2 | Tashkent | 500 | 542 | ||
| 3 | Samarkand | 300 | 289 | ||
| 4 | Bukhara | 200 | 191 | ||
| 5 |
2
In the Function Arguments window type the subtraction into Number: C2-B2. The result shows at the bottom of the window — click OK.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Branch | Plan | Actual | Deviation | |
| 2 | Tashkent | 500 | 542 | ||
| 3 | Samarkand | 300 | 289 | ||
| 4 | Bukhara | 200 | 191 | ||
| 5 |
3
Fill the formula down. Branches that fell short now show a positive deviation too — you can sort them or find the largest.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Branch | Plan | Actual | Deviation | |
| 2 | Tashkent | 500 | 542 | 42 | |
| 3 | Samarkand | 300 | 289 | 11 | |
| 4 | Bukhara | 200 | 191 | 9 | |
| 5 |
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Day | Morning | Evening | Change | |
| 2 | Monday | -3 | 5 | 8 | |
| 3 | Tuesday | 6 | 1 | 5 | |
| 4 | Wednesday | -8 | -2 | 6 | |
| 5 | Thursday | 4 | -1 | 5 | |
| 6 |
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Branch | Plan | Actual | Status | 5% tolerance | |
| 2 | Tashkent | 50 000 000 | 54 200 000 | Over | Check | |
| 3 | Samarkand | 30 000 000 | 28 900 000 | Under | OK | |
| 4 | Bukhara | 20 000 000 | 19 100 000 | Under | OK | |
| 5 | Namangan | 15 000 000 | 16 200 000 | Over | Check | |
| 6 |
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Month | Forecast | Actual | Error | |Error| | |
| 2 | January | 120 | 135 | 15 | 15 | |
| 3 | February | 140 | 118 | -22 | 22 | |
| 4 | March | 150 | 157 | 7 | 7 | |
| 5 | April | 160 | 146 | -14 | 14 | |
| 6 | Total | -141 | 582 | |||
| 7 |
=СУММПРОИЗВ(ABS(D2:D5))Pro level: largest deviation, closest value and percentage error
- Largest deviation (either direction):
=МАКС(МАКС(D2:D5);-МИН(D2:D5))— no arrays, works in any Excel version. In Example 3 it returns 22 (February). - Mean absolute error (MAE):
=СУММПРОИЗВ(ABS(D2:D5))/СЧЁТ(D2:D5)— the easiest forecast-quality measure to explain: 58 / 4 = 14.5. - Deviation in percent:
=ABS(C2-B2)/B2with Percent Style — 8.4% for 54.2 million vs 50 million. - Closest value: to find the price closest to a budget, use a helper column
=ABS(B2-$B$7), then=ИНДЕКС(A2:A6;ПОИСКПОЗ(МИН(C2:C6);C2:C6;0)). - Always negative: if an expenses column must always be negative, use
=-ABS(B2). Whether someone types 50000 or −50000, the result is −50000.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Product | Price | Gap | |
| 2 | Headphones | 47 000 | 3 000 | |
| 3 | Power bank | 56 000 | 6 000 | |
| 4 | Case | 35 000 | 15 000 | |
| 5 | Charger | 52 500 | 2 500 | |
| 6 | Mouse | 61 000 | 11 000 | |
| 7 | Budget | 50 000 | ||
| 8 | Closest | Charger | ||
| 9 |
=ПРОСМОТРX(МИН(ABS(B2:B6-B7));ABS(B2:B6-B7);A2:A6)Try it in the simulator
Type =ABS(C2-B2) in D2 and fill it down to D5 — you get each branch’s deviation from plan. Then type =МАКС(D2:D5) in D6 to find the largest deviation (it should be 42).
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Branch | Plan | Actual | Deviation | ||||||||||||||||||||
| 2 | Tashkent | 500 | 542 | |||||||||||||||||||||
| 3 | Samarkand | 300 | 289 | |||||||||||||||||||||
| 4 | Bukhara | 200 | 191 | |||||||||||||||||||||
| 5 | Namangan | 150 | 162 | |||||||||||||||||||||
| 6 | Largest | |||||||||||||||||||||||
| 7 | ||||||||||||||||||||||||
| 8 | ||||||||||||||||||||||||
| 9 | ||||||||||||||||||||||||
| 10 |
Has ExcelLab been useful?
Support the project and help us release new lessons and exercises.