Absolute Value Calculator

Find the absolute value of any finite real number and see how it represents distance from zero on a number line.

Absolute Value Calculator workspace

Enter your values

Absolute value is the nonnegative distance between a number and zero on the number line.

Press Enter to calculate
Examples
ANSWER

Absolute value

12.5
∣x∣=x if x≥0,∣x∣=−x if x<0|x|=x\text{ if }x\ge0,\quad |x|=-x\text{ if }x<0
Details and comparison
Input sign
Negative
Distance from zero
12.5
Opposite
12.5
x = −|x|-12.5
00
|x|12.5
Calculation steps
  1. The input -12.5 is negative, so absolute value changes its sign.
  2. Absolute value is distance from zero: |-12.5| = 12.5.
  3. The result is never negative.
Overview

What is an absolute value calculator?

The absolute value of a real number is its distance from zero, so it is never negative. A nonnegative input stays unchanged; a negative input has its sign reversed. The calculator accepts integers, decimals, fractions, and scientific notation, and displays the sign rule used.

Important terms

Absolute value
The nonnegative magnitude |x| of a real number x, equal to its distance from zero.
Magnitude
The size of a real number without regard to its sign.
Opposite
The additive inverse −x, the reflection of x across zero on the number line.

When this method is useful

  • Find a number’s nonnegative magnitude.
  • Measure the distance between a value and zero.
  • Check sign handling in arithmetic or algebra problems.
  • Connect absolute value notation with a number-line distance.
Formula

Formula and variables

∣x∣=x if x≥0,∣x∣=−x if x<0|x|=x\text{ if }x\ge0,\quad |x|=-x\text{ if }x<0
x
any finite real number
|x|
the distance from x to zero

Keep a nonnegative input as it is. For a negative input, multiply by −1. The result is always greater than or equal to zero. Absolute value is not the same as squaring: it preserves the magnitude rather than changing its scale.

Domain note: This calculator accepts one finite real number. Complex absolute value is a different operation and is not calculated here.

How it works

How to use this calculator

  1. 1

    Enter one real number.

  2. 2

    Check its sign.

  3. 3

    If x is negative, calculate −x; otherwise keep x.

  4. 4

    Report the nonnegative distance |x| from zero.

Worked examples

Step-by-step examples

Example 1

Problem: Find |−12.5|.

Substitution: −(−12.5)

Result: 12.5

The distance from −12.5 to zero is 12.5 units.

Example 2

Problem: Find |7.25|.

Substitution: The input is nonnegative, so keep it.

Result: 7.25

Positive values are unchanged.

Example 3

Problem: Find |0|.

Substitution: The distance from zero to zero is zero.

Result: 0

Zero is the only real number whose absolute value is zero.

Method knowledge

Rules, edge cases, and related ideas

Never negative

Distance cannot be less than zero, so |x|≥0 for every real x.

Reflection symmetry

Opposite inputs have the same absolute value: |x|=|−x|.

Zero test

|x|=0 exactly when x=0.

Edge cases and limitations

  • Positive values are returned unchanged.
  • Negative values are returned with the sign reversed.
  • Zero returns zero.
  • Fractions, decimals, and scientific notation are accepted; non-finite or malformed values are rejected.

How this differs from a related concept

Absolute value measures distance from zero, while |a−b| measures the distance between two real numbers. Squaring x also removes the sign but changes the magnitude, so x² and |x| are not interchangeable.

Interpretation

Understand the result

The number-line display marks the input and its distance from zero. Negative values are reflected to the positive side; positive values remain where they are. If the input is zero, the answer is zero.

Common mistakes

  • Keeping the negative sign in the final absolute value.
  • Thinking absolute value means square the input.
  • Assuming |a−b| equals |a|−|b| in every case.
  • Treating the complex modulus as the same real-number calculation.

Frequently asked questions

Can an absolute value be negative?

No. It is a distance, so |x| is always nonnegative.

What is the absolute value of a negative number?

Reverse its sign; for example, |−8|=8.

Is absolute value the same as squaring?

No. Absolute value returns the nonnegative magnitude, while squaring changes the scale and units.

What does absolute value mean on a number line?

It is the distance from the point x to zero.

References & technical sources

Keep calculating

Related calculators