Toolstia / Rounding calculator

Rounding calculator

Round a number to the decimal places you choose, or to the nearest ten, hundred or thousand with a negative number of places. The table shows the result of every common rounding method side by side.

Numbers are rounded exactly as typed, using decimal digits rather than binary floating point, so 1.005 rounds to 1.01 as you would expect.

How it works

  1. Enter the number.
  2. Set the decimal places (use a negative number for tens, hundreds and so on).
  3. Pick the rounding method and read the result.

Rounding methods

Half up rounds a 5 up. Half to even (banker’s rounding) rounds a 5 to the nearest even digit and avoids bias in long sums. Half down rounds a 5 down. Ceiling always goes up, floor always goes down and truncate cuts the digits off toward zero.

Negative places

−1 rounds to the nearest ten, −2 to the nearest hundred, and so on, so 1,250 to −2 places gives 1,300.

No floating-point surprises

The number is worked on as decimal digits, so 1.005 rounds to 1.01 and 2.675 to 2.68, as a person would expect.

Negative numbers

Half up rounds away from zero for negative numbers (−2.5 becomes −3). Floor and ceiling follow the number line.

Questions

Which method should I use?

Half up is the everyday school rule. Banker’s rounding is common in finance and statistics.

Why does −0.4 show as 0?

Because rounding gives zero and zero has no sign.

Is anything uploaded?

No. Your input stays in your browser and is never sent anywhere.