Absolute Value Calculator Formula
Understand the math behind the absolute value calculator. Each variable explained with a worked example.
Formulas Used
Abs Val
abs_val = abs(num)Sign
sign = num > 0 ? 1 : (num < 0 ? -1 : 0)Squared
squared = pow(num, 2)Variables
| Variable | Description | Default |
|---|---|---|
num | Number | -7.5 |
How It Works
Absolute Value
Definition
The absolute value of a number is its distance from zero on the number line, always non-negative. ≥ 0 for all x
x = x if x ≥ 0, and x = -x if x < 0 Properties
x = 0 only when x = 0x xy = x × y (triangle inequality)x + y ≤ x + y
Worked Example
Find the absolute value of -7.5.
- 01|-7.5| = 7.5
- 02The number is negative, so the sign is -1
- 03(-7.5)² = 56.25
Frequently Asked Questions
What is absolute value?
Absolute value is the distance of a number from zero, regardless of direction. It strips away the negative sign if present.
Is absolute value always positive?
Absolute value is always non-negative. It equals zero only when the input is zero, and is positive for all other inputs.
How is absolute value used in real life?
Absolute value is used when only magnitude matters: distance between points, error margins, temperature differences, and electrical signal strength.
Learn More
Guide
How to Graph Absolute Value Functions
Learn how to graph absolute value functions step by step. Covers the V-shape, vertex, reflections, stretches, and transformations of y = |x| with examples.
Ready to run the numbers?
Open Absolute Value Calculator