Absolute Value Calculator
Calculate the absolute value of any real number, with a step-by-step explanation of the result.
Did this tool work for you?
How to use this calculator
The absolute value of a number is its distance from zero on the number line, always non-negative. Positive numbers and zero are unchanged; negative numbers become positive.
- 1
Enter any real number — positive, negative, or zero.
- 2
The absolute value is displayed instantly along with a step-by-step explanation.
- 3
The result is always greater than or equal to zero.
Frequently asked questions
What does absolute value mean?
Absolute value measures a number's distance from zero on the number line, without regard to direction. |−5| = 5 and |5| = 5 because both are 5 units from zero. The absolute value is always non-negative and equals the number itself if the number is already positive or zero.
What notation is used for absolute value?
Vertical bars: |x|. In programming, you typically use the abs() function (Python, C, Java) or Math.abs() (JavaScript). In complex number contexts, |z| denotes the modulus (distance from the origin in the complex plane), which is a generalization of absolute value.
How do you solve absolute value equations?
To solve |x| = a (for a ≥ 0), split into two cases: x = a or x = −a. For |x − 3| = 5: x − 3 = 5 → x = 8, or x − 3 = −5 → x = −2. Always check both solutions in the original equation. If a < 0, there is no solution since absolute values are never negative.
What is the triangle inequality for absolute values?
The triangle inequality states |a + b| ≤ |a| + |b| for all real numbers a and b. Equality holds when a and b have the same sign (or one is zero). This extends to complex numbers and is fundamental in analysis, metric spaces, and vector geometry.
Absolute value — meaning, notation, and applications
Absolute value as distance
The most intuitive interpretation of |x| is the distance from x to 0 on the real number line. Distance is never negative, which is why |x| ≥ 0 always. For two numbers a and b, |a − b| is the distance between them — this interpretation underpins the definition of metric spaces in advanced mathematics, and is directly used in statistics when calculating mean absolute deviation.
Absolute value functions and graphs
The graph of y = |x| is a V-shape with vertex at the origin: the left branch has slope −1 and the right branch has slope +1. Transformations shift or stretch this V: y = |x − h| + k moves the vertex to (h, k). Absolute value functions model situations where only magnitude matters — signal amplitude, error magnitude, and distance regardless of direction.
Applications in data science and optimization
In machine learning, the Mean Absolute Error (MAE) loss function is simply the average of |predicted − actual| over all data points. L1 regularization (Lasso) adds |w| for each model weight, shrinking less important weights to exactly zero and producing sparse models. The absolute value arises wherever you need to measure error or deviation symmetrically in both directions.
Learn more from an authoritative source:
WikipediaCube Root Calculator
Calculate the cube root of any real number. Shows exact result for perfect cubes, decimal approximation for others, and the verification check.
Reciprocal Calculator
Calculate the reciprocal of a number or fraction. Enter a whole number or numerator/denominator — get the reciprocal as a fraction and decimal.
Rounding Calculator
Round any number to a chosen number of decimal places, significant figures, or the nearest integer, 10, 100, or 1000.
Scientific Notation Calculator
Convert numbers to and from scientific notation, or multiply and divide numbers in scientific notation. Handles very large and very small numbers precisely.
Number Sorter
Sort a list of numbers in ascending or descending order. Optionally remove duplicates. Shows count, min, max, sum, mean, and median.
Factor Calculator
Find all factors, factor pairs, prime factorization, and the total number of factors for any positive integer.
Results are estimates for informational purposes only and do not constitute professional financial, medical, legal, or technical advice. Read full disclaimer →