Algebra
Basic

Absolute Value

Distance of a number from zero, always non-negative.

Formula

∣x∣={xx≥0−xx<0|x| = \begin{cases} x & x \ge 0 \\ -x & x < 0 \end{cases}

Variables

xAny real number

Example

|-7| = 7

How it works

Absolute value tells you how far a number is from 0 on the number line, so the answer can never be negative. If the number is already positive or zero, its absolute value is just the number itself; if it is negative, the sign is flipped so the distance becomes positive. This works because distance measures size only, not direction.

When to use it

Use absolute value when you care about magnitude rather than sign, such as measuring error, temperature difference, or distance on a number line. It is also common in algebra when solving equations or inequalities that involve "distance from" a value.

Worked example, step by step

Find |5 - 12| Step 1: Simplify inside the bars: 5 - 12 = -7 Step 2: Take the absolute value: |-7| = 7 Final answer: |5 - 12| = 7

Common mistakes to avoid

  • Forgetting to change a negative result into a positive one
  • Thinking absolute value means "make the number positive" instead of "distance from zero"
  • Removing the bars before simplifying the expression inside them

Did You Know?

Absolute value measures distance from zero, which is why it can never be negative.

Share this formula

Reviewed & maintained by the FormulaWon editorial teamLast reviewed September 2026