Tabular IQ
Back to Function Index

ABS()

Overview

ABS() returns the absolute value of a number. The absolute value is the positive value of a number without regard to its sign. This function is particularly useful when you need to work with distances, differences, or any scenario where the magnitude of a number is important regardless of its direction.

Function Format

ABS(number)

Return Value

ABS() returns a numeric value of the same type as the input

Examples


ABS(-42)    = 42
ABS(0)      = 0
ABS(33)     = 33
ABS(-3.14)  = 3.14
ABS(3.14)   = 3.14

Notes

  • The input can be any numeric data type (integer, decimal, float).
  • The return value will be of the same data type as the input.
  • If the input is NULL, the result will be NULL.
  • This function is commonly used in calculations involving distances, differences, or when you need to ensure positive values.

See Also