Absolute Value Calculator

Absolute Value Calculator helps you calculate the absolute value of numbers. Get instant, accurate results with a clear breakdown of the calculation process.

units

Enter your values above to see the results.

Tips & Notes

  • |a−b| = distance between a and b on the number line. |3−8|=5, |−2−5|=7.
  • Absolute value equations have TWO solutions: |x|=5 → x=5 or x=−5.
  • Triangle inequality: |a+b| ≤ |a|+|b|. Equality holds when a and b have same sign.
  • |x|² = x² for all x. Since squaring removes sign, no absolute value needed for squares.
  • Mean absolute deviation = average of |xᵢ − mean| for all data points. A spread measure.

Common Mistakes

  • |a+b| ≠ |a|+|b| in general. |3+(−5)| = |−2| = 2, but |3|+|−5| = 8.
  • Absolute value equations: |x|=−5 has NO solution — absolute value is never negative.
  • Inequality: |x|<5 means −5<x<5 (AND). |x|>5 means x<−5 OR x>5 (OR). Direction reverses.
  • Forgetting the negative case when solving: |x−3|=7 gives x=10 AND x=−4, not just x=10.
  • |−x| = |x| = x when x≥0. But −|x| = −x when x≥0. Negative outside vs inside matters.

Absolute Value Calculator Overview

The absolute value of a number is its distance from zero on the number line — it strips away the sign, keeping only the magnitude. Written as |x|, absolute value is always non-negative: it converts negative numbers to positive and leaves non-negative numbers unchanged. Despite its conceptual simplicity, absolute value appears in surprisingly sophisticated contexts: the mean absolute deviation in statistics, L1 regularization in machine learning, the modulus of complex numbers in signal processing, and the foundation of distance metrics in geometry.

The formal definition:

|x| = x if x ≥ 0, and |x| = −x if x < 0
EX: |7| = 7 | |−7| = 7 | |0| = 0 | |−3.14| = 3.14 | |√2| = √2
Geometric meaning: |a − b| = the distance between a and b on the number line, regardless of which is larger:
EX: Distance between −3 and 5 = |−3 − 5| = |−8| = 8 | Distance between 5 and −3 = |5 − (−3)| = |8| = 8 — same result
Key properties: - |a × b| = |a| × |b| — absolute value distributes over multiplication - |a / b| = |a| / |b| for b ≠ 0 - |a + b| ≤ |a| + |b| — the Triangle Inequality (straight-line distance ≤ sum of any two-leg route) - |a²| = a² — squaring always gives a non-negative result, same as absolute value squared Solving absolute value equations — always consider two cases:
EX: |x − 3| = 7 → case 1: x−3=7 → x=10 | case 2: x−3=−7 → x=−4 | check both: |10−3|=7✓, |−4−3|=7✓
Absolute value inequalities — the direction of the inequality determines the structure: - |x| < a → −a < x < a (within a of zero — one connected interval) - |x| > a → x < −a OR x > a (farther than a from zero — two separate intervals)
EX: |2x−1| < 5 → −5 < 2x−1 < 5 → −4 < 2x < 6 → −2 < x < 3 → solution: (−2, 3)
Extension to complex numbers: for complex number z = a + bi, the absolute value (modulus) = |z| = √(a²+b²) — the distance from the origin in the complex plane. |3+4i| = √(9+16) = 5. This extends Euclidean distance to two dimensions. Statistics and machine learning: Mean Absolute Deviation (MAD) = (1/n)Σ|xᵢ − mean|. In machine learning, L1 loss = Σ|predicted − actual| is more robust to outliers than L2 (squared) loss, because absolute value penalizes large errors linearly rather than quadratically. Absolute value functions create piecewise linear graphs with a characteristic V-shape. This geometry makes them useful for modeling situations where deviation from a target in either direction has the same cost or consequence — the penalty for being 5 units below target equals the penalty for being 5 units above it.

Frequently Asked Questions

Absolute value measures the distance from zero on the number line, regardless of direction. |5| = 5 because 5 is 5 units from zero. |−5| = 5 because −5 is also 5 units from zero. Distance is always non-negative — you cannot be −3 miles from somewhere. The absolute value of zero is zero: |0| = 0. In computing, absolute value converts negative array indices, errors, and differences into non-negative magnitudes that can be compared or summed.

|a − b| gives the distance between a and b on the number line regardless of which is larger. |7 − 3| = 4 and |3 − 7| = 4 — same distance, different direction. This property is essential in error analysis: |measured − true| gives error magnitude without caring which is larger. In statistics, mean absolute deviation = average of |xᵢ − x̄| for all data points. This treats overestimates and underestimates equally, unlike squaring differences.

The triangle inequality states |a + b| ≤ |a| + |b| for all real numbers. Example: |3 + (−5)| = |−2| = 2, and |3| + |−5| = 3 + 5 = 8. So 2 ≤ 8 ✓. Equality holds when a and b have the same sign. This inequality has a geometric interpretation: the length of one side of a triangle cannot exceed the sum of the other two sides. In higher mathematics, it generalizes to vector norms and function spaces.

An absolute value equation |x| = k with k > 0 has two solutions: x = k and x = −k. |x − 3| = 7 → x − 3 = 7 or x − 3 = −7 → x = 10 or x = −4. Always check both solutions in the original equation — extraneous solutions can appear when both sides of an equation are squared during solving. If k < 0, the equation has no solution because absolute value is never negative.

An absolute value inequality |x| < k means x is within k units of zero: −k < x < k. |x − 2| < 5 means x is within 5 of 2: −5 < x − 2 < 5 → −3 < x < 7. For |x| > k (greater than): x < −k OR x > k — two separate intervals going outward. The key distinction: less-than gives a connected interval (AND), greater-than gives two disconnected intervals (OR).

Absolute value appears in mean absolute error (MAE): average of |predicted − actual| across all predictions. Unlike mean squared error (MSE), MAE treats all errors equally regardless of size — a 10-unit error counts exactly twice as much as a 5-unit error. MSE gives more weight to large errors because it squares them. MAE is preferred when large errors are no more problematic than small errors scaled by size; MSE is preferred when large errors are disproportionately costly.