MROUND Function (OpenOffice Calc)
Learn the MROUND function in Apache OpenOffice Calc: Returns a number rounded to a specified multiple.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Availability and version history
- Introduced: Documented by Apache OpenOffice 4.1.16; original introduction not established.
- Availability: Supported in Apache OpenOffice 4.1.16, 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.
MROUND rounds a number to the nearest multiple of a supplied increment. The pinned OpenOffice Analysis implementation returns multiple*round(number/multiple), with a separate zero-multiple return. Unlike implementations that reject opposite signs, this inspected callback has no same-sign guard. Those source-specific sign cases are labeled reference expectations here.
Syntax and arguments
=MROUND(number; multiple)
Both numeric arguments are required. The multiple is an increment, not a count of decimal places. With a nonzero multiple, the quotient is rounded using rtl::math::round with its default corrected mode and zero decimal places, then multiplied back. For the ordinary exact midpoint cases shown, rounding is away from zero. Multiple zero returns zero before division. Examples use English function names and semicolon argument separators.
Reproducible examples
| Formula | Expected result |
|---|---|
=MROUND(13;5) |
15 |
=MROUND(12;5) |
10 |
=MROUND(12.5;5) |
15 |
=MROUND(-12.5;5) |
-15 |
=MROUND(13;-5) |
15 |
=MROUND(-13;-5) |
-15 |
=MROUND(13;0) |
0 |
The first formula preserves the original example and result. Its historical comparable LibreOffice 25.2 check was not an OpenOffice test. New values are independently checked reference expectations; no fresh native application or GUI result is claimed. Quoted results indicate text, including "" for zero-length text.
Practical worksheet: round measurements to a five-unit grid
Enter measurements 12, 13, 17 and 18 in A2:A5. Put increment 5 in F1. In B2 enter =MROUND(A2;$F$1) and fill down. Results are 10, 15, 15 and 20. The absolute reference keeps the increment fixed while each source measurement changes.
In C2 enter =B2-A2 and fill down. Adjustments are -2, 2, -2 and 2. This exposes the direction and size of each change. Nearest rounding can move an input either upward or downward; it should not be used when the requirement is always to round upward.
Advanced applications
Use a fractional increment deliberately. With increment 0.5, MROUND(1.4;0.5) gives 1.5 and MROUND(1.1;0.5) gives 1. A binary-exact increment such as 0.5 avoids some decimal-representation ambiguity, but does not turn every possible calculation into exact arithmetic.
Inspect the sign contract. MROUND(13;-5) gives 15 and MROUND(-13;5) gives -15 in the pinned source model. The sign of the nonzero increment does not impose a direction here; the divide-round-multiply calculation controls the result. Do not replace these results with a cross-product sign error copied from another spreadsheet.
Separate aggregate and row rounding. For two inputs 2 and 2 with increment 5, the sum of individually rounded values is 0, while rounding their sum gives 5. State whether the rule applies to each record or to the final total. Those operations answer different questions.
Errors, edge cases and troubleshooting
A multiple of zero returns zero in this implementation; it does not mean leave the input unchanged. Validate the increment if zero would indicate missing configuration. The callback rejects a non-finite result through its finite-result macro, but no native overflow-cell diagnostic is claimed.
The default corrected rounding mode includes floating-point corrections. The exact midpoint controls use ordinary small values with simple quotients; they do not certify every near-half decimal representation or huge quotient. Preserve the numeric inputs and inspect cases close to a boundary when reproducing results across applications.
MROUND is not ROUND(number;digits): MROUND(13;5) selects a five-unit grid rather than five decimal places. For an always-up or always-down policy, choose the appropriate directed function and inspect its separate sign rules. Display formatting alone does not enforce an increment. These checks cover scalar numbers, not every text/blank conversion or array/import path.
Related functions
Documentation and verification
See the Apache OpenOffice MROUND reference, 4.1.16 math help, core numeric predicates and aggregation, Roman conversion, and Analysis callbacks. The original core/help/Analysis snapshots were retrieved October 13, 2026 and re-read for this guide. The rounding wrapper, rounding implementation and Analysis headers were newly retrieved October 15, 2026; those separate records support the default corrected mode and finite-result checks. See the rounding default and corrected rounding implementation. First introduction and final functioning version remain unknown, separate from documented 4.1.16 support. Source rules and independent arithmetic are not native tests.