Rounding Calculator: Decimal Places, Nearest 10 and Banker's Rounding
By FindMySum · Last reviewed
A rounding calculator shortens a number to a chosen precision: a number of decimal places, a number of significant figures, or the nearest multiple of something like 10, 100 or 0.05. The answer also depends on the rounding rule, which matters most when a number sits exactly halfway. This article explains the three kinds of precision, the nine rules the calculator offers, and why the calculator's default example, 2.675, catches out so much software.
Three ways to choose the precision
Decimal places count digits after the decimal point. Two places means hundredths (cents), zero means a whole number. Negative places work the other way, as in Excel's ROUND: −1 rounds to tens, −2 to hundreds, so ROUND(626.3, −3) is 1,000.
Significant figures count from the first non-zero digit, whatever its position. 0.0045678 to three significant figures is 0.00457, and 123,456 is 123,000. Scientists use them so a result shows the precision of the measurement behind it.
Nearest multiple rounds to any step: the nearest 10 or 100 for estimates, 0.5 for half-point grading, 0.25 for quarter hours, 0.05 for cash in Canada. It is Excel's MROUND: MROUND(1.3, 0.2) = 1.4.
The rounding rules
When the number lies between two candidates, the rule decides which one to pick. Five rules look for the nearer candidate and only differ on exact ties:
| Rule | 2.5 | −2.5 | Used by |
|---|---|---|---|
| Half up (away from zero) | 3 | −3 | School rounding, Excel ROUND |
| Half even (banker's) | 2 | −2 | IEEE 754 default, NIST SP 811 |
| Half down (toward zero) | 2 | −2 | Rare |
| Half toward +∞ | 3 | −2 | JavaScript Math.round |
| Half toward −∞ | 2 | −3 | Rare |
Four rules always go the same way, however close the number is to the other candidate:
| Rule | 2.1 | −2.1 | Used by |
|---|---|---|---|
| Up (away from zero) | 3 | −3 | Excel ROUNDUP |
| Down (toward zero, truncate) | 2 | −2 | Excel ROUNDDOWN, TRUNC |
| Ceiling (toward +∞) | 3 | −2 | CEILING.MATH |
| Floor (toward −∞) | 2 | −3 | FLOOR.MATH |
The calculator shows your number rounded with all nine rules side by side, and marks the one you picked.
Why banker's rounding exists
Half-up rounding always sends ties upwards. If you round many numbers that end in exactly 5 (prices, measurements to a fixed resolution), the rounded total creeps above the true total. Round half to even sends half the ties up and half down, so the error averages out. NIST Special Publication 811, Appendix B.7, recommends it for reporting measurements, and it is the default rounding mode in the IEEE 754 standard used by virtually every computer. With banker's rounding 0.125 to two places is 0.12, while 0.135 is 0.14.
The 2.675 problem
Ask many programming languages to round 2.675 to two decimal places and you get 2.67, not the 2.68 you would write by hand. The reason is that computers store numbers in binary, and 2.675 has no exact binary form. The closest value a 64-bit number can hold is 2.67499999999999982…, just below the halfway point, so it rounds down.
This calculator never converts your number to binary. It reads the digits you type as an exact decimal and applies the rounding rule to those digits, so 2.675 to two places with half up is 2.68 and with banker's rounding is also 2.68 (the 7 is odd, so the tie goes to 8). The how-it-works section shows the two candidates, the halfway point and which rule decided.
Rounding to significant figures
Rounding to significant figures can change the number of digits before the decimal point. 9.996 to three significant figures carries all the way up to 10.0: the result is written with three significant digits, including the trailing zero, to show its precision. Very large and very small results switch to a × 10ⁿ form.
Good habits
- Round once, at the end, from the original number.
- Use the precision the context demands: cents for money, the instrument's resolution for measurements.
- When totals must match, consider banker's rounding, or round the total and adjust one item.
- Say which rule you used whenever ties are likely, such as in grading or financial reports.
More questions
Should I round in the middle of a calculation?
No. Keep full precision through every step and round once, at the end. Rounding intermediate results lets small errors add up: three prices of $1.335 rounded to $1.34 each total $4.02, while the true total of $4.005 rounds to $4.01. Tax and payroll rules sometimes specify rounding at particular steps; then follow the rule exactly.
Does rounding 4.45 to a whole number give 4 or 5?
4. Rounding looks only at the digits after the place you keep, taken together: 0.45 is less than 0.5, so 4.45 rounds to 4. Rounding twice (4.45 → 4.5 → 5) is called double rounding and is a classic mistake; always round from the original number.
How does cash rounding work in Canada?
Since the penny was withdrawn in 2013, the total of a cash purchase is rounded to the nearest 5 cents: totals ending in 1, 2, 6 or 7 cents round down and those ending in 3, 4, 8 or 9 round up. Only the final total is rounded, after tax, and card or cheque payments are still charged to the exact cent.
What is stochastic rounding?
A rule used in machine learning and some simulations: a number is rounded up or down at random, with a probability proportional to how close it is to each neighbour. 2.3 rounds to 3 with a 30% chance and to 2 with a 70% chance. On average the rounding error is zero, even for numbers that are never exact ties.
How many decimal places should I round money to?
To the smallest coin or unit of the currency: two decimal places for the Canadian and US dollar, none for the Japanese yen. Interest rates, exchange rates and unit prices are usually kept to more places (four or six) and only the final amount owed is rounded to the cent.
Sources
This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.