ConvertThemAll

Rounding calculator

Round exactly, with the rounding rule of your choice.

Formula Maths

Negative values round to tens, hundreds…

Rounded

Rounded: 3.14

Written with its decimals
3.14
Rounding difference
-0.00159

How it works

Rounding replaces a number with the nearest multiple of a step: 0.01 for two decimal places, 0.05 for the nearest five hundredths, and so on. Significant figures choose the step from the size of the number.

The rule decides ties and direction. Half up sends 2.5 to 3 and −2.5 to −3. Half to even sends both 2.5 and 3.5 to the even neighbour, which avoids bias over many roundings. Ceiling and floor always go up or down; truncate drops the extra digits.

The calculator works on the exact decimal you typed, so 1.005 rounds to 1.01 as written.

Formula

step = 10^(−d) for d decimal places
step = 10^(e − s + 1) for s significant figures, e = floor(log₁₀ |x|)
rounded = round(x ÷ step) × step

Worked example

3.14159 to 2 decimal places is 3.14; to the nearest 0.05 it is 3.15. With half up 2.5 becomes 3, but with half to even it becomes 2.

Questions people ask

What is banker’s rounding?

Rounding half to even: a value exactly halfway goes to the neighbour with an even last digit. 0.125 to 2 places gives 0.12, and 0.135 gives 0.14.

Why does a spreadsheet round 1.005 to 1?

In binary floating point 1.005 is stored as 1.00499999…, just under the halfway point. This calculator rounds the exact decimal, giving 1.01.

How do I round to the nearest thousand?

Use −3 decimal places, or choose Nearest multiple with 1000. 12,499 becomes 12,000.