CalcUnit Logo

How to Calculate Absolute Value

Find the absolute value of any number.

The Formula

|x| = x if x≥0, -x if x<0

The absolute value formula uses the mathematical relationship: |x| = x if x≥0, -x if x<0. Each variable in the formula represents a measurable quantity that affects the final result.

What Each Variable Means

Every value in the absolute value formula, what it measures, and the value used in the worked example on this page:

VariableTypeExample value
Number (x)Input (you provide)-7
|x|Result (calculated)—
-|x|Result (calculated)—

Step-by-Step Method

  1. 1Write down the values you know: Number (x).
  2. 2Substitute your known values into the formula: |x| = x if x≥0, -x if x<0.
  3. 3Work through the arithmetic in the standard order of operations — parentheses first, then exponents, then multiplication and division, then addition and subtraction.
  4. 4Check that your result carries the correct unit and falls in a reasonable range for the problem.
  5. 5Verify your answer with the interactive Absolute Value Calculator — it solves the same formula instantly.

Worked Example

Take a concrete case: number (x) = 2, with the other inputs at the typical values from the variables table above. Substituting into the formula gives |x| = 2.00000000, -|x| = -2.00000000. These numbers are solved by the same engine that powers the Absolute Value calculator, so you can reproduce them exactly by entering the same inputs there.

Number (x)|x|-|x|
11.00000000-1.00000000
22.00000000-2.00000000
55.00000000-5.00000000
1010.00000000-10.00000000
2020.00000000-20.00000000
5050.00000000-50.00000000
100100.00000000-100.00000000
250250.00000000-250.00000000
500500.00000000-500.00000000
1,0001000.00000000-1000.00000000

How each result changes as number (x) changes, holding the other inputs constant.

Practice Problems

1. |-7| = 7: You enter Number (x) -7 — what does the calculator return?

Answer: With Number (x) -7, the results are |x| 7.00000000, -|x| -7.00000000.

2. With Number (x) 3.93, what are the results?

Answer: Entering Number (x) 3.93 gives |x| 3.93000000, -|x| -3.93000000.

Frequently Asked Questions

What is the formula for absolute value?

The formula is: |x| = x if x≥0, -x if x<0. Find the absolute value of any number.

What values do I need to calculate absolute value?

You need number (x). The calculator produces |x|, -|x| from those inputs.

What is the absolute value when number (x) is 2?

With number (x) = 2, the result is |x| = 2.00000000, -|x| = -2.00000000. This is worked through in full in the example on this page.

Related Topics

absolute valuemodulus

Use the Interactive Calculator

Skip the manual math — get instant results with our free Absolute Value calculator.

Open Calculator

Related Calculators