Absolute value calculator 

Absolute Value Calculator – Free Online | TheCalculatorSoup.com
Advertisement · 728×90 · Replace with Google AdSense
Ad 160×600

Absolute Value Calculator

Find the absolute value |x| of any positive, negative, or decimal number instantly. The absolute value is always the non-negative magnitude of a number.

Absolute Value Calculator
| x | = ?
Sign of Number
Answer:
 

Use this calculator to find the absolute value of any number. Enter a positive or negative whole number or decimal. The absolute value of a number is its distance from zero on a number line:

| x | = x    and    | −x | = x

What is Absolute Value?

The absolute value of a number tells you how far that number is from zero — regardless of direction. Whether the number is positive or negative, the result is always non-negative.

Imagine a number line. The number 5 is 5 units from zero. The number −5 is also 5 units from zero. So |5| = 5 and |−5| = 5 — the same distance, just different directions.

Advertisement · 336×280 · Replace with Google AdSense

Example Absolute Value Calculations

Example 1: Absolute value of 9

| x | = | 9 |
= 9

9 is already positive, so the absolute value is 9.

Example 2: Absolute value of −9

| x | = | −9 |
= 9

−9 is 9 units from zero, so |−9| = 9.

Example 3: Absolute value of 0

| x | = | 0 |
= 0

Zero is neither positive nor negative. |0| = 0.

Example 4: Absolute value of −7.5

| x | = | −7.5 |
= 7.5

Works for decimals too. |−7.5| = 7.5.

Absolute Value Rules & Properties

PropertyFormulaExample
Non-negativity|x| ≥ 0|−5| = 5 ≥ 0
Identity|x| = 0 only if x = 0|0| = 0
Symmetry|−x| = |x||−8| = |8| = 8
Multiplication|xy| = |x| · |y||−3 × 4| = 3 × 4 = 12
Triangle Inequality|x + y| ≤ |x| + |y||−3 + 5| = 2 ≤ 3 + 5 = 8
Square root|x| = √(x²)|−6| = √36 = 6

Absolute Value in Real Life

  • Temperature change: If temperature drops from 15°C to −5°C, the absolute change is |15 − (−5)| = 20°C
  • Bank balance: Being $200 overdrawn means |−200| = $200 owed
  • Elevation: Dead Sea is at −430m; absolute elevation = 430m below sea level
  • Sports scores: A team lost by |−14| = 14 points
  • Error measurement: Absolute error = |measured − actual|
  • Stock price: |−$3.50| = $3.50 drop in price

Absolute Value in Programming

In code, absolute value is a built-in function in every language:

LanguageFunctionExample
Pythonabs(x)abs(-9) → 9
JavaScriptMath.abs(x)Math.abs(-9) → 9
Java / C#Math.abs(x)Math.abs(-9) → 9
C / C++abs(x) or fabs(x)abs(-9) → 9
Excel=ABS(x)=ABS(-9) → 9
PHPabs(x)abs(-9) → 9

Frequently Asked Questions

Can absolute value ever be negative?+
No. By definition, absolute value is always zero or positive. |x| ≥ 0 for all real numbers. The absolute value removes the sign of the number, leaving only its magnitude.
What is the absolute value of 0?+
|0| = 0. Zero is the only number whose absolute value equals itself and is neither positive nor negative. It is 0 units away from zero on the number line.
How is absolute value different from absolute difference?+
Absolute value |x| finds the magnitude of a single number. Absolute difference |x − y| finds the distance between two numbers. For example, |−5| = 5 (absolute value), while |3 − 8| = 5 (absolute difference). See our Absolute Difference Calculator.
Does absolute value work for decimals and fractions?+
Yes, absolute value works for all real numbers including decimals, fractions, and large numbers. |−3.14| = 3.14, |−1/2| = 1/2, |−1000000| = 1000000.
What is |x²|?+
Since x² is always non-negative (any number squared is positive or zero), |x²| = x² always. The absolute value has no effect on already-positive expressions.
How do you solve absolute value equations like |x| = 5?+
If |x| = 5, then x = 5 OR x = −5 (both are 5 units from zero). In general, |x| = a means x = a or x = −a, giving two solutions. If a is negative, there is no solution since absolute value can’t be negative.

Related Calculators

Ad 160×600
Advertisement · 728×90
Advertisement · 728×90 (2nd slot)