Absolute Value Calculator
This absolute value calculator finds |x| for a plain number or for a whole expression such as |3 − 11|. It works out what is inside the bars first, in the correct order of operations, and shows every step before taking the sign off.
-7, or a whole expression such as |3 - 11| or |2 × (4 - 9)|.How to use the absolute value calculator
- Type a number, such as
-7, and read the answer. - Or type a full expression inside bars, such as
|3 - 11|or|2 × (4 - 9)|. - Watch the working underneath: the inside of the bars is simplified first, one operation at a time, and the sign is stripped at the very end.
Brackets, multiplication, division, addition and subtraction inside the bars are all handled in the usual order. Nothing needs to be simplified by hand before you type it in.
What absolute value actually means
The absolute value of a number is its distance from zero on the number line. Distance has no direction, so the answer never carries a sign.
|x| = −x when x < 0
The second line looks strange the first time you see it, because −x seems like it should be negative. It is not. If x is −7, then −x is −(−7), which is 7. The minus sign in the rule means “flip the sign”, not “make it negative”.
Picture the number line: 7 sits seven steps to the right of zero and −7 sits seven steps to the left. Both are seven steps away, so |7| and |-7| are both 7. Zero is zero steps from itself, so |0| = 0 — the only input that gives an answer of zero.
This is why absolute value shows up wherever the size of a gap matters but the direction does not: a temperature swing, a measurement error, a tolerance band. The percent error calculator uses it for exactly that reason, since being 3 units over and 3 units under are equally wrong.
The bars work like brackets
The two vertical bars are grouping symbols. Everything between them is simplified to a single number first, and only then does the absolute value apply. Treat them exactly as you would treat parentheses.
Example: |3 − 11|
Subtract inside the bars, then take the distance from zero.
Example: |2 × (4 − 9)|
Round brackets inside the bars go first, then the multiplication, then the bars.
Working the bars first, before the arithmetic inside them, is the single most common error. |3 - 11| is not 3 − 11 with signs removed as you go; if you did that you would get |3| − |11| = −8, which happens to be the negative of the right answer. The order of operations calculator and the PEMDAS calculator both handle grouping symbols the same way.
| Expression | Inside the bars | Result |
|---|---|---|
| |−7| | −7 | 7 |
| |7| | 7 | 7 |
| |3 − 11| | −8 | 8 |
| |11 − 3| | 8 | 8 |
| −|3 − 11| | −8 | −8 |
| |−3 + 5| | 2 | 2 |
| |−3| + |5| | handled separately | 8 |
| |2 × (4 − 9)| | −10 | 10 |
| |4 − 4| | 0 | 0 |
Signs inside the bars versus signs outside
Two expressions that look almost identical can give very different answers, depending on whether the minus signs are inside the bars or outside them.
|−3 + 5| is not |−3| + |5|
In the first, the numbers are combined before the sign is dropped. In the second, each number loses its sign first and the results are added.
The gap between 2 and 8 is the whole point. Absolute value is not a filter you can apply to individual terms as you go. It applies to whatever the bars enclose, once, after that part has been reduced to a single number.
−|x| is allowed, and it is negative
An absolute value can never be negative, but a minus sign written in front of one certainly can. The bars are worked out first, then the leading minus flips the result.
So |x| ≥ 0 is always true, while −|x| ≤ 0 is always true. If a question ever produces a negative answer from inside a set of bars alone, something has gone wrong.
Absolute value as the distance between two numbers
The most useful form in practice is not |x| but |a − b|, which gives the distance between two points on the number line.
Example: how far apart are −4 and 7?
Subtract in either order and take the absolute value.
Example: an overnight temperature swing
A reading falls from 12°F to −5°F. The size of the change is a distance, so the sign is irrelevant.
Because the subtraction can be written either way round, you never have to decide which number is larger before you start. That is exactly what makes it convenient in formulas for error, tolerance and difference, where subtracting in the wrong order would otherwise flip the sign of the answer.
Solving absolute value equations by hand
An equation such as |x − 4| = 6 asks a different question: which values of x are 6 units away from 4? There are two, one on each side, and both are correct.
Example: |x − 4| = 6
Split it into two ordinary equations, one where the inside is positive and one where it is negative.
Example: |2x + 1| = 9
Two rules save time here. If the right-hand side is negative, as in |x + 3| = −2, there is no solution at all, because a distance cannot be negative. If it is zero, as in |x − 5| = 0, there is exactly one solution, x = 5, because only one point is zero distance from another.
|10 - 4| to check an answer you found by hand; it will confirm the value, but it will not find x for you.Common mistakes with absolute value
- Dropping the signs before doing the arithmetic.
|3 - 11|is 8, not −8. Work out the inside first. - Splitting the bars across a sum.
|-3 + 5|is 2, while|-3| + |5|is 8. They are different expressions. - Thinking −|x| must be a mistake. It is fine, and it is negative. Only the bars themselves guarantee a non-negative result.
- Giving one answer to an absolute value equation.
|x - 4| = 6has two solutions, 10 and −2. - Looking for solutions that cannot exist.
|x| = -5has none, because no distance is negative. - Assuming |a − b| needs the larger number first. Either order gives the same distance.
- Ignoring brackets inside the bars. In
|2 × (4 - 9)|the inner bracket is resolved before the multiplication, exactly as it would be anywhere else.
Frequently asked questions
What is |-7|?
Seven. The number −7 sits seven steps to the left of zero on the number line, and absolute value asks only how far away it is, not in which direction. The same distance applies to 7 itself, so |7| is also 7. Absolute value never returns a negative result.
What is the absolute value of 3 – 11?
Eight. Work inside the bars first: 3 − 11 = −8. Then take the distance from zero, which gives 8. The bars behave like brackets, so the subtraction happens before the sign is dropped. Removing the signs first would give |3| − |11| = −8, which is not the same expression.
Can an absolute value be negative?
The value inside the bars can be, but the result cannot. |x| is always zero or greater. A minus sign written outside the bars is a separate operation, so −|−7| really is −7: the bars give 7 first, then the leading minus flips it.
Why is |-3 + 5| not the same as |-3| + |5|?
Because the bars group whatever is inside them. In the first expression, −3 + 5 is combined into 2 before the absolute value applies, giving 2. In the second, each number loses its sign first, so you add 3 and 5 to get 8. Absolute value cannot be applied term by term.
How do you solve |x – 4| = 6?
Split it into two equations. Either x − 4 = 6, which gives x = 10, or x − 4 = −6, which gives x = −2. Both are correct: 10 and −2 are each exactly 6 units away from 4. Checking confirms it, since |10 − 4| and |−2 − 4| both equal 6.
What is |0|?
Zero. It is zero steps from itself on the number line, so the distance is zero. This is the only input that produces an answer of zero — every other number, positive or negative, is some positive distance away. It is also the point where the two halves of the definition meet.
What does |a – b| mean?
The distance between the two numbers a and b. Subtracting gives the gap with a direction attached, and the bars remove the direction. Because |a - b| and |b - a| are equal, you never need to check which number is larger first. That is why difference and error formulas are written this way.
What is |2 × (4 – 9)|?
Ten. Resolve the inner bracket first: 4 − 9 = −5. Then multiply: 2 × −5 = −10. Finally take the absolute value, giving 10. The order of operations applies normally inside the bars, with brackets before multiplication, and the absolute value is the last step.
Does this calculator solve absolute value equations?
No. It evaluates expressions, so it will tell you that |3 - 11| is 8, but it will not find x in |x - 4| = 6. Solve equations by splitting them into a positive case and a negative case, then use the calculator to check each answer you get.
Related calculators
Put this calculator on your own site (free)
Copy this into any page. The calculator stays up to date on its own, works on mobile, and carries a small credit link back here.
https://fourfunctioncalculator.com/absolute-value-calculator/