FLOOR
math
What changes
- Input
- numeric arguments
- Output or change
- numeric value
- Return type
- The return type depends on the input type of numeric_expression: Input type Return type float, real float decimal(p, s) decimal(p, 0) int, smallint, tinyint int bigint bigint money, smallmoney money b
Syntax at a glance
FLOOR ( numeric_expression )
Work example
Round a value down to the greatest whole number not above it.
Test negative fractions because floor moves toward negative infinity.
Check your work FLOOR(-2.1) is -3, not -2.
Practice SQL
Open in SQL FlowSELECT FLOOR(CAST(-2.1 AS decimal(5,2))) AS rounded_down;
Open Microsoft Learn for full syntax, permissions, and details for your version.