Contact

FLOOR.MATH Function (LibreOffice Calc)

Math Beginner LibreOffice Calc

Round to a multiple with FLOOR.MATH in LibreOffice Calc. Learn the default downward rule and the mode that changes negative-number rounding.

Verification status: Saved LibreOffice Calc 25.2.3.2 observations and supplementary LibreOfficeDev 26.8.0.0.alpha0 XLSX results were reviewed for the identified examples. The historical stable installation was not rerun; the guide distinguishes those evidence sets. How formula examples are checked

Availability and version history

  • Introduced: LibreOffice 5.0, explicitly stated in official FLOOR.MATH Help.
  • Availability: Supported in LibreOffice 26.8.1.1, confirmed by the versioned function registry. This is not a final supported version.
  • Scope: Desktop Calc; formula names and separators depend on language/settings. Other spreadsheet products need separate compatibility checks.
  • Checked: October 14, 2026. Documentation/source evidence; saved 25.2.3.2 native observations and supplementary development-build XLSX tests are scoped separately below.

Validation scope: The saved native observations in this guide were produced in LibreOffice Calc 25.2.3.2 on Linux on October 13, 2026. This revision verified the corresponding saved ODS values against the result ledgers; it did not rerun that historical installation. Supplementary numerical cases were recalculated through imported XLSX files in LibreOfficeDev 26.8.0.0.alpha0 (build 2c87e51eeaa2b413ff4ae097b2705eea1995d8e5). That development-build/import check is separate from direct formula entry and from the stable-release support evidence.

FLOOR.MATH moves a value to a chosen numeric increment. With a positive number, it rounds to the multiple at or below the value. With a negative number, the optional Mode changes whether the result moves farther from or closer to zero. The sign of Significance is ignored. This makes it useful for allocating quantities in fixed steps, bucketing values and handling sign-sensitive negative balances.

Its companion function is CEILING.MATH, which moves positive numbers up to a step rather than down.

Syntax (English Calc names)

FLOOR.MATH(Number [; Significance [; Mode]])

Number is required. The other two arguments are optional and positional. In a typical English Calc configuration, use semicolons and a decimal point. The formula =FLOOR.MATH(3.45;-3) returns 3 in native Calc, not an error, because negative significance is treated as a positive step magnitude. See official FLOOR functions Help, FLOOR.MATH subsection (reviewed 2026-10-13).

Argument Required Default Meaning
Number Yes None Numeric value or reference to round.
Significance No 1 The step magnitude. Its sign is ignored: -3 acts as a step of 3.
Mode No 0 For negative values: omitted/zero rounds away from zero; any nonzero number rounds toward zero. For positive values, Mode does not alter the documented direction.

This is not a decimal-place parameter. Use a number such as 2, 5, or 0.5 to name a step rather than a count of decimal digits.

How FLOOR.MATH differs from ordinary “round down”

For a nonnegative value, FLOOR.MATH chooses the greatest permitted multiple not above the input. For a negative value, the default mode chooses the next more negative multiple, but nonzero Mode chooses the permitted multiple closer to zero.

For a nonzero step s = ABS(Significance), the independent mathematical rules are:

  • Number >= 0 or Mode = 0: s Ă— floor(Number / s).
  • Number < 0 with Mode <> 0: s Ă— ceil(Number / s).

Here “floor” and “ceil” mean mathematical integer-rounding operators, not instructions to substitute the legacy Calc FLOOR or CEILING functions without checking their sign conventions.

Reproducible examples

Formula Expected and native result Meaning
=FLOOR.MATH(3.45) 3 Default step = 1.
=FLOOR.MATH(3.45;-3) 3 Sign of significance ignored.
=FLOOR.MATH(-1.234) -2 Default mode, negative input moves away from zero.
=FLOOR.MATH(-45.67;-2;0) -46 Mode zero for a negative input.
=FLOOR.MATH(-45.67;2;1) -44 Nonzero mode moves negative number toward zero.
=FLOOR.MATH(3.45;0.5) 3 Down to a half-step.
=FLOOR.MATH(-3.45;0.5) -3.5 Default mode moves away from zero.
=FLOOR.MATH(-3.45;0.5;1) -3 Nonzero mode moves toward zero.
=FLOOR.MATH(0;3) 0 Already on a step.

All formulas in this table were natively executed in LibreOffice Calc 25.2.3.2 and matched independently calculated Decimal expectations. The official Help separately documents the first five results, the mode rules and the introduction version.

Worked example: group a quantity into complete batch sizes

Imagine 17.2 metres of material in stock, but the process only consumes full 5-metre lengths. To calculate the usable quantity in complete lengths:

=FLOOR.MATH(17.2;5)

Result: 15. You can allocate three complete 5-metre lengths and have 2.2 metres remaining. The companion capacity calculation =CEILING.MATH(17.2;5) is 20, which answers a different question: the amount to order if all 17.2 metres are needed. Choose the operation based on whether you need an upper supply bound or a lower full-pack allocation.

The following nested calculation was directly validated in Calc:

=IF(1=1;FLOOR.MATH(17.2;5);999)

Result: 15. In your own sheet, replace 17.2 with A2 and the step 5 with B2: =FLOOR.MATH(A2;B2).

Advanced use: negative values and worksheet references

Enter -45.67 in J2, 2 in K2, then try:

=FLOOR.MATH(J2;K2)
=FLOOR.MATH(J2;K2;1)

The first produces -46, while the second produces -44 in the tested version. Both cell-reference forms were entered natively. For a refund or negative adjustment, do not choose the mode just because it appears to be a “round down” function; the direction may change the amount paid or owed.

Fractional binning

=FLOOR.MATH(3.45;0.5)
=FLOOR.MATH(3.45;-0.5)

Both return 3 when executed in the native test workbook. To make half-unit bins, use a step of 0.5; the negative step has the same magnitude. The input -3.45 would instead produce -3.5 with the default mode and -3 with mode 1.

Nested or derived values

=FLOOR.MATH(9.5/2;2)

Returns 4 (9.5 Ă· 2 = 4.75, rounded down to an integer multiple of 2). This formula was directly executed in Calc. It is useful when a formula computes the amount to be categorized before binning.

Prevent invalid configuration values

A proposed input guard for the quantity in A2 and step in B2 is:

=IF(B2=0;NA();FLOOR.MATH(A2;B2))

This exact wrapper is a reasoned validation proposal, not a separately executed native assertion in the supplied workbook. It makes a zero step visible as #N/A rather than silently treating the output as zero. Real workbooks may need additional blank-cell, text and unit validation.

FLOOR.MATH vs FLOOR, FLOOR.PRECISE and FLOOR.XCL

The FLOOR function has sign-sensitive rules for Significance, including a different mixed-sign constraint; the .MATH form ignores that sign. FLOOR.PRECISE has no Mode option and is not equivalent to mode 1 for negative values. FLOOR.XCL exists for earlier Excel compatibility and differs again for negative inputs. On -3.45 with significance 2 and mode 1, FLOOR.MATH returned -2 in the native test. Replacing it with another FLOOR-family function without testing the signs can change downstream decisions.

Spreadsheet setup and reliable formula entry

The formulas below use English function names, a decimal point, and semicolons (;) between arguments. Calc’s display depends on the language and Tools → Options → LibreOffice Calc → Formula settings; function names and argument separators can be changed. If your installation uses translated names or commas, adjust input to match your configuration rather than changing the mathematics. The saved validation workbook was executed with Calc 25.2.3.2 on Linux, with expressions entered through the native UNO formula interface. LibreOffice Formula Options.

The inputs are numbers, not strings. For cell-based use, place the value in J2 and the step in K2, then substitute those addresses for numerical literals. Currency amounts are numbers with currency formatting applied afterward; avoid rounding already rounded results repeatedly in a chain of formulas.

Choosing the correct rounding operation

Goal Useful LibreOffice function Main distinction
Move to a selected multiple and control the negative-value direction This page’s .MATH function Mode switches what happens to negative values.
Conventional native rounding to a multiple CEILING or FLOOR Different default significance sign rules; mixed-sign inputs can behave differently.
Nearest multiple, not consistently up or down MROUND Which multiple is closest matters.
Round decimal places rather than multiples ROUND Rounds to a number of decimal digits.
Move away from or toward zero at a decimal precision ROUNDUP / ROUNDDOWN They do not express an arbitrary step as conveniently.

Practical limits and troubleshooting

  • Omitting an optional argument differs from passing zero. Omit the optional arguments to use their documented defaults. Avoid passing an empty text cell unintentionally.
  • Step size: use a meaningful nonzero significance for business calculations. In Calc 25.2.3.2, a zero significance returned 0 for the tested positive and negative examples; this can silently conceal a missing configuration value. A safer pattern is =IF(K2=0;NA(); FLOOR.MATH(A2;K2) ) when zero is invalid in your workflow.
  • Text in a numeric field: the native tests with literal text such as "abc" returned #VALUE! (internal error 519). Check that imported numeric cells are actually numeric and that your locale’s decimal separator is correct.
  • Too many arguments: a tested four-argument call returned Err:504. Use one required argument plus at most two optional arguments.
  • Binary floating-point precision: apparently exact decimal steps can exhibit tiny numerical differences. For currency, choose the correct increment and use formatting or a final ROUND(...;2) when needed for output; do not interpret extra displayed digits as new precision.
  • Large input and rounding magnitude: choose Significance in the same units as Number (for example, metres with metres, currency units with currency units). A time is stored as a fraction of a day, so a 15-minute step is 15/1440, not 15.
  • Nested formulas and references: Calc successfully evaluated both in the native tests. If a copied formula gives a surprising result, inspect the underlying cell values, not only their displayed formatting.
  • Negative values: select Mode intentionally; never apply positive-only intuition to refunds, deficits or balances.

Compatibility, scope and standardization

The Document Foundation’s official Calc Help documents this .MATH function as available since LibreOffice 5.0 and designed for Microsoft Excel 2013-or-later formula interoperability. The Help explicitly says it is not part of OpenDocument 1.3 OpenFormula and identifies a COM.MICROSOFT compatibility namespace. A function being saved in an ODS workbook is not proof that every other ODF implementation calculates it. Current LibreOffice Help pages may document features that differ by installation, locale or version. The native results supplied here establish behavior only for the tested LibreOffice Calc 25.2.3.2/Linux environment, not for Excel, Google Sheets, OpenOffice, mobile editions or future releases. For cross-software exchange, save a copy, reopen in the actual target program, and compare sign, step and mode behavior against expected values.

Official references