MROUND Function (Gnumeric)
Learn the MROUND function in Gnumeric: 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
MROUND rounds a number to a nearby multiple of a supplied increment. Use it when the meaningful unit is a quarter, a five-unit block or another spacing rather than a fixed number of decimal places. Gnumeric normally requires the number and multiple to have the same sign.
Syntax and sign rules
=MROUND(x,m)
Both numeric arguments are required: x is the value and m is the multiple. For ordinary same-sign inputs, the nearer multiple is selected. A halfway value is rounded away from zero in the inspected implementation. Opposite nonzero signs produce #NUM!. A zero multiple produces 0.
MROUND(13,5) concerns multiples of five. ROUND(13,5) concerns five decimal places. Their second arguments are different concepts despite the similar names.
Retained example
=MROUND(13,5)
The expected result is 15. Its distance from 13 is 2, while the distance to the adjacent multiple 10 is 3.
Build an increment table
Put 11, 12.5 and 13 in A2:A4 and 5 in B2:B4. In C2 enter =MROUND(A2,B2) and fill down. Results are 10, 15 and 15. The middle input is halfway and demonstrates the positive tie rule.
=MROUND(-12.5,-5) returns -15, with both inputs negative and the tie rounded away from zero. =MROUND(-13,5) instead gives #NUM! because the signs differ. Replacing only the first argument’s sign changes the validity of the call.
=MROUND(13,0) returns 0. This is an implementation rule rather than a useful model increment. If users can edit m, require a nonzero increment whenever the workbook calls for actual quantization.
Advanced use: quarter-unit measurements
If A2 stores hours and B2 contains 0.25, =MROUND(A2,B2) rounds to a quarter hour. At A2=6.125 the result is 6.25, since 6.125 is exactly halfway between 6 and 6.25.
Quarters and eighths are binary-exact, making this control easy to reproduce. If a policy requires always rounding upward, nearest-multiple rounding does not implement that rule. Choose the policy before choosing the formula.
Keep units consistent. A duration expressed in minutes needs a multiple in minutes, such as 15, rather than 0.25. A formula can calculate successfully while mixing these units and producing the wrong practical answer.
Floating-point caveats and troubleshooting
Decimal fractions such as 0.1 and 0.05 are usually not exact binary values. A result displayed as halfway may actually be slightly above or below the decision threshold. The exact 12.5/5 and 6.125/0.25 controls do not establish identical behavior for every decimal tie.
For an unexpected one-increment difference, inspect the stored number and its generating calculation. For #NUM!, check signs. For an unexpected zero, inspect m before adding an error handler. Nonnumeric values and upstream errors need correction at their source.
Rounding the displayed format does not change the argument or implement a business rule. Keep the chosen increment visible so another reader can distinguish the actual quantization from cosmetic formatting.
Availability and verification
Version coverage: Gnumeric 1.12.57 has the scoped checks below. The 1.12.62 evidence is a documentation/source check dated October 14, 2026.
- Introduced: Original introduction not established. The earliest demonstrated support in this guide is 1.12.57.
- Availability: Supported in Gnumeric 1.12.62, based on the function-specific registration.
- Scope: Desktop; the fn-math function module must be included and enabled.
- Checked: October 14, 2026. Documentation/source check; no new native test in Gnumeric 1.12.62.
The executable contract is also present in the official Gnumeric 1.12.57 fn-math source. The saved source was originally retrieved on October 17, 2026 and re-inspected for this guide. The last functioning release is not established; support in a named version is not a retirement claim.
The official release history records a MROUND fix in 1.12.51. This is a correction release, not the original introduction. The tested behavior is not generalized to every older version.
On October 17, 2026, Gnumeric ssconvert 1.12.57 recalculated a synthetic workbook in the C.UTF-8 locale. Scoped controls: =MROUND(13,5) → 15; =MROUND(12.5,5) → 15; =MROUND(-12.5,-5) → -15; =MROUND(-13,5) → #NUM!; =MROUND(13,0) → 0; =MROUND(6.125,0.25) → 6.25. These are native calculation-engine results, not GUI tests or screenshots. Other tutorial layouts and displayed outputs are independent expectations unless covered by these exact formulas. Input/output files, preserved formulas, raw values and hashes were retained. The XLSX importer logged an unused workbookProtection-element warning; changed-input controls and recorded results were checked.