Math

Rounding Calculator (Decimals, Half Even, Up, Down)

Enter a number, the decimal places and the rounding rule.

Your numbers

Your results

Rounded
Rounded
—
Rounded to the multiple
—
Change
—

Rounding Calculator (Decimals, Half Even, Up, Down) by TheCalcTools

How the Rounding Calculator (Decimals, Half Even, Up, Down) works

Rounding to p decimal places keeps p digits after the point. Halves can go away from zero (2.345 → 2.35, the school rule) or to the nearest even digit (2.345 → 2.34), which avoids bias in long sums and is the IEEE 754 default.

Computers store decimals in binary, so 2.345 is really 2.34499999…; this calculator treats values within a billionth of a half as exact halves, as people expect.

The formula

round(x, p) = ⌊x × 10^p + 0.5⌋ ÷ 10^p

Worked example

Using the default values shown in the calculator:

Number2.345
Decimal places (negative for tens, hundreds…)2
RuleNearest, halves away from zero
Or round to a multiple of0.05
  1. 2.345 to 2 places, halves away from zero: 2.35.
  2. To the nearest 0.05: 2.35.

Result:

Rounded2.35
Rounded to the multiple2.35
Change0.0050

Frequently asked questions

Why does banker's rounding exist?

Always rounding halves up adds a small upward bias over many values. Rounding halves to even balances up and down.

How do I round to the nearest 5 cents?

Use the multiple field with 0.05.

Sources and further reading

More in Math · All calculators

This calculator gives estimates for information only. Check important results independently before you rely on them. See our disclaimer.