Excel tutorial
/

Functions

Beginner

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.

Книга1 - Excel
—☐✕
E3fx=ABS(D3)
ABCDEF
1BranchPlanActualDifferenceDeviation
2Tashkent50 000 00054 200 0004 200 0004 200 000
3Samarkand30 000 00028 900 000-1 100 0001 100 000
4Bukhara20 000 00019 100 000-900 000900 000
5Namangan15 000 00016 200 0001 200 0001 200 000
6
Готово
Column D holds the signed difference (−1,100,000); column E, =ABS(D3), holds the size of the deviation: 1,100,000

Syntax

=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

AB
1PlanActual
2300289

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.

Книга1 - Excel
—☐✕
ФайлГлавнаяВставкаРазметка страницыФормулыДанныеРецензированиеВидСправка
Вставить функциюАвтосуммаФинансовыеЛогическиеТекстовыеДата и времяСсылки и массивыМатематические
Библиотека функций
Диспетчер имён
Определённые имена
D2fx
ABCDE
1BranchPlanActualDeviation
2Tashkent500542
3Samarkand300289
4Bukhara200191
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.

Книга1 - Excel
—☐✕
D2fx
ABCDE
1BranchPlanActualDeviation
2Tashkent500542
3Samarkand300289
4Bukhara200191
5
Готово

3

Fill the formula down. Branches that fell short now show a positive deviation too — you can sort them or find the largest.

Книга1 - Excel
—☐✕
D3fx=ABS(C3-B3)
ABCDE
1BranchPlanActualDeviation
2Tashkent50054242
3Samarkand30028911
4Bukhara2001919
5
ГотовоСреднее: 20,6667Количество: 3Сумма: 62
Книга1 - Excel
—☐✕
D3fx=ABS(C3-B3)
ABCDE
1DayMorningEveningChange
2Monday-358
3Tuesday615
4Wednesday-8-26
5Thursday4-15
6
Готово
Example 1: how many degrees the temperature changed — warmer or colder doesn’t matter. On Tuesday from 6° to 1°: a change of 5°
Книга1 - Excel
—☐✕
E2fx=ЕСЛИ(ABS(C2-B2)<=B2*5%;"OK";"Check")
ABCDEF
1BranchPlanActualStatus5% tolerance
2Tashkent50 000 00054 200 000OverCheck
3Samarkand30 000 00028 900 000UnderOK
4Bukhara20 000 00019 100 000UnderOK
5Namangan15 000 00016 200 000OverCheck
6
Готово
Example 2: ABS + IF. If the deviation exceeds 5% of plan — in either direction — it says “Check”. A separate column (Status) keeps the direction
Книга1 - Excel
—☐✕
E6fx=СУММ(E2:E5)
ABCDEF
1MonthForecastActualError|Error|
2January1201351515
3February140118-2222
4March15015777
5April160146-1414
6Total-141582
7
Готово
Example 3: forecast error. The plain total (−14) shows pluses and minuses cancelling out. The real error is 58. Without a helper column: =СУММПРОИЗВ(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)/B2 with 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.
Книга1 - Excel
—☐✕
B8fx=ИНДЕКС(A2:A6;ПОИСКПОЗ(МИН(C2:C6);C2:C6;0))
ABCD
1ProductPriceGap
2Headphones47 0003 000
3Power bank56 0006 000
4Case35 00015 000
5Charger52 5002 500
6Mouse61 00011 000
7Budget50 000
8ClosestCharger
9
Готово
The price closest to 50,000 soums is the Charger (gap 2,500). In Excel 365 with no helper column: =ПРОСМОТР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).

Книга1 - Excel
—☐✕
Буфер обмена
Шрифт
Выравнивание
Число
Стили
Ячейки
Редактирование
✕✓fx
ABCDEFGHIJKLMNOPQRSTUVWX
1BranchPlanActualDeviation
2Tashkent500542
3Samarkand300289
4Bukhara200191
5Namangan150162
6Largest
7
8
9
10
Лист1
Готово

Has ExcelLab been useful?

Support the project and help us release new lessons and exercises.

Support us
Previous

77 / 154