What rounding does
Rounding replaces a number with a nearby one that has fewer digits, so it is easier to read, compare or report. You choose the precision (how many decimal places, which whole-number place, or how many significant figures) and the result is the closest number at that precision. This calculator does the rounding with exact decimal arithmetic, so the digits you see are the true digits of the number you typed, not a binary approximation, and it shows the digit that decided the result, step by step.
The basic rule
Look at the first digit you are going to drop. If it is 5 or more, increase the last kept digit by one. If it is 4 or less, leave the kept digits alone. For example, 12.345 rounded to two decimal places keeps 12.34 and the first dropped digit is 5, so the result is 12.35. The same number to one decimal place keeps 12.3 and drops 4, so it stays 12.3. A carry can ripple through several digits: 9.996 to two decimal places is 10.00, and 999.5 to three significant figures is 1000.
Rounding half: what happens on an exact tie
A tie occurs when the dropped part is exactly half a unit of the last kept place, such as 2.5 to the nearest whole number or 12.345 to two decimals. The common school rule, which this calculator uses, is to round half away from zero: 2.5 becomes 3 and −2.5 becomes -3. Be aware that other rules exist. "Round half to even", also called banker's rounding, sends ties to the nearest even digit to avoid a systematic upward bias, and it is the default in some programming languages: Python's built-in round function documents that behaviour in the Python documentation for round(). If your instructions, software or accounting policy name a different rule, the answer can differ on exact ties only. The calculator states the rule it used in the steps so the result is never ambiguous.
Negative numbers
For a negative number, "away from zero" means the result gets more negative on a tie. −1.25 to one decimal place is -1.3, while 1.25 is 1.3. A negative number that rounds to zero is shown as plain 0 rather than "−0": −0.001 to two decimal places is 0.00. Away from zero is not the same as rounding up (toward +∞, sometimes called ceiling) or rounding down (toward −∞, floor); those two are different operations and are not what this tool does.
Decimal places, whole-number places and significant figures
Decimal places count digits after the decimal point, so 3.14159 to three decimal places is 3.142. A whole-number place rounds to tens, hundreds, thousands and so on: 1,500 to the nearest thousand is 2000, and 14,872 to the nearest hundred is 14900. Significant figures count meaningful digits starting from the first nonzero digit, wherever the decimal point is. That is why 0.0045678 to three significant figures is 0.00457 (the leading zeros do not count) and 123,456 to three significant figures is 123000. Scientists use significant figures to show how precise a measurement is; the calculator also gives the result in scientific form with exactly the number of digits you asked for, so a trailing zero such as 1.00 × 10³ is kept when it is significant.
Trailing zeros and padding
When the number has fewer digits than you ask for, the calculator pads with zeros and shows them in the digit strip, because the zeros are part of the stated precision: 2.5 to three decimal places is 2.500. For significant figures, 2.5 to four significant figures is 2.500. The copy button and the rounding ladder keep those zeros so you can paste the result as written.
Rounding too early
Round only at the end. If you round every intermediate step, the small errors add up and the final answer can be off in the last digit or two. Keep full precision through the calculation and round the final result to the precision of your least precise input. The same applies to a result you copied from the quadratic formula calculator or from a division on the long division calculator: carry the exact value, then round. If you need to check how far a rounded value is from the original, use the percent error calculator, and for exact fractional arithmetic before rounding use the fraction calculator.
Typing numbers correctly
Use a dot for the decimal point and no thousands separators. A comma is rejected on purpose, because "1,5" might mean 1.5 or 15 depending on the country. Scientific notation such as 4.5e-3 and fractions are not accepted here; write 0.0045 instead, or convert with the scientific notation calculator. A blank field is an error, never a zero. The number can have up to 40 digits and 30 decimal places.
Rounding calculator questions
How do I round to two decimal places?
Keep two digits after the decimal point and look at the third. If it is 5 or more, add one to the second digit. For 12.345 the result is 12.35.
How do I round to significant figures?
Start counting at the first nonzero digit and keep the number of digits you need, then round on the next digit. 0.0045678 to three significant figures is 0.00457.
Does 5 always round up?
In the half-away-from-zero rule used here, a dropped digit of 5 or more rounds up in size, so a tie such as 2.5 goes to 3. Some tools round ties to the even digit instead, which gives 2.
How do I round a negative number?
Round its size as usual and keep the sign. On a tie the result moves away from zero, so −2.5 becomes -3.
What is the difference between decimal places and significant figures?
Decimal places count digits after the point regardless of the number's size. Significant figures count meaningful digits from the first nonzero digit, so they adapt to very large and very small numbers.