Absolute Value Calculator
Find the absolute value of any positive or negative number instantly. Used in math, physics, and programming wherever only the magnitude of a value matters, not its sign.
About this calculator
The absolute value of a number is its distance from zero on the number line, always expressed as a non-negative value. It is written as |n| and defined as: |n| = n if n ≥ 0, or |n| = −n if n < 0. So |7| = 7 and |−7| = 7 — both are 7 units from zero. The absolute value function strips away the sign of a number, leaving only its magnitude. In programming, this is implemented as Math.abs(n). Absolute value appears throughout mathematics — in distance calculations, error measurement, complex numbers, and solving equations involving inequalities. It is also foundational in statistics (mean absolute deviation) and physics (speed vs. velocity).
How to use
Enter any number into the Number field. For example, enter n = −43.7. The calculator computes |−43.7| = −(−43.7) = 43.7. Now try a positive number: enter n = 19. Since 19 ≥ 0, |19| = 19 — unchanged. For zero: |0| = 0. The absolute value of any real number is always zero or positive, regardless of whether the input was negative, positive, or zero.
Frequently asked questions
What is the absolute value of a negative number and why is it positive?
The absolute value of a negative number is its positive counterpart, because absolute value measures distance from zero — and distance is always non-negative. For example, |−15| = 15, because −15 is exactly 15 units away from zero on the number line. The definition |n| = −n when n < 0 looks counterintuitive, but since n is negative, −n is positive, giving the correct result. Think of it as 'remove the minus sign' — absolute value cares only about how far a number is from zero, not which direction it lies.
How is absolute value used in real-world calculations?
Absolute value appears whenever only the size of a difference matters, not its direction. In navigation and physics, speed is the absolute value of velocity — a car moving at −60 km/h (reversing) still has a speed of 60 km/h. In finance, absolute value is used to measure the magnitude of a gain or loss without caring whether it's positive or negative. In statistics, mean absolute error (MAE) uses |predicted − actual| to measure forecast accuracy. In engineering, it appears in tolerance checks: |measured − target| ≤ acceptable error.
How do you solve an equation that contains absolute value, like |x − 3| = 5?
To solve an absolute value equation like |x − 3| = 5, you split it into two cases because the expression inside can be either positive or negative and still produce the same absolute value. Case 1: x − 3 = 5, giving x = 8. Case 2: x − 3 = −5, giving x = −2. So the solutions are x = 8 and x = −2. You can verify both: |8 − 3| = |5| = 5 ✓ and |−2 − 3| = |−5| = 5 ✓. This two-case approach applies to any absolute value equation where the right-hand side is a positive constant.