Contact

MROUND in Calligra Sheets: Round to the Nearest Multiple

Mathematics Beginner Calligra Sheets

Understand MROUND in Calligra Sheets: nearest-multiple rounding, positive and negative inputs, ties, complete worked worksheets and troubleshooting.

Verification status: Consult the documentation and examples below. Native application testing has not been documented for this guide. How formula examples are checked

Quick answer: Use =MROUND(value;multiple) to round a numeric value to its nearest multiple. =MROUND(1.252;0.5) is expected to return 1.5, matching KDE’s documented example. The companion example =MROUND(-1.252;-0.5) is expected to return -1.5. Unlike rounding up or rounding down to a multiple, MROUND chooses whichever valid multiple is closer, applying its release-pinned implementation’s tie rule when the distances are equal. The examples here are documented and independently calculated, not tested in a native Calligra installation. KDE MROUND reference · 26.08.2 source.

MROUND is useful for increments such as 0.25 currency-unit steps, 15-minute scheduling quantities expressed as plain numbers of minutes, standardized lengths and integer batch sizes where the nearest increment is desirable. It is not the right choice when you must always meet or exceed a positive minimum capacity; see the differences with CEILING and FLOOR below.

Syntax, arguments and registered alias

=MROUND(value;multiple)

The pinned Calligra 26.08.2 registration requires exactly two arguments. KDE’s typed XML defines both as floating-point numeric parameters and shows the same formula order. No argument is optional, and neither has a default. In this guide, the semicolon and decimal point follow KDE’s English-language examples; another locale may require different separators. Confirm the local accepted formula syntax in Calligra’s function editor before relying on copy/paste. KDE handbook · registration · XML.

Position Argument Requirement/type Meaning
1 value Required numeric value, expression or cell reference; no default Number that is rounded to a nearby multiple.
2 multiple Required numeric increment; no default Distance between candidate rounded results. For nonzero inputs, use a multiple with the same sign as the value to avoid the source’s explicit error branch.

Registered compatibility alias: The exact 26.08.2 C++ registration gives MROUND an alternate compatibility identifier COM.SUN.STAR.SHEET.ADDIN.ANALYSIS.GETMROUND. This is not a distinct function with a separate implementation. It is not an instruction to type that dotted identifier into a particular locale. Official registration, lines 163–166.

The C++ calculation first checks explicitly for opposite signs, temporarily makes negative value and multiple positive together, and takes the remainder on the positive inputs. When the remainder is at least half the positive multiple, it advances to the next multiple, then restores the original sign. Therefore exact halfway cases round away from zero according to the inspected code path. That is an implementation-derived mathematical expectation, not evidence of a particular application-visible error or floating-point edge case. Pinned func_mround, lines 873–901.

Reproduce a worksheet: the nearest step

Open a blank sheet. Set labels A1 Scenario, B1 Value, C1 Multiple, D1 Result, and type the following values as numeric cells, not quoted strings.

Row A: Scenario B: Value C: Multiple D: Independently expected result
2 Positive, round up 1.252 0.5 1.5
3 Positive, round down 1.248 0.5 1
4 Above midpoint 7.4 0.5 7.5
5 Below midpoint 7.24 0.5 7
6 Negative, round away -1.252 -0.5 -1.5
7 Negative, round toward zero -7.24 -0.5 -7
8 Exact halfway positive 2.5 1 3
9 Exact halfway negative -2.5 -1 -3
10 Already a multiple 12 3 12
  1. Enter =MROUND(B2;C2) in D2. Independent arithmetic gives 1.5, matching the explicit KDE help example.
  2. Fill D2 down through D10 using relative references; compare each result to the final column above.
  3. Compare rows 2 and 3: 1.252 rounds up to 1.5 because its distance to 1.5 is less than to 1.0, while 1.248 rounds down to 1.0.
  4. Compare rows 6 and 7: for a negative value, the multiple must also be negative. The signed result is restored after comparing positive magnitudes.
  5. Compare rows 8 and 9: the inspected mod >= multiple/2 branch yields expected ties 3 and -3. This is a source-code inference, not a verified result captured from Calligra.
  6. Row 10 illustrates that a value already divisible by the multiple stays unchanged.

What was validated: the arithmetic above was performed independently and checked against KDE’s pinned implementation and examples. What was not validated: execution inside Calligra 26.08.2, localized formula entry, exact floating-point tie behavior across platforms, error rendering, and mixed-type cell conversion. Official XML · C++.

Further formula examples and how they work

Formula Independently expected numeric result Reason
=MROUND(1.252;0.5) 1.5 Official KDE example.
=MROUND(-1.252;-0.5) -1.5 Official KDE example, both signs negative.
=MROUND(12;3) 12 Already an exact multiple.
=MROUND(52;15) 45 52 is 7 units from 45 and 8 from 60.
=MROUND(53;15) 60 53 is 7 units from 60 and 8 from 45.
=MROUND(18.37;0.25) 18.25 Closer to 18.25 than 18.50.
=MROUND(18.39;0.25) 18.5 Closer to 18.50 than 18.25.
=MROUND(2.5;1) 3 Halfway case: source uses >= half, advancing magnitude.
=MROUND(-2.5;-1) -3 Magnitude tie moves upward, then negative sign is restored.

The examples involving 0.25 or 0.5 may be affected by binary floating-point representation close to certain boundaries. The independent checks here establish mathematical expectations and inspected branching, not a guarantee of every platform’s final displayed digits. KDE documentation · MROUND code.

Advanced worksheet: nearest appointment slots expressed in minutes

Suppose B13 contains a plain numeric count of minutes, such as 52 minutes, and C13 contains a plain numeric interval, such as 15 minutes. To select the nearest increment, type in D13:

=MROUND(B13;C13)

Expected D13 = 45 minutes. If the duration changes to 53, the expected result becomes 60 minutes. These are arithmetical demonstrations, not native Calligra test results.

For a schedule that must not undershoot a requested positive duration, choose:

=CEILING(B13;C13)

With B13 = 52 and C13 = 15, the independently expected result is 60, rather than MROUND’s 45. If the task is to keep within a positive limit, the distinct =FLOOR(B13;C13) is expected to return 45. Do not type spreadsheet time/date serial values into this worksheet and assume this numeric example establishes how time serials or time formatting are handled. Those behaviors require separate documented/native testing.

A second advanced application: nearest price increment

Put 18.37 in B16, 0.25 in C16 and enter =MROUND(B16;C16) in D16. The independently expected value is 18.25. Change B16 to 18.39 and the expected result is 18.50. Keep the underlying currency and rounding policy clear: rounding to the nearest increment is not identical to computing taxes, legal cash rounding, exchange rates or obtaining exactly the same results as another spreadsheet. This is a numerical convenience example, not financial/compliance advice.

Errors, limitations and troubleshooting

Opposite signs. The pinned func_mround contains an explicit comparison that returns internal Value::errorVALUE() when value is positive and multiple is negative or vice versa. For example, =MROUND(7.4;-0.5) follows that branch; the precise translated error shown in an installed application was not observed. Use both positive or both negative inputs for nonzero signed numbers. KDE source lines 874–887.

Zero multiple. The source computes a modulus and a division involving multiple but does not itself spell out an explicit zero-divisor result in the examined wrapper. The called ValueCalc::mod() and later arithmetic may control what happens. Consequently, do not invent #DIV/0!, zero or any other specific native outcome for =MROUND(7;0); treat this as requiring native tests and avoid zero when defining an increment. KDE source lines 887–901.

Too few or too many arguments. The function registration requires exactly two arguments. The underlying formula parser, before func_mround, may reject an omitted or extra argument; the exact visible error or dialog wording is unverified. Registration lines 163–166.

Numeric-looking text, blanks or Booleans. The XML calls for float inputs but no native mixed-type worksheet experiment was run. Do not extrapolate from Excel or LibreOffice coercion behavior. Re-enter the values as numbers, check cell formats and use the formula editor in your locale before troubleshooting further. KDE typed XML.

Surprising halfway choices. The inspected >= conditional implements an away-from-zero rule for exact mathematical halfway magnitudes, but floating-point representation might affect values near a halfway point. If a regulatory or commercial rounding policy specifies a different tie convention, verify the actual installed result and implement the policy separately. Do not silently substitute MROUND for ROUND, CEILING or FLOOR.

Function/argument not recognized. Check that your installed version contains the MROUND registration, that the local name and argument punctuation are accepted and that you provided two numeric values. The release code is evidence for Calligra 26.08.2 only; a catalogue listing is not proof of runtime behavior in all platforms or editions. KDE directs Linux users to distribution packages and Flatpak and reports Windows support still in progress. Calligra download page · KDE Gear 26.08.2 announcement.

Calligra evidence: its MROUND C++ registration, XML documentation and implementation were examined for release 26.08.2. This establishes the function’s intended signature, explicit sign branch, alias registration and source-based nearest-increment logic. It does not establish compatibility parity with another vendor’s MROUND, a guarantee across localized builds, or actual native function results. When importing workbook formulas, check expected results in the target installation, especially opposite signs, zero increments, ties, decimal precision and separators.

For related rounding operations, see ROUND, ROUNDDOWN and ROUNDUP. CEILING and FLOOR are separate registered functions. KDE function catalogue and source.

Official sources and validation record (checked October 13, 2026)

  1. KDE Calligra Sheets function reference — MROUND — formula, stated sign requirement, positive/negative worked examples.
  2. KDE Calligra 26.08.2 math.xml, lines 1087–1103 — two numeric positions, function help, related ROUND.
  3. KDE Calligra 26.08.2 math.cpp, lines 163–166 — two-argument registration and dotted legacy alternate function identifier.
  4. KDE Calligra 26.08.2 math.cpp, lines 873–901 — sign validation, magnitude conversion, remainder, half-step comparison and restored signed result; commit 72123cc643f6625351139e7df294544255a1056f.
  5. KDE Gear 26.08.2 release announcement, October 8, 2026 and Calligra downloads — target release and installation availability.

Testing limitation: Documentation and pinned source reviewed; ordinary examples independently calculated. Native Calligra, locale, coercion, boundary precision and error display remain untested.