Absolute Value Calculator
Enter a number to get its absolute value — its distance from zero. Set the second field to measure the distance between two numbers instead.
|−5.3|
Original value
−5.3Sign
NegativeDistance from 0
5.3Numbers with this absolute value
5.3 and −5.3How to use this calculator
- Enter your number. Negatives and decimals both work.
- Leave the second field at zero for the plain absolute value, or enter another number to get the distance between the two.
- Read the answer above the supporting figures. The two working lines under the inputs show both sums written out with the bars.
How absolute value is calculated
There is no arithmetic to do — only a decision about the sign, made by which side of zero the number sits on.
|x| = x if x ≥ 0, −x if x < 0
- x — your number, e.g. −5.3
- −x — the negative of a negative, so −(−5.3) = 5.3
- |x| — the result, always zero or more
| Expression | Value |
|---|---|
| |−5.3| | 5.3 |
| |12| | 12 |
| |0| | 0 |
| |2 − 5| | 3 |
| |−8 − 11| | 19 |
The last two rows are absolute value doing real work. Anything inside the bars is worked out first, then the sign is dropped — which turns a subtraction into a distance.
Where absolute value is used
- Error and tolerance — how far a measurement is from its target, regardless of which side it missed on.
- Distance — between two points on a line, two temperatures, two dates, two prices.
- Averaging differences — mean absolute deviation adds up the distances from the mean, which would otherwise cancel out to zero.
- Comparing sizes — a −12% return and a +12% return are equally large moves, and absolute value is what says so.
Frequently asked questions
What is the absolute value of a number?
Its distance from zero, with the sign discarded. The absolute value of −5.3 is 5.3, of 12 is 12, and of 0 is 0. Written with vertical bars: |−5.3| = 5.3.
How do I calculate absolute value?
Drop the minus sign if there is one, and leave the number alone if there is not. Formally, |x| = x when x is positive or zero, and |x| = −x when x is negative — because the negative of a negative is positive.
How do I find the distance between two numbers?
Take the absolute value of their difference: |a − b|. From 2 to 5 is |2 − 5| = 3, and from −8 to 11 is |−8 − 11| = 19. Set the second field to the number you are measuring from and the calculator shows it.
Does the order matter when measuring a distance?
No, and that is the point of the bars. |2 − 5| and |5 − 2| are both 3, because distance has no direction. Without the absolute value one of them would be −3, which is not a distance anything can be.
Can an absolute value be negative?
Never. It is a distance, so it is always zero or more. That is why an equation such as |x| = −4 has no solution, while |x| = 4 has two: x = 4 and x = −4.
How do I solve an equation with absolute value in it?
Split it into two cases, one for each sign of the expression inside the bars. For |2x − 3| = 5, solve 2x − 3 = 5 to get x = 4, and 2x − 3 = −5 to get x = −1. Always substitute both answers back, because one case can produce a value that does not satisfy the original equation.