Rounding
calculator.
Round a number exactly as typed to decimal places, significant figures or the nearest multiple such as 0.05 or 5, and choose how ties and directions are handled.
Which way
is the 5?
- Decimal places: keep that many digits after the point (negative places round to tens, hundreds and so on).
- Significant figures: count from the first non-zero digit.
- Half up rounds exact halves away from zero; half to even sends them to the even neighbour; floor, ceiling, up and down ignore halves and always go one way.
- Nearest multiple: divide by the multiple, round to a whole number, multiply back.
How do you round to two decimal places?
Look at the third decimal digit. If it is 5 or more, increase the second digit by one; otherwise leave it. 2.675 becomes 2.68 and 1.004 becomes 1.00. With half to even, an exact half goes to the even digit: 2.665 becomes 2.66 while 2.675 becomes 2.68.
Why do some programs round 1.005 to 1.00?
Many programming languages store numbers in binary, where 1.005 cannot be represented exactly; the stored value is slightly less than 1.005, so it rounds down. In JavaScript, (1.005).toFixed(2) gives "1.00", and in Python round(1.005, 2) gives 1.0 and round(2.675, 2) gives 2.67. This calculator works with the exact decimal digits you type, so 1.005 to two places is 1.01 and 2.675 is 2.68. Good online rounding tools and most spreadsheets’ ROUND functions also correct for this; code often does not.
Significant figures
Significant figures count from the first non-zero digit. 0.00456789 to three significant figures is 0.00457; 987,654 to two is 990,000. When rounding carries into a new power of ten, the figure count is kept: 9.995 to three significant figures is 10.0.
Bankers’ rounding (half to even)
Always rounding halves up adds a small upward bias when many values are rounded and summed. Rounding halves to the even neighbour balances it out, which is why it is the default in the IEEE 754 floating-point standard and common in finance and statistics.
Worked examples.
Round 1.005 to 2 decimal places
A value that many spreadsheets round the wrong way.
1.01. Exactly halfway, so it rounds up.
Load this exampleBankers’ rounding
2.665 to 2 places, half to even.
2.66: the tie goes to the even digit 6.
Load this exampleSignificant figures
0.00456789 to 3 significant figures.
0.00457. Leading zeros are not significant.
Load this exampleRound to the nearest 0.05
Cash rounding of $7.33.
7.35.
Load this exampleRound to the nearest hundred
12,345.6 to −2 decimal places.
12300.
Load this exampleWhat this calculator
does not do.
- Inputs up to about 400 digits of exponent; results are exact.
- It does not apply regulatory rounding rules for taxes or prices in a specific country.
Common questions.
Does 0.5 round up or down?
With ordinary half-up rounding, 0.5 rounds to 1 and −0.5 to −1. With half to even it rounds to 0, because 0 is even.
What is truncation?
Cutting off digits without rounding, which is rounding toward zero: 2.99 truncated to 0 places is 2, and −2.99 is −2.
How do I round to the nearest 5 cents?
Choose “Nearest multiple” and enter 0.05. $7.33 becomes $7.35 and $7.32 becomes $7.30.
Does “round half up” mean the same thing everywhere?
No. Here, as in most school teaching, half up rounds exact halves away from zero, so −2.5 becomes −3. Some tools use “half up” to mean toward positive infinity, giving −2. Choose “Always up (ceiling)” or check the examples in each rule’s label if you need a specific convention.
- Wikipedia, Rounding — definitions of half up, half to even and directed rounding
- NIST Special Publication 811, Guide for the Use of the SI — guidance on rounding numbers and significant digits
Exact BigInt decimal arithmetic. Tests cover every rule, negative ties, significant-figure carries, nearest multiples, and 400 randomized values for three tie rules checking the half-unit error bound and idempotence.