Rounding
Round to a place or to a number of decimals, with the rule you are using named.
English
Rounded
In words:
The four rules
Rounding only becomes a decision when the value lands exactly halfway. These are the ways that decision is made, and they give different answers to the same question.
| Rule | What it does |
|---|---|
| Half away from zero | A half goes to the larger magnitude: 2.5 becomes 3 and -2.5 becomes -3. This is the rule taught in school. |
| Half to even | A half goes to whichever neighbour is even: 2.5 becomes 2 and 3.5 becomes 4. Also called banker's rounding, it is the default in IEEE 754 arithmetic and in the Round function of VBA, because it does not drift upwards over many sums. The ROUND function in Excel and Google Sheets does not use it: there a half goes away from zero. |
| Always down | Cut the digits off. 2.9 becomes 2. |
| Always up | Go to the next step whenever anything is left over. 2.1 becomes 3. |
Why not just use the computer's round function? Because some of them treat a half differently on each side of zero: JavaScript's Math.round turns 2.5 into 3 but -2.5 into -2. This tool rounds the size of the number and puts the sign back afterwards, so a half always goes the same way relative to zero.
One number, every step
The same number rounded to each step in the list, by the rule taught in school.
| Step | Result |
|---|---|
| Nearest million | 4,000,000 |
| Nearest hundred thousand | 4,100,000 |
| Nearest ten thousand | 4,070,000 |
| Nearest thousand | 4,073,000 |
| Nearest hundred | 4,072,500 |
| Nearest ten | 4,072,520 |
| Whole number | 4,072,520 |
| 1 decimal place | 4,072,519.6 |
| 2 decimal places | 4,072,519.64 |
| 3 decimal places | 4,072,519.638 |
Questions
- What is 2.5 rounded to the nearest whole number?
- 3 by the rule taught in school, which takes a half away from zero. Rounding half to even gives 2, the even neighbour.
- What is 0.125 to two decimal places?
- 0.13 rounding half away from zero, and 0.12 rounding half to even, because the 2 in front of the half is already even.
- What is round half to even?
- A half goes to whichever neighbour is even: 2.5 becomes 2 and 3.5 becomes 4. Also called banker's rounding, it is the default in IEEE 754 arithmetic and in the Round function of VBA, because it does not drift upwards over many sums. The ROUND function in Excel and Google Sheets does not use it: there a half goes away from zero.