Math & Trig

ABS Function in Excel

Returns the absolute value of a number (the number without its sign).

Syntax

  • =ABS(number)

Arguments

  • number (required): The number to get absolute value of

Examples

  • =ABS(-5) - Absolute value of -5 - Result: 5
  • =ABS(A1-B1) - Absolute difference between two values - Result: Positive difference
  • =IF(ABS(A1-B1)<0.01, "Equal", "Different") - Compare with tolerance - Result: Comparison result

ABS in reporting workflows

  • Use absolute references when copying formulas across rows.
  • For conditional totals see [SUMIF](/functions/sumif/) and [SUMIFS](/functions/sumifs/).
  • Filtered lists may need [SUBTOTAL](/functions/subtotal/) instead of SUM on visible cells only.

Common errors

  • Returns positive value regardless of input sign

Use cases

  • Distance calculations
  • Variance analysis
  • Error tolerance checks

Frequently asked questions

  • What is ABS function used for? ABS returns the absolute (positive) value of a number. -5 becomes 5, 5 stays 5. Common uses: calculating distances/differences regardless of direction, comparing values with tolerance, and ensuring positive results.
  • How do I calculate the difference between two numbers? Use =ABS(A1-B1) to get the positive difference regardless of which is larger. This avoids negative results when B1>A1.
  • How do I compare floating-point numbers with ABS? Due to floating-point precision, use tolerance: =IF(ABS(A1-B1)<0.0001, "Equal", "Different"). This handles tiny differences from calculations that should be equal.
  • Can ABS work with complex numbers? No, ABS only works with real numbers. For complex numbers, use IMABS: =IMABS(COMPLEX(3,4)) returns 5 (the magnitude of 3+4i).
  • What is the difference between ABS and SIGN? ABS returns the magnitude (always positive). SIGN returns the sign: -1 for negative, 0 for zero, 1 for positive. To reconstruct: number = ABS(number) * SIGN(number).

Editorial review

  • Reviewed by Excel.Directory Editorial Team. Updated May 2026.