Absolute value turns any number positive by dropping its sign.
What is an absolute value calculator?
An absolute value calculator returns the size of a number without its sign, or the gap between two numbers. Pick |x| for one input, or absolute difference for two. The answer is always zero or positive, like measuring distance on a number line in Class 9 algebra.
How to use the Absolute Value Calculator
- Choose |x| mode or absolute difference |a − b|.
- Enter x, or both numbers a and b.
- Decimals and negative inputs are allowed.
- Read the result card for the magnitude.
- Switch modes to compare one value vs a gap.
About this calculator
Absolute value turns any number positive by dropping its sign. |−7| = 7 and |7| = 7. On a number line, |x| is how far x sits from zero.
Absolute difference |a − b| measures the gap between two values without caring which is larger. |10 − 3| = |3 − 10| = 7. Temperature swings, score margins, and error bounds all use this idea.
Switch modes to pick single-number abs or two-number difference. For distance on a coordinate plane try [[distance]] or [[pythagorean]]. For inequalities involving |x| see [[linear-equation]].
Formula for absolute value and absolute difference
|x| = x when x ≥ 0, else −x
|a − b| = distance between a and b on a line- x is the number whose distance from zero you want
- a and b are the two endpoints when finding a gap
- |x| is never negative; |0| = 0
Absolute value example: |−7| and |10 − 3|
In |x| mode with x = −7, the sign drops: |−7| = 7 because −7 sits 7 units from zero.
Switch to absolute difference with a = 10 and b = 3. Compute 10 − 3 = 7, then |7| = 7. Reversing order gives |3 − 10| = |−7| = 7, so the gap does not depend on which number you type first.
If a lab target is 20 °C and the reading is 23 °C, the error magnitude is |23 − 20| = 3 degrees. On a number line, |−12| and |8 − 20| both equal 12 even though one input was negative.
Compare |−12| and |8 − 20|. Both equal 12. On a number line, −12 and −12 from the subtraction sit the same distance from zero even though the subtraction went negative first.
In |x| mode with x = −4.5, the calculator returns 4.5. Decimals keep the same rule: flip the sign when x is negative.
For a cricket net session, batter scores 85 and 92 in two innings. Absolute difference mode with a = 85 and b = 92 gives |85 − 92| = 7 runs between the two totals.
Temperature drift uses the same gap idea. If a freezer target is −18 °C and the sensor reads −15 °C, |−15 − (−18)| = 3 degrees off target.
Bank balance swing from −250 rupees to +120 rupees has gap |120 − (−250)| = 370 rupees. Students sometimes write |−250| − |120| and get 130, which is not the same as the absolute difference between the two balances.
Common uses
- Find |−7| for algebra homework
- Measure temperature change ignoring direction
- Compare two test scores by absolute gap
- Check error magnitude in lab measurements
- Evaluate piecewise expressions with abs bars
Frequently asked questions
What is the absolute value of −7?
|−7| = 7. The negative sign drops; the magnitude stays 7 units from zero.
What is the absolute difference between 10 and 3?
|10 − 3| = 7. Order does not matter: |3 − 10| is also 7.
Can absolute value be negative?
No. |x| is always zero or positive. |0| = 0 is the only case that equals zero.
How is |x| used in distance?
On a line, |x − y| is the distance between x and y. On a plane, combine with the Pythagorean theorem.
Related calculators
- Math Calculator
- Percentage Calculator
- Fraction Calculator
- Exponent Calculator
- Logarithm Calculator
- Nth Root Calculator
- Ratio Calculator
- Pythagorean Theorem
Maintained by J Jaya Prakash · Last updated: October 2026