Rounding Calculator
Test cases replayed : 12 of 12 match · Methodology · No outside source listed
Enter a number, choose the place to round to and the rounding rule (half away from zero is the one taught in school).
Result
Rounded number
Rounding error (rounded − original)
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Number to round: enter a number.
- Round to the nearest: choose one of the 7 options in the list.
- Rounding rule: choose one of the 6 options in the list.
- Read the result: Rounded number; the panel also shows Rounding error (rounded − original).
How this calculator works
To round x to a place value p (for example p = 0.01 for cents), divide by p, round to a whole number, and multiply back by p. The digit right after the kept place decides: below 5 the kept digit stays, above 5 it goes up by one.
Rules for an exact half: half away from zero (2.5 → 3, −2.5 → −3), the usual school and commercial rule; half up (−2.5 → −2); half to even, or banker's rounding (2.5 → 2, 3.5 → 4), used in IEEE 754 arithmetic to avoid a systematic bias. Ceiling, floor and truncation ignore the half rule.
The number is read as you typed it in decimal, so 1.005 rounds to 1.01 (some software gives 1.00 because 1.005 is stored slightly below its decimal value).
Worked example
| Number to round | 3.14159 |
|---|---|
| Round to the nearest | Hundredth (nearest cent or penny) |
| Rounding rule | Half away from zero (school rule) |
| Rounded number | 3.14 |
|---|---|
| Rounding error (rounded − original) | -0.0016 |
Frequently asked questions
What is 1,234,567 rounded to the nearest thousand?
1,235,000, because the hundreds digit 5 rounds the thousands up.
How do you round $3.14159 to the nearest cent?
Look at the third decimal, 1: it is below 5, so the result is $3.14.
Why does banker's rounding turn 2.5 into 2?
Ties go to the even neighbor, so over many values half of the ties round down and half round up.