Documentation/Calc Functions/FLOOR/en

Function name:
FLOOR

Category:
Mathematical

Summary:
Rounds a number to the nearest multiple of a significance value. In most cases, the number is rounded down (toward -∞). However, a mode parameter is provided and when this is set to a non-zero value, then negative numbers are rounded up (toward +∞).

Syntax:
FLOOR(Number [; Significance[; Mode]])

Returns:
Returns a real number that is the rounded value and is an integer multiple of the significance value.

Arguments:
Number is a real number, or a reference to a cell containing that number, that is the value to be rounded.

Significance is a real number, or a reference to a cell containing that number, that is the significance value to be used. If omitted, Significance defaults to +1 or -1 depending on the sign of Number.

Mode is a real number, or a reference to a cell containing that number, that is a Boolean mode indicator. Mode is only effective when both Number and Significance are negative. If Mode is present and equal to any non-zero value (including TRUE), negative numbers are rounded up (toward +∞). If Mode is omitted, or equal to zero or FALSE, negative numbers are rounded down (toward -∞).


 * If any argument is non-numeric, then FLOOR reports a #VALUE! error.
 * If one of Number or Significance is positive while the other is negative, then FLOOR reports an invalid argument error (Err:502).
 * If either Number or Significance is equal to 0, then FLOOR returns 0.

Details specific to FLOOR function

 * With Significance set or defaulted to -1 or +1 (with the same sign as Number) and Mode set or defaulted to 0 or FALSE, FLOOR provides functionality that implements the standard mathematical definition of a floor value.
 * If you export a spreadsheet to Microsoft Excel, calls to the FLOOR function are converted to FLOOR.MATH (FLOOR.MATH has existed in Excel since Excel 2013). If you intend to use a spreadsheet with earlier Excel versions, use either the FLOOR.PRECISE function (that has existed in Excel since Excel 2010), or the FLOOR.XCL function that is converted to FLOOR on export and should be compatible with all Excel versions.

Related LibreOffice functions:
CEILING

CEILING.MATH

CEILING.PRECISE

CEILING.XCL

FLOOR.MATH

FLOOR.PRECISE

FLOOR.XCL

INT

ISO.CEILING

ODF standard:
Section 6.17.3, part 2

Equivalent Excel functions:
FLOOR.MATH