Math calculator

Absolute Value Calculator

How far from zero, and how far apart.

Distance from zero

Add a second value for the distance between them.

|−7|

7

The bars measure how far the number sits from zero, and distance has no direction.

|value|

7

distance from zero

Sign of the input

negative

left of zero

  • −7 sits 7 to the left of zero, so its distance from zero is 7.

Decimals are read from the digits you typed, so 2.675 stays 2.675 rather than the 2.67499999999999982 a double would hold.

What this tool shows

Absolute value is a distance, and distance has no direction. That is the definition worth carrying, because “drop the minus sign” is a rule about how a number is written and it fails as soon as there is a letter inside the bars.

  • The absolute value of any number
  • The distance between two numbers
  • Absolute change and relative change
  • Why |−x| is not x
  • What the bars mean in an equation
  • Where a relative change has no value
Distance from zero Distance between two Exact decimals Absolute vs relative change

Add a second value for the distance between the two.

Updated 7 September 2026 · Works in any browser, no installation

The absolute value of a number is its distance from zero. |−7| is 7 and |7| is 7, because both sit seven units from zero — one to the left, one to the right. Zero is its own absolute value, and it is the only number that is neither positive nor negative.

At a glance

Formula shown
|x| = x when x ≥ 0, and −x when x < 0. The distance between a and b is |a − b|, which equals |b − a| because squaring or negating a difference does not change its size.
Scenario support
Measuring an error without caring which side it fell on; finding how far apart two temperatures or two readings are; checking a tolerance.
Educational estimate
Planning support from the values you enter — not professional advice.

Distance, not sign removal

Put the number on a line and ask how far it is from zero. That is the whole definition, and it is worth holding onto because it survives everywhere the shortcut does not.

It explains immediately why the answer is never negative — distances are not — and why zero is the only fixed point. It also explains |a − b|: the gap between two numbers is the distance between them, and the gap does not know which one you started from.

The bars are not brackets. |3 − 5| is 2, not −2, because the bars are applied last and the subtraction inside them happens first.

Why not just drop the sign

“Take off the minus sign” works for every number you can write down, and stops working the moment a letter appears.

|−x| is not x. It is |x|. The expression −x is only negative when x is positive, and if x is already negative then −x is the positive one and the bars change nothing. The sign written in front tells you nothing about the sign of the value.

This is the step that makes absolute-value equations need two cases rather than one. |x| = 5 has two answers because two numbers sit five units from zero, and no amount of sign-dropping produces the second one.

The definition that always works is the piecewise one: |x| is x when x is zero or positive, and −x when x is negative. That second branch is a minus sign making a positive number, which looks wrong and is the whole point.

Absolute change and relative change

Two quantities go up by 5. One started at 10 and one started at 1,000. The absolute change is the same; the relative change is not remotely.

Absolute change is |new − old|, in the original units. It answers “how much”.

Relative change divides that by the starting value and is usually written as a percentage. It answers “how much, compared with what there was”.

A relative change from zero has no value at all. Not infinity, not a very large number — there is nothing for the change to be a proportion of, and this page says so rather than printing a number that would be meaningless.

Which one to quote is a real choice. A drug that lowers a risk from 2 in 10,000 to 1 in 10,000 has halved it in relative terms and moved it by 0.01 percentage points in absolute terms. Both sentences are true and they leave very different impressions.

The shape of the graph

y = |x| is a V with its point at the origin: the line y = x for positive x, and its reflection for negative x.

The corner is the interesting part. The function is continuous there — you can draw it without lifting the pen — but it has no single slope at that point, because the slope is −1 arriving and +1 leaving. It is the standard example of a function that is continuous everywhere and differentiable not quite everywhere.

Anything inside the bars just moves the corner. |x − 3| has its point at x = 3, which is also why |x − 3| reads as “the distance from x to 3” and why that reading makes the equations easy.

Where it gets used

Error and tolerance. A measurement is within tolerance when |measured − target| is small enough. Nobody cares which side it fell on, which is exactly what the bars encode.

Distance. On a number line the distance between two points is |a − b|. In more dimensions it becomes Pythagoras, but the one-dimensional case is where the idea starts.

Statistics. The mean absolute deviation averages |x − mean| across a dataset. It is the honest alternative to squaring the differences, and it is less sensitive to a single extreme value.

Programming. Comparing two floating-point numbers is done with |a − b| < tolerance rather than with equality, because exact equality on decimals almost never holds.

Sources and methodology

The definition and its properties are standard; these are the references.

Method. Values are parsed from the decimal string rather than through a floating-point number, so 2.675 stays 2.675 rather than becoming the 2.67499999999999982 a double actually holds — which matters here because the page reports the input back alongside the answer. A relative change from a starting value of zero is reported as undefined rather than as infinity or as a very large number, because there is genuinely nothing for the change to be a percentage of. That engine is verified on every change against 140 hand-written assertions, including that the distance between two values is identical whichever way round they are subtracted, and that no absolute value is ever returned negative. The count and the per-case breakdown are published on the formula verification page.

Related calculators

Where this goes next:

Absolute Value EquationBoth cases written out, in interval and set-builder notation — with the distinction the topic turns on: a less-than is an AND, a greater-than is an OR.
Percentage ChangeWork out percentage increase or decrease, reverse change, loss recovery, percentage points, multi-period change, and CAGR.
Percent ErrorPercent error against an accepted value, rounded to your significant figures, for one measurement, repeated trials, or a whole column of pairs.
Floor and CeilingFloor, ceiling and truncation side by side — because for negative numbers those are three different answers, and floor(−2.5) is −3 while truncating gives −2.
DistanceThe distance between two points in the plane or in space, kept exact as a surd wherever the square root does not come out — √50 stays √50, and is also shown as 5√2.
RoundingAll seven rounding rules on the same number at once, so the disagreement at a tie is visible rather than buried inside whichever one your software happened to pick.

More in Math, or browse all calculators.

Read the guide

When the bars contain an unknown rather than a number, the Absolute Value Equation Calculator solves both cases and handles the inequalities.

Educational use disclaimer

This is an educational tool. Values are read from the digits you type and kept exact, so a decimal is not rounded on its way in.

How we calculate · Found an error? email us

Authorship & verification

Written and maintained by , a business operator who builds spreadsheet-based calculators.

What's changed (3 updates)

Published 7 September 2026

  1. Published the absolute value page built around distance rather than around 'drop the minus sign', because the second rule fails as soon as a letter is inside the bars — |−x| is |x|, not x.
  2. A relative change from a starting value of zero is reported as undefined rather than as infinity or a very large number, since there is genuinely nothing for the change to be a percentage of.
  3. Values are parsed from the digits typed rather than through a double, so the input echoed back beside the answer is the number the reader entered.

Add this calculator to your site

Responsive embed — and private: nothing your visitors type leaves their browser.