How to use the rounding calculator
- Enter the number. Decimals, negative numbers, thousands separators and E notation such as 3.2e-5 are all accepted. Up to 30 digits are read exactly.
- Choose where to round. Pick a place from billions down to billionths, or choose significant figures and say how many to keep.
- Choose the rule. Half up is what most people learn at school. The other rules are there for finance, statistics and programming work.
The main answer uses the rule you picked. A table underneath shows the result under every rule, which makes it easy to see when the choice matters.
The rounding rules
Rounding keeps the digits up to a chosen place and decides what to do with the rest. If the rest is less than half a step, every “half” rule rounds down. If it is more than half, they all round up. The rules only disagree on an exact tie, or when the rule ignores the size of the rest.
| Rule | What happens | 2.5 → | −2.5 → |
|---|---|---|---|
| Half up | Ties go toward +∞ | 3 | −2 |
| Half down | Ties go toward −∞ | 2 | −3 |
| Half to even | Ties go to the even neighbour | 2 | −2 |
| Half away from zero | Ties grow in size | 3 | −3 |
| Half toward zero | Ties shrink in size | 2 | −2 |
| Ceiling | Always up | 3 | −2 |
| Floor | Always down | 2 | −3 |
| Away from zero | Always grows in size | 3 | −3 |
| Truncate | Drops the extra digits | 2 | −2 |
For positive numbers, half up and half away from zero give the same answer. They only split for negatives.
Worked example: 1,234.565 to the nearest hundredth
This is the example loaded with the page.
- Find the hundredths digit. In 1,234.565 it is the 6, so the kept part is 1,234.56.
- Look at what is dropped. The leftover is 0.005.
- Compare with half a step. A step at this place is 0.01, so half a step is 0.005. The leftover is exactly half, so this is a tie.
- Apply the rule. Half up sends the tie up, giving 1,234.57. Half to even gives 1,234.56, because 6 is already even. Half down and truncation also give 1,234.56. Ceiling gives 1,234.57.
A floating-point program can get this wrong. 1,234.565 has no exact binary form, so the stored value sits a hair below or above the tie, and the result depends on which side it falls.
Significant figures
Choosing significant figures rounds relative to the first non-zero digit rather than to a fixed place. 0.0045678 to 3 significant figures is 0.00457, and 123,456 to 2 significant figures is 120,000. Zeros added to fill a place are placeholders, not extra precision. For a value written as a fraction, convert it first with the fraction calculator, which gives the exact decimal.
Tips
- Round once, at the end. Rounding intermediate results adds error at every step.
- Trailing zeros carry meaning. 2.50 rounded to hundredths says the value is known to the hundredth, which 2.5 does not.
- For money, half up to the cent is usual. For large data sets where ties are common, half to even avoids an upward bias.
- To see how much rounding changed a measurement in relative terms, use the percent error calculator.
Frequently asked questions
What is the difference between half up and half even?
They only differ when the dropped part is exactly half a step. Half up always moves a tie up, so 2.5 becomes 3. Half even moves a tie to whichever neighbour ends in an even digit, so 2.5 becomes 2 and 3.5 becomes 4. Over many ties, half even does not push totals upward.
Why is it called banker's rounding?
Round half to even has long been used in finance and bookkeeping because ties are split evenly between rounding up and rounding down, so sums of rounded amounts do not drift. It is also the default in the IEEE 754 floating-point standard and in Python's round().
Why does my spreadsheet round 1.005 to 1.00?
Computers store most decimals in binary, and 1.005 is really held as 1.00499999999999989… That value is just under the tie, so it rounds down. This calculator reads the digits you type as an exact decimal, so 1.005 rounded to hundredths with half up gives 1.01.
How do I round negative numbers?
Pay attention to the rule. Half up here means toward positive infinity, so −2.5 becomes −2. If you want −2.5 to become −3, choose half away from zero. Floor always goes down (−2.1 becomes −3) and truncation always goes toward zero (−2.9 becomes −2).
Last reviewed: