By · Updated

Rounding Calculator

Round to Decimal Places, Tens or Hundreds by Any Rule

No ratings yet
Result

—

OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.

How the Rounding Calculator works

This rounding calculator rounds a number to any number of decimal places, to a whole number, or to the nearest 10, 100 or 1000. Pick the rule you need: half up as taught in school, half to even as used by banks and spreadsheets' ROUND alternatives, ceiling, floor or truncation. The other rules are shown alongside for comparison.

Rounding keeps the digits that matter and drops the rest, but the rule for a number exactly halfway differs between schools, programs and industries. Half up sends 2.5 to 3. Half to even, also called banker's rounding, sends it to 2 so that halfway cases do not all push totals upward. The calculator works on the decimal digits you type, so 1.005 is treated as exactly 1.005, not the slightly smaller binary value that trips up many programs.

How the rounding calculator works

The formula is to look at the digit after the last one kept. With half up, 5 or more rounds the kept digit up. With half to even, an exact 5 rounds to whichever neighbour is even. Ceiling always rounds toward positive infinity, floor toward negative infinity, and truncation simply chops the extra digits, which moves toward zero.

First example. 2.345 to 2 decimal places is 2.35 with half up, 2.34 with half to even, 2.35 with ceiling and 2.34 with floor or truncation.

Second example. -2.5 to a whole number is -3 with half up (away from zero), -2 with half to even, -2 with ceiling and -3 with floor.

How many decimal places should I round to? Keep one more place than your least precise measurement, or follow the convention: 2 places for money, 1 for percentages in reports.

The same numbers under five rounding methods

Number Round to Half up Half to even Ceiling Floor Truncate
0.5 Whole 1 0 1 0 0
1.5 Whole 2 2 2 1 1
2.5 Whole 3 2 3 2 2
3.5 Whole 4 4 4 3 3
-0.5 Whole -1 0 0 -1 0
-1.5 Whole -2 -2 -1 -2 -1
-2.5 Whole -3 -2 -2 -3 -2
2.4 Whole 2 2 3 2 2
2.6 Whole 3 3 3 2 2
-2.6 Whole -3 -3 -2 -3 -2
-3.7 Whole -4 -4 -3 -4 -3
8.5 Whole 9 8 9 8 8
7.45 1 dp 7.5 7.4 7.5 7.4 7.4
7.55 1 dp 7.6 7.6 7.6 7.5 7.5
4.49 1 dp 4.5 4.5 4.5 4.4 4.4
4.51 1 dp 4.5 4.5 4.6 4.5 4.5
99.95 1 dp 100.0 100.0 100.0 99.9 99.9
1.005 2 dp 1.01 1.00 1.01 1.00 1.00
12.345 2 dp 12.35 12.34 12.35 12.34 12.34
0.125 2 dp 0.13 0.12 0.13 0.12 0.12
0.375 2 dp 0.38 0.38 0.38 0.37 0.37
0.0049 3 dp 0.005 0.005 0.005 0.004 0.004
1234.5 Nearest 100 1200 1200 1300 1200 1200
1250 Nearest 100 1300 1200 1300 1200 1200

Tips and pitfalls

Sources: Rounding.

Checked against: 3.14159 to 2 decimal places = 3.14

FAQ

How do you round to 2 decimal places?

Look at the third decimal place. If it is 5 or more, add one to the second place; otherwise leave it. Then drop everything after the second place. So 3.14159 becomes 3.14 and 2.678 becomes 2.68 under the usual half up rule.

What is banker's rounding?

Banker's rounding, or round half to even, sends a value exactly halfway to the nearest even digit, so 0.5 becomes 0, 1.5 becomes 2 and 2.5 becomes 2. Over many values the ups and downs cancel out, so totals are not biased upward.

Does 0.5 round up or down?

Under the school rule, half up, 0.5 rounds up to 1. Under banker's rounding it rounds to 0, the even neighbour. Many programming languages default to banker's rounding, which is why their results can differ from a calculator.

What is the difference between rounding and truncating?

Rounding picks the nearest value at the chosen precision, while truncating just cuts off the extra digits. So 4.79 rounds to 4.8 to one decimal place but truncates to 4.7. Truncation always moves the number toward zero.

How do you round to the nearest 10?

Look at the units digit. If it is 5 or more, round up to the next ten; otherwise round down. So 47 becomes 50 and 43 becomes 40. Pick Nearest 10 in the calculator to do this for any number, including decimals.

See also: all Arithmetic tools, Number Theory, Algebra and Geometry, Statistics, Trigonometry and Calculus.

Related tools