Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Absolute Value
7
|-7|
Original number -7
Absolute value 7

What Is the Absolute Value Calculator?

The absolute value of a number is its distance from zero on the number line, regardless of direction. It is always non-negative. This calculator takes any number you enter — positive, negative, whole, or decimal — and returns its absolute value, written mathematically as \(|x|\).

How to Use It

Type any number into the input box. You can include a minus sign for negatives and a decimal point for fractions (for example, -7.5 or 12.34). Press calculate and the tool instantly shows \(|x|\) along with the original value for reference.

The Formula Explained

The definition is piecewise: if the number is zero or positive, the absolute value equals the number itself; if it is negative, the absolute value is the number with its sign flipped (multiplied by -1).

Formally: $$|x| = \begin{cases} x & \text{if } x \ge 0 \\ -x & \text{if } x < 0 \end{cases}$$ An equivalent expression is $$|x| = \sqrt{x^2}$$ since squaring removes the sign and the square root returns the positive root.

V-shaped graph of the absolute value function with vertex at the origin
The graph of \(|x|\) forms a symmetric V with its vertex at the origin.
Number line showing a positive and negative value equidistant from zero
Absolute value is the distance of a number from zero on the number line.

Worked Example

Suppose \(x = -7.5\). Because \(-7.5\) is less than 0, we apply the second case: $$|x| = -(-7.5) = 7.5$$ So the absolute value of \(-7.5\) is \(7.5\). If instead \(x = 7.5\), then since \(7.5 \ge 0\), \(|x| = 7.5\) directly.

More Worked Examples

Each example applies the definition \( \left| x \right| = x \) when \( x \ge 0 \) and \( \left| x \right| = -x \) when \( x < 0 \). The absolute value is simply the distance from zero, so the answer is never negative.

Example 1: Negative integer, \(\left|-7\right|\)

  1. The input is \( x = -7 \).
  2. Since \( -7 < 0 \), use the second case: \( \left| x \right| = -x \).
  3. Substitute: \( \left|-7\right| = -(-7) = 7 \).
  4. Result: 7.

Example 2: Value of zero, \(\left|0\right|\)

  1. The input is \( x = 0 \).
  2. Since \( 0 \ge 0 \), use the first case: \( \left| x \right| = x \).
  3. Substitute: \( \left|0\right| = 0 \).
  4. Result: \( 0 \). Zero is the only number whose absolute value equals itself and is neither positive nor negative.

Example 3: Negative decimal, \(\left|-4.25\right|\)

  1. The input is \( x = -4.25 \).
  2. Since \( -4.25 < 0 \), use the second case: \( \left| x \right| = -x \).
  3. Substitute: \( \left|-4.25\right| = -(-4.25) = 4.25 \).
  4. Result: 4.25.

Example 4: Expression inside the bars, \(\left|3 - 8\right|\)

  1. First simplify the expression inside the absolute value bars: \( 3 - 8 = -5 \).
  2. Now take the absolute value of the result: \( \left|-5\right| \).
  3. Since \( -5 < 0 \), use the second case: \( \left|-5\right| = -(-5) = 5 \).
  4. Result: 5. Always evaluate everything inside the bars before applying \( \left| \cdot \right| \).

Key Terms

Absolute value
The non-negative size of a number regardless of its sign, written \( \left| x \right| \). For example, \( \left|-9\right| = 9 \) and \( \left|9\right| = 9 \).
Magnitude
How large a quantity is, ignoring direction or sign. For a single real number, magnitude and absolute value mean the same thing.
Number line
A straight line on which every real number has a position. Absolute value measures the distance between a number's position and zero on this line.
Piecewise function
A function defined by different rules over different intervals. Absolute value is piecewise: it equals \( x \) when \( x \ge 0 \) and \( -x \) when \( x < 0 \).
Non-negative
A number that is zero or positive (\( \ge 0 \)). Every absolute value is non-negative.
Vertex
The single lowest point of the V-shaped graph of \( y = \left| x \right| \), located at the origin \( (0, 0) \), where the function changes direction.

FAQ

Can the absolute value be negative? No. By definition the result is always zero or positive.

What is the absolute value of zero? \(|0| = 0\), because zero is exactly at the origin of the number line.

Does it work with decimals and large numbers? Yes. You can enter any real number, including decimals and large values; the calculator simply returns its magnitude.

Last updated: