... LIVE
Please enter a valid number.
Supports positive, negative, integers, and decimals
Absolute Value |x|
Step-by-Step Working

Sources & Methodology

Absolute value definition verified against IEEE 754, Khan Academy mathematics curriculum, and standard textbook definitions.
📖
Khan Academy — Absolute Value
Curriculum-aligned definition and examples of absolute value used as reference for step-by-step output and property explanations
🏛
National Council of Teachers of Mathematics (NCTM)
Mathematical standards confirming absolute value definition, notation, and curriculum placement
Formula: |x| = x if x ≥ 0; |x| = −x if x < 0. Implementation: if the input number is negative, multiply by −1. If zero or positive, return as-is. Result is always non-negative. The number line distance from 0 to x equals |x| by definition.

⏱ Last reviewed: April 2026

What Is Absolute Value and How Do You Calculate |x|

The absolute value of a number is its distance from zero on the number line, regardless of direction. Written with vertical bars as |x|, it always returns a non-negative result. The concept appears throughout mathematics — from solving equations to defining distances in coordinate geometry and measuring error in statistics.

The Formula
|x| = x   if x ≥ 0    |x| = −x   if x < 0
Rule 1: If x is positive or zero, |x| = x (unchanged).
Rule 2: If x is negative, |x| = −x (multiply by −1 to flip the sign).

Examples:
|7| = 7 (already positive)
|−7| = −(−7) = 7 (flip the negative)
|0| = 0 (zero stays zero)
|−3.5| = 3.5

Key Properties of Absolute Value

Absolute Value Examples Table

Number (x)|x|SignDistance from 0
−100100Negative → flip100 units
−77Negative → flip7 units
−0.50.5Negative → flip0.5 units
00Zero0 units
3.143.14Positive → unchanged3.14 units
1515Positive → unchanged15 units
−1,0001,000Negative → flip1,000 units

Absolute Value Equations

When solving |x| = a, there are always two solutions for any positive a: x = a and x = −a. This is because both a and −a are the same distance from zero. For example, |x| = 5 means x = 5 or x = −5. When |x| = 0, the only solution is x = 0. When |x| = −a (negative), there is no solution — absolute value cannot be negative.

💡 Memory tip: Think of absolute value as the "unsigned version" of a number — you strip away the positive or negative sign and keep only the magnitude. A temperature of −20°C and +20°C are at the same distance from 0°C; their absolute values are both 20.
Frequently Asked Questions
Absolute value of a number x, written |x|, is its distance from zero on the number line. It is always non-negative. |5| = 5, |−5| = 5, |0| = 0. Absolute value removes the sign and keeps only the magnitude of the number.
The absolute value of −7 is 7. Written |−7| = 7. Since −7 is negative, apply the formula |x| = −x: |−7| = −(−7) = 7. The number −7 is 7 units from zero on the number line, so its absolute value is 7.
The absolute value formula is: |x| = x if x ≥ 0 (positive or zero: keep as-is), and |x| = −x if x < 0 (negative: multiply by −1). This always produces a non-negative result. Example: |−8| = −(−8) = 8.
No. By definition, |x| ≥ 0 for all real numbers. Absolute value is always zero or positive. The only time |x| = 0 is when x = 0. If you see |x| = −5, there is no solution because absolute value can never equal a negative number.
The absolute value of 0 is 0. |0| = 0. Zero is the only number that equals its own absolute value and is also 0 units from zero on the number line. Zero is neither positive nor negative, so the formula |x| = x applies (since 0 ≥ 0).
The absolute value of any negative number −x (where x > 0) is x. Simply remove the negative sign. Examples: |−3| = 3, |−15.7| = 15.7, |−1,000| = 1,000. Formally, |−x| = −(−x) = x.
For |x| = a where a > 0: two solutions exist: x = a and x = −a. Example: |x| = 5 gives x = 5 or x = −5. For |x| = 0: only solution is x = 0. For |x| = −a: no solution (absolute value cannot be negative).
|−15| = 15. Apply the formula: since −15 is negative, |−15| = −(−15) = 15. The number −15 is 15 units from zero on the number line, so its absolute value is 15.
Absolute value |x| applies to one number — it gives the non-negative form of that single number. Absolute difference |A − B| applies to two numbers — it gives the non-negative distance between them. Absolute difference uses absolute value: subtract first, then apply |x|.
Absolute value is used to measure distance (always positive), solve inequalities involving ranges around a point, define metrics in geometry and analysis, compute error magnitudes (MAE, MAD) in statistics, and in programming to get unsigned numeric values. It is fundamental because distance cannot be negative.
|3.5| = 3.5. Since 3.5 is already positive (3.5 ≥ 0), the formula |x| = x applies and the value is unchanged. Absolute value only changes negative numbers — positive numbers and zero are returned as-is.
The same rules apply: |−3/4| = 3/4, |5/8| = 5/8, |−7/2| = 7/2 = 3.5. If the fraction is negative, remove the sign. If it is positive or zero, it stays unchanged. The result is always a non-negative fraction or decimal.
Absolute value models real situations where magnitude matters but direction does not: temperature change (−10° vs +10° are both 10 degrees from 0), distance travelled (always positive), profit/loss magnitude, error in measurements, credit/debit amounts when you just want the size, and speed (as opposed to velocity which has direction).
Related Calculators
Popular Calculators
🧮

Missing a Math Calculator?

Can’t find the math calculator you need? Tell us — we build new ones every week.