Returns the nearest integer that is less than or equal to a specified number.

Syntax

FLOOR(<expN>)

<expN>

A number from which to determine and return the integer that is less than or equal to it.

Description

FLOOR( ) returns the nearest integer that is less than or equal to <expN>; in effect, rounding positive numbers down and negative numbers up away from zero. If you pass a number with any digits other than zero (0) as decimal digits, FLOOR( ) returns the nearest integer that is less than the number. If you pass an integer to FLOOR( ), or a number with only zeros for decimal digits, it returns that number.

For example, if the default number of decimal places is 2,

FLOOR(2.10) returns 2.00

FLOOR(–2.10) returns –3.00

FLOOR(2.00) returns 2.00

FLOOR(2) returns 2

FLOOR(–2.00) returns –2.00

Use SET DECIMALS to set the number of decimal places FLOOR( ) displays.

When you pass a positive number to it, FLOOR( ) operates exactly like INT( ). See the table in the description of INT( ) that compares INT( ), FLOOR( ), CEILING( ), and ROUND( ).