calc-hub logocalc-hub.net

Rounding Calculator With Banker's Rounding

Round a number to decimal places or to significant figures. The calculator shows six results side by side: rounded to the nearest under three tie rules (half up, half to even and half down), rounded up, rounded down and truncated. Half to even is banker's rounding. It rounds the digits you type, so 1.005 to 2 decimal places comes out as 1.01.

Use 0 for a whole number, -1 for tens, -2 for hundreds.

How to use the Rounding Calculator

  1. Enter the number. Decimals, negative numbers and scientific notation such as 1.2e-7 all work.
  2. Under Round to, choose Decimal Places or Significant Figures.
  3. Enter how many to keep. For decimal places, 0 gives a whole number, -1 rounds to tens and -2 to hundreds. Significant figures start at 1. A fraction or an empty box gets a message.
  4. Press the Round button. To try other numbers, change any field and press it again.
  5. Read the results. Rounded (half up) is the usual answer, and Half to even is banker's rounding. Ceiling always goes up, Floor always goes down and Truncated drops the extra digits.

The six results and the tie rules

Rounded (half up): to the nearest step, a tie goes up
Half to even: to the nearest step, a tie goes to the even neighbour
Half down: to the nearest step, a tie goes down
Ceiling: up to the next step
Floor: down to the next step
Truncated: extra digits dropped, toward zero

A step is the last place you keep: 0.01 for 2 decimal places, 100 for -2. For significant figures the step depends on the number, because the count starts at its first non-zero digit. A tie is a number exactly halfway between two steps, such as 2.5 between 2 and 3. Half up sends a tie toward the larger number, so 2.5 becomes 3 and -2.5 becomes -2. Half down sends it toward the smaller number, so 2.5 becomes 2 and -2.5 becomes -3. Half to even sends it to the neighbour whose last digit is even, so 2.5 becomes 2 and 3.5 becomes 4. Half away from zero would give -3 for -2.5, and the calculator does not show that rule. Java and Python use the name half down for a tie that goes toward zero, which gives -2 for -2.5 where this page gives -3. Up and down mean toward the larger and the smaller number, so the ceiling of -2.5 is -2 and its floor is -3.

Worked example

Round 3.14159 to 2 decimal places, the calculator's default inputs. Rounded (half up) is 3.14, Ceiling is 3.15, Floor is 3.14 and Truncated is 3.14. Now choose Significant Figures and enter 3. The first three significant digits are 3, 1 and 4, so you get the same four results. For 0.004567 to 2 significant figures the count starts at the 4. Rounded is 0.0046, Ceiling 0.0046, Floor 0.0045 and Truncated 0.0045. Ties are where the three rules part: 2.345 to 2 decimal places is 2.35 half up, 2.34 half to even and 2.34 half down, and 2.355 is 2.36 under half up and half to even but 2.35 half down.

More examples in both modes

Each row is what the calculator prints for that number and setting.

Rounding examples
NumberRound toRounded (half up)CeilingFloorTruncated
128373 significant figures12800129001280012800
999.954 significant figures10001000999.9999.9
2.53 significant figures2.502.502.502.50
1.0052 decimal places1.011.0111
-2.50 decimal places-2-2-3-2
1234.5-2 decimal places1200130012001200

Frequently asked questions

How do I round to significant figures?

Count digits from the first one that is not zero and keep as many as you need. 0.004567 to 2 significant figures is 0.0046, because the count starts at the 4. 12837 to 3 significant figures is 12800. In the calculator, choose Significant Figures under Round to and enter the count.

What is the difference between decimal places and significant figures?

Decimal places count digits after the decimal point. Significant figures count digits from the first non-zero digit, wherever the decimal point sits. 0.004567 to 2 decimal places is 0. To 2 significant figures it is 0.0046.

Which tie rule does the calculator use?

It shows three. Rounded (half up) sends a number exactly halfway between two steps to the larger one, so 2.5 becomes 3, 0.125 to 2 decimal places becomes 0.13 and -2.5 becomes -2. Half down sends it to the smaller one, so 2.5 becomes 2 and -2.5 becomes -3. Half to even is the third. Half away from zero, which would turn -2.5 into -3 and 2.5 into 3, is not shown.

What is banker's rounding?

Another name for half to even. A tie goes to the neighbour whose last digit is even, so 0.125 to 2 decimal places is 0.12, 0.135 is 0.14, 2.5 becomes 2 and 3.5 becomes 4. Half up pushes every tie the same way, which lifts the total of a long list. Half to even goes up about as often as down, so the total stays closer. Python's round() and the IEEE 754 default use this rule on binary numbers.

Why is 1.005 to 2 decimal places 1.01 here and 1 in some programs?

Many programs store 1.005 as a binary floating-point number. That stored value is slightly below 1.005, so it rounds down to 1. This calculator rounds the decimal digits you typed. 1.005 is exactly halfway between 1 and 1.01, and half up gives 1.01.

How do I round to the nearest ten, hundred or whole number?

Choose Decimal Places. Enter 0 for a whole number, -1 for the nearest ten and -2 for the nearest hundred. 1234.5 to -2 decimal places is 1200.

Why does 2.5 to 3 significant figures show 2.50?

In significant figures mode the calculator writes the zeros after the decimal point that count as significant, so you can see all 3 figures. In decimal places mode it leaves trailing zeros off, and 2.5 to 2 decimal places stays 2.5. A whole-number result such as 12800 cannot show which of its zeros are significant.

What happens with very large or very small numbers?

Decimal places run from -308 to 308 and significant figures from 1 to 100. A result longer than 120 characters prints in e-notation with every digit kept, so 1e308 to 3 significant figures is 1.00e+308. A number above about 1.8e308 gets a message, and so does one below 1e-309 in significant figures mode.

We use cookies

We use cookies to ensure you get the best experience on our website. For more information on how we use cookies, please see our cookie policy.

By clicking "Accept", you agree to our use of cookies.
Learn more.