Rounding Calculator

Round a number to N decimal places or to the nearest multiple (0.05, 5, 100…) using half up, half even (banker’s), up or down.

Use negative values to round to tens (−1), hundreds (−2), etc.

Results

Rounded value
2.35
Written out
2.35
With trailing zeros, as reported to that precision.
Change (rounded − original)
0.005

How it’s calculated

Rounding keeps a chosen number of digits (or a whole number of some unit) and discards the rest. The rules differ only when the discarded part is exactly half:

rounded = round(x ÷ step) × step (step = 10^−places, or the multiple)

Example: 2.345 to 2 decimal places. 2.345 ÷ 0.01 = 234.5, exactly a half. Half up gives 235 × 0.01 = 2.35; half to even gives 234 × 0.01 = 2.34. To the nearest 0.05: 2.345 ÷ 0.05 = 46.9, which rounds to 47, so 47 × 0.05 = 2.35.

Numbers are handled as typed in decimal, so 2.345 is treated as exactly 2.345 rather than its nearest binary value.

Frequently asked questions

What is banker’s rounding?

Rounding halves to the nearest even digit. 0.5 → 0, 1.5 → 2, 2.5 → 2. Over many values, ups and downs balance out.

How do I round to the nearest 5 cents?

Choose "Nearest multiple of…" and enter 0.05. $2.42 → $2.40 and $2.43 → $2.45 with half up.

How do I round to the nearest thousand?

Use −3 decimal places, or a multiple of 1000. 12,499 → 12,000; 12,500 → 13,000 with half up.

Embed this calculator

Add this free calculator to your own website. Copy the code below into your page’s HTML:

Sources

Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.

Spotted a mistake or missing option? Report a problem · GitHub issue· Suggest a calculator