Skip to content
CalculatorAtlas

Absolute Value Calculator

Tested

Absolute value of a number.

Tested, not yet published. The formula for this calculator is implemented and passes its automated checks. This page stays non-indexable until it is reviewed and published.

Results

Enter your values and press Calculate. Results appear here.

  • • Result

Quick answer

The absolute value |x| is x if x ≥ 0 and −x otherwise: the distance from zero. |−7.5| = 7.5.

Enter any real number. The calculator returns its absolute value.

Related tools: Fraction Calculator: Add, subtract, multiply and divide fractions with simplified and mixed-number results. Ratio Calculator: Simplify a ratio of two whole numbers. Average Calculator: Arithmetic mean, sum, count, minimum and maximum of a list of numbers.

How to use the Absolute Value Calculator

  1. Enter number.
  2. Press Calculate to see the result, and use Reset to start again.
Inputs of the Absolute Value Calculator
InputWhat to enterAllowed values
NumberA number—

Formula and method

Formula

|x| = x if x ≥ 0, else −x

IEEE-754 double precision; shown to at most 6 decimal places.

Distance from zero.

Worked examples

These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.

Example 1

Inputs: Number = -7.5.

Results of example 1
ResultValue
|x|7.5

Example 2

Inputs: Number = 3.

Results of example 2
ResultValue
|x|3

Example 3

Inputs: Number = 0.

Results of example 3
ResultValue
|x|0

The first line is the headline result (|x|). IEEE-754 double precision; shown to at most 6 decimal places.

Meaning

Absolute value strips the sign. |−7.5| = |7.5| = 7.5, and |0| = 0. It measures distance on the number line: the distance between a and b is |a − b|.

Rules

|ab| = |a||b|, |a + b| ≤ |a| + |b| (triangle inequality). An equation |x| = 3 has two solutions, 3 and −3. The absolute value is never negative.

Absolute value as distance

|x| is the distance of x from zero, so |−7.5| = 7.5. More generally |a − b| is the distance between a and b: the gap between −5 °C and 8 °C is |−5 − 8| = 13 degrees.

Absolute value does not distribute over addition: |3 + (−5)| = 2, but |3| + |−5| = 8. This is the triangle inequality, |a + b| ≤ |a| + |b|.

What happens with invalid input

These messages are produced by the calculator itself, so you know what to fix.

  • Number: entering "q" shows "Number must be a number." beside that field and no result.

Choosing between the Absolute Value Calculator and similar calculators

Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.

Choosing between the Absolute Value Calculator and similar calculators
CalculatorYou enterIt returns
[Fraction Calculator](/math/fraction-calculator/)numerator 1, denominator 1 and operationResult
[Ratio Calculator](/math/ratio-calculator/)first number and second numberSimplified ratio
[Average Calculator](/math/average-calculator/)numbersAverage (mean)
[Long Division Calculator](/math/long-division-calculator/)dividend and divisorQuotient
[Percent Off Calculator](/math/percent-off-calculator/)original price and discountSale price

Background: rounding and basic arithmetic

Rounding to a place looks at the digit just to its right: 0 to 4 rounds down and 5 to 9 rounds up (the half-up convention, so 2.5 becomes 3). Rounding 838.274 gives 800 to the nearest hundred, 840 to the nearest ten and 838 to the nearest one.

Some systems use banker's rounding (half to even), which sends 2.5 to 2 and 3.5 to 4; check which convention your task requires, and round only at the end of a multi-step calculation.

Assumptions and limitations

  • Any real number

If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for number to confirm this.

Frequently asked questions

What is |−3|?

|−3| = 3, the distance of −3 from zero on the number line.

Can absolute value be negative?

No. Absolute value is a distance, so it is zero or positive.

How do I solve |x − 2| = 5?

|x − 2| = 5 means x − 2 = 5 or x − 2 = −5, so x = 7 or x = −3.

Is |a + b| equal to |a| + |b|?

Only when a and b have the same sign. For 3 and −5 the first is 2 and the second is 8.

How is absolute value different from the magnitude of a vector?

For a single real number they match. A vector has several components, so its magnitude uses the square root of the sum of squares instead.

What does the Absolute Value Calculator calculate?

Absolute value of a number. It returns |x|.

What formula does the Absolute Value Calculator use?

|x| = x if x ≥ 0, else −x. Distance from zero.

How is the result rounded or limited?

IEEE-754 double precision; shown to at most 6 decimal places. Any real number.

What is an example of a absolute Value result?

With number -7.5, the |x| is 7.5.

Sources

  • OpenStax, Algebra and Trigonometry 2e (Rice University): exponents, radicals, logarithms and inverse trigonometric functions

Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.