|x|

Absolute Value Calculator

Find the absolute value of any number or expression instantly.

Results

What Is Absolute Value?

The absolute value of a number is its distance from zero on the number line, regardless of direction. The absolute value of x is written |x|. The result is always non-negative: |5| = 5 and |−5| = 5. The absolute value of zero is zero: |0| = 0.

Mathematical Definition

Formally: |x| = x if x ≥ 0, and |x| = −x if x < 0. This piecewise definition ensures the output is always positive or zero. For example: |−8| = −(−8) = 8.

Properties of Absolute Value

Key properties: (1) |x| ≥ 0 for all x. (2) |x| = 0 only when x = 0. (3) |x × y| = |x| × |y| — absolute value distributes over multiplication. (4) |x + y| ≤ |x| + |y| — the triangle inequality, fundamental in mathematics. (5) |x/y| = |x|/|y| when y ≠ 0.

Applications

Absolute value appears in distance calculations (the distance between points a and b on a number line is |a − b|), error analysis (absolute error = |measured − actual|), and statistics (mean absolute deviation measures average spread of data). In programming, absolute value is used for comparing differences without caring about sign.

Solving Absolute Value Equations

|x| = k (where k > 0) has two solutions: x = k and x = −k. For example, |x − 3| = 5 means x − 3 = 5 (x = 8) or x − 3 = −5 (x = −2). If k < 0, the equation has no solution since |x| is always non-negative.

Worked Example: Solving |2x − 4| = 10

Set up two equations from the absolute value definition:

Case 1: 2x − 4 = 10 → 2x = 14 → x = 7.

Case 2: 2x − 4 = −10 → 2x = −6 → x = −3.

Verification: |2(7) − 4| = |10| = 10 ✓. |2(−3) − 4| = |−10| = 10 ✓.

Both solutions are valid. The solution set is {−3, 7}.

Frequently Asked Questions

|-7| = 7. Absolute value is the distance from zero, so it's always the positive version of the number.

No. |x| is always ≥ 0 for any real number x. It equals zero only when x = 0.

If |x| = 5, then x = 5 or x = −5 (two solutions). If |x| = negative number, there is no solution.

|a + b| ≤ |a| + |b|. This means the absolute value of a sum is at most the sum of absolute values. This is fundamental in analysis and geometry.

Absolute value is used for distance (|a − b| on a number line), error margins (|measured − expected|), and any situation where magnitude matters but direction does not.

For |x − 2| < 3, rewrite as −3 < x − 2 < 3. Adding 2 to all parts: −1 < x < 5. The solution is the interval (−1, 5). For "greater than" inequalities like |x| > 4, the solution splits into two: x > 4 or x < −4.

Mean absolute deviation (MAD) is the average of the absolute differences between each data point and the mean. For data {2, 4, 6, 8}: mean = 5. Absolute deviations: |2−5|=3, |4−5|=1, |6−5|=1, |8−5|=3. MAD = (3+1+1+3)/4 = 2. MAD measures spread without squaring like variance does.

Formula sources & accuracy standards: Calculator Methodology · Editorial Policy