Absolute Value Calculator
Find the absolute value of a number — its distance from zero, ignoring sign.
Formula and sources updated · Data sources · 1View algorithm, constants and default inputs (JSON)
About this calculator
Absolute value strips the sign from a number, leaving its magnitude. It is used whenever only size matters, such as measuring error or the distance between two points.
Worked example
calculated with the default values below
Number -42.5 Absolute value 42.500000 · Sign -1 · Opposite value 42.500000 · Squared 1,806.250000
Method and assumptions
|x| = { x, x ≥ 0; −x, x < 0 } Also returns sign(x), the opposite −x and the square x². Absolute value strips the sign from a number, leaving its magnitude. It is used whenever only size matters, such as measuring error or the distance between two points. The references explain definitions and methods; any extra preset must be checked against the assumptions on this page.
Data sources
The references explain definitions and methods; any extra preset must be checked against the assumptions on this page.
Disclaimer
These calculators give general mathematical results. They suit study, planning and estimation — verify anything that feeds a graded submission, a published figure or a financial commitment.
Implementation source
This record describes the implementation used by this page. It is not independent validation. External references, when available, support only the stated formula or definition; estimates and custom rules retain their own assumptions.
Formula and variables
|x| = { x, x ≥ 0; −x, x < 0 }
- |x|
- absolute value
- x
- input number
Also returns sign(x), the opposite −x and the square x².
Frequently asked questions
Why does the opposite of a negative number become positive?
Opposite means multiply by −1, so the opposite of −42.5 is +42.5, while the absolute value is the magnitude 42.5 with the sign removed. The squared output is non-negative because any real number squared is non-negative. Sign reports −1, 0 or 1, which is what tells you whether the original input was below, at, or above zero.
Which inputs and limits apply to Absolute Value Calculator?
Use the units shown beside each field. These are form limits, not recommended settings. Number: -1,000,000,000,000,000–1,000,000,000,000,000 |x| = { x, x ≥ 0; −x, x < 0 } Also returns sign(x), the opposite −x and the square x². Absolute value strips the sign from a number, leaving its magnitude. It is used whenever only size matters, such as measuring error or the distance between two points. The references explain definitions and methods; any extra preset must be checked against the assumptions on this page.
What is a complete worked example for Number = -42.5?
Inputs: Number = -42.5. Calculation: |x| = { x, x ≥ 0; −x, x < 0 }. Results: Absolute value = 42.500000; Sign = -1; Opposite value = 42.500000; Squared = 1,806.250000.