Enter any number below to find its absolute value - the distance from zero on the number line, always expressed as a positive number. The result updates instantly as you type.
Absolute Value Calculator
What is absolute value?
Absolute value represents a number's distance from zero on the number line, regardless of direction. The absolute value of both 5 and -5 is 5, because both are exactly 5 units away from zero.
Mathematically, we write absolute value using vertical bars:
|x| = x \text{ if } x \geq 0, \quad |x| = -x \text{ if } x < 0In plain terms: if the number is already positive (or zero), the absolute value is the number itself. If the number is negative, flip the sign to make it positive.
Examples
- |7| = 7
- |-7| = 7
- |0| = 0
- |-3.14159| = 3.14159
- |100 - 250| = |-150| = 150
When is absolute value useful?
Distance calculations - When you only care about how far apart two values are, not which is larger. The difference between 10 and 15 is 5, just like the difference between 15 and 10.
Error measurement - In science and statistics, you often want the magnitude of an error without caring whether you overshot or undershot the target.
Programming - Many algorithms need to compare magnitudes or ensure positive values. Most languages have an abs() function for this.
