MROUND Function (LibreOffice Calc)
Round to increments in LibreOffice Calc with MROUND. Work through scheduling values, halfway ties, mixed signs, zero multiples and decimal precision.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: MROUND rounds to the nearest specified increment. Calc permits mixed signs, rounds exact halfway cases away from zero and returns zero for a zero multiple.
Availability and version history
- Introduced: Documented by LibreOffice 26.8.1.1; original introduction not established.
- Availability: Supported in LibreOffice 26.8.1.1, verified against its function registry. This identifies a supported release, not a final working version.
- Scope: Desktop Calc, using the English function name. Availability in other spreadsheet applications is separate.
- Checked: 2026-10-14 — function reference; versioned support. Documentation/source check; not a new native test. Existing example-specific test claims below retain their stated scope.
The MROUND function in LibreOffice Calc is used for this task: Returns a number rounded to a specified multiple. Round a value to the nearest specified multiple.
This guide explains how to read the formula, reproduce a concrete example, interpret its result and recognize common input mistakes.
Syntax and arguments
MROUND(number; multiple)
| Argument | Required? | Meaning |
|---|---|---|
Number |
Yes | The number to round off |
Multiple |
Yes | The multiple to which you want to round number |
Calc formulas normally use semicolons (;) between arguments in common configurations; the displayed separator may depend on settings or locale.
Worked example
=MROUND(13;5)
Expected result: 15.
Why it works: Round a value to the nearest specified multiple.
How to use it in your own spreadsheet
- Identify the cells or inputs that correspond to the sample values above.
- Enter the formula in an empty cell, changing the references or literal values to match your sheet.
- Compare the output with a manual check on a small known example.
- Extend the formula to a larger dataset only after you understand the result.
Common problems and practical checks
- Check the accepted numeric domain, units and array dimensions for the specific operation.
- If an error appears, check that the function arguments are of the expected type.
- A pasted formula may produce an error when it uses the other program’s argument separator or unsupported options.
Additional worked application and edge cases
Two required arguments
Number is the value to round, and Multiple specifies the spacing between allowed results. Both arguments are required. For a nonzero multiple, the calculation is a rounded quotient multiplied back by that multiple. It is not a request to keep a particular number of decimal places.
For example, a multiple of 5 means results such as 0, 5, 10 and 15; a multiple of 0.25 means quarter-unit increments. Number and Multiple must use the same unit.
Stepwise example: plan durations in 15-minute increments
Enter planned durations 22, 23, 37, 38 and 52.5 minutes in A2:A6. Put the numeric increment 15 in D1. Enter =MROUND(A2;$D$1) in B2 and fill down.
| Input minutes | Independently expected rounded minutes |
|---|---|
| 22 | 15 |
| 23 | 30 |
| 37 | 30 |
| 38 | 45 |
| 52.5 | 60 |
The fixed reference keeps the increment constant. This nearest-increment rule can round downward as well as upward, so it is not a guarantee of enough reserved time. Choose a directional rounding policy separately if a requirement says never to round down.
Halfway cases and signs in Calc
The reviewed rounding implementation resolves exact halfway cases away from zero. Thus =MROUND(12.5;5) is expected to give 15, and =MROUND(-12.5;5) gives -15. A negative number does not automatically require a negative multiple in Calc.
The source has no same-sign rejection: =MROUND(13;-5) gives 15, =MROUND(-13;5) gives -15, and =MROUND(-13;-5) also gives -15. The sign of the nonzero multiple does not change the set of multiples available. These are Calc-specific source-derived expectations; do not impose another application’s sign restrictions on this function.
If Multiple is zero, the reviewed Calc implementation returns 0, including =MROUND(13;0). Therefore the quotient-based explanatory expression is not a valid replacement at a zero multiple: it would divide by zero. In a scheduling workflow, a zero increment is probably a setup error even though the function has a defined zero result, so validate D1 as positive.
Advanced application: keep the units explicit
For times stored as fractions of a day, =MROUND(A2;TIME(0;15;0)) rounds to a quarter hour when A2 is a genuine Calc time value. With A2 entered as =TIME(10;7;0), the expected displayed time is 10:00; with =TIME(10;8;0), it is 10:15. Format the result as a time to see that interpretation.
Do not mix the numeric-minute fixture above with a fraction-of-day increment. A numeric 22 is 22 whole days when interpreted as a date/time serial, not 22 minutes. Keep a separate unit-labeled duration column or perform an explicit conversion.
Fractional increments and precision
=MROUND(1.4;0.5) has expected result 1.5. Values such as 0.1 and 0.05 are not exactly representable in binary floating point. Calc applies approximate-value and corrected-rounding helpers, but this does not make all decimal boundary cases exact or certify every final digit.
Use the required display precision, and test values just below, at and just above a critical boundary. For a workflow with exact integer subunits, calculate in those integer subunits when practical. Do not add an arbitrary tiny offset to every number merely to force a preferred tie outcome; that changes the rounding policy.
Errors and implementation evidence
Nonnumeric inputs or upstream errors need correction; MROUND does not supply a fallback argument. Very large quotients or products can exceed numeric limits. The zero-multiple and mixed-sign behavior comes from AnalysisAddIn::getMround. The default corrected-rounding mode is defined by rtl/math.hxx and implemented in rtl/math.cxx. These are code references, not native test results.
Verification scope for this addition: These added results were independently calculated or derived from the cited documentation/source. They were not newly tested in LibreOffice Calc. The original example-specific Calc 25.2.3.2 claims elsewhere on this page remain historical and apply only to those original examples. The cited 26.8.1.1 source tag is a code reference, not a claim of a new run in that release.
Related functions
Documentation and verification
- LibreOffice Calc Help
- The standalone example was calculated using LibreOffice Calc 25.2.3.2 on October 9, 2026 and its computed result matched the expected value. This does not certify every option, version, or other example.