Number.Round
Number function · By Tahir Nas · Examples run in our simulator · Published · Updated
Rounds a number to a number of digits.
When to use it
Use it when values are displayed or compared at a fixed precision, such as money to 2 decimals. Choose the rounding mode deliberately: the default rounds halves to even, which differs from Excel's ROUND.
Syntax
Number.Round(number as nullable number, optional digits as nullable number, optional roundingMode as nullable number) as nullable numberParameters
- roundingMode
- RoundingMode.ToEven (default), AwayFromZero, Up, Down, TowardZero.
Returns
The rounded number.
Example
Number.Round(2.5, 0, RoundingMode.AwayFromZero)Result
3
Example: banker's rounding by default
Without a mode, 2.5 rounds to 2 and 3.5 to 4.
Text.Combine(List.Transform({Number.Round(2.5), Number.Round(3.5)}, Text.From), ", ")Result
2, 4
Both results are produced by the Power Query Exercises simulator, an independent implementation of a documented subset of M, and checked on every build.
Good to know
- The default rounds halves to even: Number.Round(2.5) is 2.
Common mistakes
- Expecting Excel's rounding (half away from zero) without passing RoundingMode.AwayFromZero.
- Rounding before summing, which accumulates small differences.
The matching command in Excel
- Excel for Windows
- Add Column > Rounding > Round
- What you see
- The rounded values go in a new column; Transform > Rounding changes the column in place.
Paths are for the Power Query editor in Excel for Microsoft 365, checked against Microsoft's documentation on 8 November 2026: Add a column based on a data type (Power Query) (Microsoft Support).
Exercises that use Number.Round
- intermediate~7 minPro
Add 20% VAT and round to cents (kite shop)
Calculate a gross price including 20% VAT, rounded to two decimals.
- intermediate~8 minPro
Round halves two ways: to even and away from zero (ledger)
Finance rounds half-amounts away from zero, but Power Query's default rounds them to the nearest even number. Show both.
- intermediate~9 minPro
Write a tax function with an optional rate (shop)
Define Gross(net, optional rate) that uses 20% when no rate is given, and apply it to every order.
- advanced~20 minPro
Project: revenue by regional manager from a raw export (kite shop)
From a messy CSV export and a manager list, produce completed revenue per regional manager, rounded to cents and sorted.
Learn more
- Rounding numbers lesson
Related functions
Official documentation: Number.Round on Microsoft Learn.