FLOOR

All functions > MATH > FLOOR

Rounds a number down to the nearest integer (floor function).

Syntax

FLOOR(expr)
sql

Arguments

ParameterTypeRequiredDescription
numberDOUBLEYesThe number to round down

Returns

BIGINT - Integer result of rounding down

Notes

  • Always rounds towards negative infinity
  • FLOOR(2.1) = 2, FLOOR(2.9) = 2
  • FLOOR(-2.1) = -3, FLOOR(-2.9) = -3
  • Returns NULL if the input is NULL
  • For exact integers, returns the same value
  • Opposite behavior of CEIL function

Examples

Last update at: 2025/10/13 10:23:46