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)| Argument | What it means | |
|---|---|---|
number | Required | The value to round. |
multiple | Required | The 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
| A | B | C | |
|---|---|---|---|
| 1 | Item | Value | |
| 2 | Unit price | 4.62 | 4.60 |
| 3 | Clock-in | 9:11 | |
| 4 | Units ordered | 130 | |
| 5 | Return | -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
| A | B | C | |
|---|---|---|---|
| 1 | Item | Value | |
| 2 | Unit price | 4.62 | |
| 3 | Clock-in | 9:11 | 9:15 |
| 4 | Units ordered | 130 | |
| 5 | Return | -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
| A | B | C | |
|---|---|---|---|
| 1 | Item | Value | |
| 2 | Unit price | 4.62 | |
| 3 | Clock-in | 9:11 | |
| 4 | Units ordered | 130 | 120 |
| 5 | Return | -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
| A | B | C | |
|---|---|---|---|
| 1 | Item | Value | |
| 2 | Unit price | 4.62 | |
| 3 | Clock-in | 9:11 | |
| 4 | Units ordered | 130 | |
| 5 | Return | -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.
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#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 decimals | Multiples 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.01gives 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.
| Language | Function name |
|---|---|
| Danish | MAFRUND |
| Dutch | AFRONDEN.N.VEELVOUD |
| Finnish | PYÖRISTÄ.KERR |
| French | ARRONDI.AU.MULTIPLE |
| German | VRUNDEN |
| Hungarian | TÖBBSZ.KEREKÍT |
| Italian | ARROTONDA.MULTIPLO |
| Norwegian (Bokmål) | MRUND |
| Polish | ZAOKR.DO.WIELOKR |
| Portuguese (Brazil) | MARRED |
| Portuguese (Portugal) | MARRED |
| Russian | ОКРУГЛТ |
| Spanish | REDOND.MULT |
| Swedish | MAVRUNDA |
| Turkish | KYUVARLA |