Absolute value calculator
Computes the absolute value of an integer or decimal (the distance from zero on the number line) with a configurable 0-12 digit precision, noting that precision only affects display. A reference table.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Result
|x| is the distance from zero; a reference table.
Enter a number to compute the absolute value
Absolute value: 0 · Decimal places: 0
What this tool does
- Check homework
- Turn a signed difference into a magnitude
- Control the displayed precision
Example
Input
-12.5
Output
Absolute value Input: -12.5 |-12.5| = 12.5 Precision: 6 decimal places (-12.500000 → 12.500000) Method: the absolute value is the distance from zero on the number line: |x| = x for x ≥ 0 and |x| = −x for x < 0; the precision only affects the output format and does not change the value used in later calculations.
Frequently asked questions
Definition of the absolute value?
|x| = x for x >= 0 and |x| = -x for x < 0, i.e. the distance from zero, so the result is never negative.
Does precision change the number?
No. digits only formats the output (rounded to that many decimals); the returned value field is already rounded to it.
What range is supported?
Regular JavaScript numbers (about +/-1.8e308); empty or non-numeric input raises an error instead of silently returning 0.
Is my data uploaded?
No, everything runs locally. A reference table.
Keywords:absolute value