Code tool

Absolute Value Calculator

Enter a finite decimal value to calculate its non-negative magnitude.

In-browser processingNo account requiredPrivacy details ↗

Enter a finite number.

A QUICK WALKTHROUGH

How to use this tool

  1. Enter a finite decimal number.
  2. Calculate its absolute value.
  3. Review the formula |x| = x for x ≥ 0, otherwise −x.

Definition

|x| = x when x ≥ 0 and |x| = −x when x < 0. Negative zero displays as zero.

Limits

Input must be a finite JavaScript number. The result uses browser numeric formatting up to 12 significant digits.

Local processing

Calculation runs in this browser.

GOOD TO KNOW

Common questions

Can the result be negative?

No. Absolute value is always zero or positive.