Transparent method
The formula
Worked example
Example inputs
How to interpret the result
Rounding trades precision for readability, and that trade is invisible until it's chained. Round three intermediate results in a multi-step calculation and the final answer can drift measurably from what the same calculation gives using full precision throughout, because each rounding step introduces its own small error and those errors don't cancel: they usually stack.
Before you rely on it
What to check
Keep full, unrounded precision through every intermediate step of a calculation, and round only the final number that gets reported or displayed.
The common error
Where people go wrong with rounding calculator
Rounding a value early and then using the rounded figure in further math. A number rounded for a report is a display choice; feeding that shortened version back into another formula is a different, avoidable error.
Sensitivity evidence
How value changes the rounded value
| Value | Rounded value | Difference from original |
|---|---|---|
| 2.5 | 2.5 | 0.003 |
| 2.8 | 2.8 | -0.003 |
| 3.1 | 3.1 | 0.002 |
| 3.5 | 3.5 | -0.004 |
| 3.8 | 3.8 | 0 |
Every input, tested
Which input moves the rounded value most
| Input | Tested from | To | Rounded value at each end | Swing |
|---|---|---|---|---|
| Value | 2.8 | 3.5 | 2.8 to 3.5 | 0.63 (20%) |
| Decimal places | 1 | 3 | 3.1 to 3.1 | 0.042 (1.3%) |
Two variables at once
Rounded value by value and decimal places
| Value \ Decimal places | 0 | 2 | 4 |
|---|---|---|---|
| 2.5 | 3 | 2.5 | 2.5 |
| 2.8 | 3 | 2.8 | 2.8 |
| 3.1 | 3 | 3.1 | 3.1 |
| 3.5 | 3 | 3.5 | 3.5 |
| 3.8 | 4 | 3.8 | 3.8 |
Step by step
The worked example, input by input
| Input | Value used |
|---|---|
| Value | 3.1 |
| Decimal places | 2 |
| Rounded value | 3.1 |
| Difference from original | 0.00159 |
Where the inputs come from
Enter the value and the number of decimal places to keep. The calculator multiplies by ten to that power, rounds to the nearest whole number and divides back. A digit of 5 or more in the next place rounds up, and lower rounds down. Choose the places from the context: currency uses two decimal places, while measurements should match the precision of the instrument. Negative decimal places would round to tens or hundreds, if supported.
When the result stops applying
Computers store many decimals inexactly, which can cause surprising results such as 2.675 rounding to 2.67. Rounding loses information, so do not round data you may need to reuse.
What to compare it with
See scientific notation for expressing large and small numbers with significant figures, and the percent error page for measuring the effect of rounding. The mean and standard deviation calculators use unrounded data, and the sales tax calculator rounds to cents. The unit conversion pages need care with precision.
People also ask
Frequently asked questions
How do I round to two decimal places?
Look at the third decimal digit: if it is 5 or more, increase the second decimal by one, otherwise leave it unchanged, and drop the rest.
Should I round at each step of a calculation?
No. Keep full precision until the final answer, then round once, to avoid accumulating rounding error.
Why does 2.5 sometimes round to 2?
Some systems use round-half-to-even, sometimes called banker's rounding, to avoid bias, so 2.5 rounds to 2 and 3.5 rounds to 4.