Math & trig function

MROUND function

Rounds a number to the nearest multiple of another number, such as 0.05, 15 minutes or a pallet size.

Available in Excel 2007 and later (earlier with the Analysis ToolPak), Excel for the web, Excel for Mac

Excel 2007 and laterWorks in Google Sheets

Syntax

MROUND(number, multiple)
ArgumentWhat it means
numberRequiredThe value to round.
multipleRequiredThe step to round to, e.g. 0.05, 5, "0:15". Must have the same sign as number.

Returns: The multiple of multiple that is closest to number.

How MROUND works

MROUND rounds to steps rather than decimal places. Prices to the nearest 5 cents, quantities to full cartons of 24, times to the nearest quarter of an hour: give the value and the step, and MROUND returns the closest multiple. It is the "nearest" counterpart of CEILING.MATH (always up) and FLOOR.MATH (always down).

When the value is exactly halfway between two multiples, MROUND rounds away from zero: =MROUND(5, 10) returns 10. Time steps can be written as text such as "0:15", which Excel converts to a fraction of a day. The number and the multiple must have the same sign; a positive value with a negative multiple (or the reverse) returns #NUM!, which surprises many users working with refunds or negative stock.

Examples

1Price to the nearest 5 cents

C2fx=MROUND(B2, 0.05)
ABC
1ItemValue
2Unit price4.624.60
3Clock-in9:11
4Units ordered130
5Return-130

Result: 4.60

4.62 lies between 4.60 and 4.65 and is closer to 4.60. Shown with 2 decimals.

2Clock-in time to the nearest quarter hour

C3fx=MROUND(B3, "0:15")
ABC
1ItemValue
2Unit price4.62
3Clock-in9:119:15
4Units ordered130
5Return-130

Result: 9:15

9:11 is 4 minutes from 9:15 and 11 minutes from 9:00, so it becomes 9:15. Format the result cell as h:mm.

3Order quantity to full cartons of 24

C4fx=MROUND(B4, 24)
ABC
1ItemValue
2Unit price4.62
3Clock-in9:11
4Units ordered130120
5Return-130

Result: 120

130 / 24 = 5.42 cartons, nearest is 5, so 120 units. Use =CEILING.MATH(B4, 24) (144) if you must never ship less than ordered.

4Signs must match

C5fx=MROUND(B5, 24)
ABC
1ItemValue
2Unit price4.62
3Clock-in9:11
4Units ordered130
5Return-130#NUM!

Result: #NUM!

−130 with a positive multiple is an error. Use =MROUND(B5, -24) (−120) or =SIGN(B5)*MROUND(ABS(B5), 24) to handle both signs.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 17 KB

Common errors and how to fix them

ErrorWhy it happensFix
#NUM!number and multiple have opposite signs.Use =SIGN(x)*MROUND(ABS(x), m).
#VALUE!An argument is text that is not a number or time.Check the inputs; times must be written like "0:15".
Odd decimalsMultiples such as 0.1 cannot be stored exactly in binary, so results like 4.6000000001 can appear.Wrap in ROUND(..., 2) if exact display matters.

Tips

  • A multiple of 0 returns 0.
  • Round to the nearest 0.25 hour for timesheets: =MROUND(hours, 0.25).
  • Psychological prices: =MROUND(B2, 1)-0.01 gives 19.99, 24.99…

Questions

How do I round to the nearest 5?

=MROUND(B2, 5). For always up use =CEILING.MATH(B2, 5), for always down =FLOOR.MATH(B2, 5).

Why does MROUND return #NUM!?

The value and the multiple have different signs, for example a negative amount with a positive step.

Google Sheets

MROUND also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.

MROUND in other languages

In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.

LanguageFunction name
DanishMAFRUND
DutchAFRONDEN.N.VEELVOUD
FinnishPYÖRISTÄ.KERR
FrenchARRONDI.AU.MULTIPLE
GermanVRUNDEN
HungarianTÖBBSZ.KEREKÍT
ItalianARROTONDA.MULTIPLO
Norwegian (Bokmål)MRUND
PolishZAOKR.DO.WIELOKR
Portuguese (Brazil)MARRED
Portuguese (Portugal)MARRED
RussianОКРУГЛТ
SpanishREDOND.MULT
SwedishMAVRUNDA
TurkishKYUVARLA

Recipes that use MROUND