Rounding Calculator
Round a number to a set of decimal places (or tens, hundreds), to significant figures, or to the nearest multiple of any value. Choose among eight rounding methods and see the result of all of them side by side.
A negative number rounds to tens (-1), hundreds (-2)…
Result
Enter a number to round.
The calculation runs in this browser tab. Nothing you enter is uploaded, saved or logged.
What is rounding and which method should I use?
Rounding replaces a number by a simpler one that is close to it. The usual rule, taught in school, is to look at the first dropped digit: below 5 round down, 5 or above round up. The cases that need a decision are ties, numbers exactly halfway such as 2.5 or 0.125, and negative numbers, where “up” can mean towards zero or towards positive infinity.
That is why there are several methods. Half away from zero (2.5 → 3, −2.5 → −3) is the everyday rule. Half to even, also called banker’s rounding, sends ties to the nearest even digit (2.5 → 2, 3.5 → 4) so that errors do not accumulate in long sums, and is the default in many statistics, accounting and programming contexts. Floor, ceiling and truncation always go in one direction.
How to use the Rounding Calculator
- Type the number to round.
- Choose what to round to: decimal places, significant figures, or a multiple such as 0.05 or 1,000.
- Enter the number of places, figures or the multiple, then choose a method (half away from zero is the usual rule).
- Read the rounded number and how much it changed. The table shows the same number rounded with all eight methods.
Formula
- Decimal places
- rounded = round(x × 10ᵈ) ÷ 10ᵈ
- Significant figures
- d = sf − 1 − ⌊log₁₀|x|⌋, then round to d decimal places
- Nearest multiple
- rounded = round(x ÷ m) × m
A negative number of decimal places rounds to tens (−1), hundreds (−2) and so on: 1,234.5678 to −2 places is 1,200.
Significant figures count from the first non-zero digit, so 0.0012345 to 2 significant figures is 0.0012, and 123,456 to 3 is 123,000.
Worked example
Rounding 2.675 to two decimals with the usual rule. A binary floating-point calculator gets this wrong (2.67), because 2.675 is stored as 2.67499999…:
| Question | Result |
|---|---|
| Input: Number | 2.675 |
| Input: Round to | A number of decimal places |
| Input: Decimal places | 2 |
| Input: Method | Half away from zero (usual rule): 2.5 → 3 and -2.5 → -3 |
| Rounded number | 2.68 |
| Original number | 2.675 |
| Change | 0.005 |
| Method | Half away from zero (usual rule) |
Assumptions and limits
- All arithmetic is exact, so ties are detected correctly: 1.005 rounds to 1.01 and 2.675 to 2.68, whereas JavaScript’s toFixed(2) gives 1.00 and 2.67 because those decimals cannot be stored exactly in binary.
- Up to 30 decimal places or significant figures can be used, and the number can have up to 30 digits.
- Which method a form, a standard or a currency requires depends on the context: many financial rules specify half away from zero, many scientific and statistical ones half to even. Check the rule that applies to you.
- Rounding a result that was already rounded can compound the error. Round once, at the end.
Frequently asked questions
How do I round to two decimal places?
Look at the third decimal. If it is 5 or more, increase the second decimal by one; otherwise leave it. So 3.14159 becomes 3.14 and 2.675 becomes 2.68.
What is banker’s rounding?
Also called round half to even. A tie goes to the nearest even digit: 2.5 → 2, 3.5 → 4, 0.125 → 0.12. Over many values the rounding errors cancel instead of always pushing the total up. It is the IEEE 754 default and common in accounting software and statistics.
How do I round negative numbers?
It depends on the method. Half away from zero rounds −2.5 to −3. Half up (towards positive infinity) gives −2. Floor always goes towards negative infinity and ceiling towards positive infinity. Try the table to compare them for your number.
What are significant figures?
The digits that carry meaning, counted from the first non-zero digit. 0.00450 has three significant figures (4, 5, 0). Rounding to significant figures keeps the same relative precision whatever the size of the number.
How do I round to the nearest 5, 10 or 0.05?
Choose “The nearest multiple of…” and enter the step. 17 to the nearest 5 is 15, and 17.5 is exactly halfway so it goes to 20 with the usual rule. Prices to the nearest 0.05 work the same way.
Why do other tools sometimes round 1.005 to 1.00?
They convert the number to binary floating point, where 1.005 is stored as 1.00499999999999989…. This calculator reads your digits as an exact decimal, so 1.005 is a true tie and rounds to 1.01 with the usual rule.