Menu

Rounding Calculator

Both neighbours, the exact gaps, and what every convention does with a tie.

By Nethanel Bar, Co-founder & CEO

Last updated

Want to solve these without the calculator?

The Coddy math course teaches the method itself - you work each step on an interactive board and get told exactly where a move went wrong.

Rounding is a comparison, not a rule

To round a number you only need two candidates: the multiple of your chosen place just below it, and the one just above. 3.472 to one decimal place sits between 3.4 and 3.5, and it is 0.072 above the first and 0.028 below the second - so 3.5 wins. "Look at the next digit and go up if it is 5 or more" is a shortcut for exactly that comparison, and it is a very good one.

The shortcut only becomes a real decision at the halfway point, where neither neighbour is nearer. There the answer genuinely depends on which convention you use, and there are six in common use: school rounding sends a tie away from zero, a bank sends it to the even neighbour, a spreadsheet's FLOOR always goes down, and truncation just drops the rest. This page shows all six side by side on your number, because that is the question a rounding page ought to answer.

Seeing a tie at all needs exact arithmetic. In binary floating point 2.675 is really 2.67499999999999982…, which is why nearly every calculator, spreadsheet and programming language rounds it to 2.67 and insists it was never a tie. Here the number is held as an exact fraction, so 2.675 is a tie, the page says so, and the article explains why your other calculator disagreed.

What to notice

  • The two neighbours are always multiples of the place you are rounding to. To the nearest ten they are 1270 and 1280; to two decimal places, 2.67 and 2.68.
  • Only the distance matters, not the digits. The digit rule works because a digit of 5 or more IS the far half of the interval - it is a shorthand for the comparison, not a separate law.
  • Significant figures count from the first non-zero digit, not from the decimal point. 0.004567 to two significant figures is 0.0046 - the leading zeros are placeholders, not figures.
  • The conventions only ever disagree on a tie. Off a tie, half-up, half-even and half-down all give the same answer, which is why most people never notice there is more than one rule.
  • The school rule is "away from zero", not "towards positive infinity". That is why -2.5 rounds to -3 under it, while a ceiling function would give -2.
  • Rounding twice is not the same as rounding once. 2.446 to two decimals is 2.45, and rounding THAT to one gives 2.5 - but rounding the original straight to one decimal gives 2.4.

How to round a number

  1. Decide what you are rounding to

    A number of decimal places, a place value (tens, hundreds), or a number of significant figures. Everything after this is the same work whichever you chose.

  2. Find the two neighbours

    The multiple of that place just below your number, and the one just above. For 3.472 to one decimal place: 3.4 and 3.5.

  3. See which is nearer

    Either compare the distances (0.072 against 0.028) or use the shortcut: look at the first digit past the place, and go up if it is 5 or more. Both answer the same question.

  4. If it is exactly halfway, apply a convention

    The school rule rounds away from zero: 2.5 goes to 3 and -2.5 goes to -3. Statisticians and banks often round to the even neighbour instead, so 2.5 goes to 2 and 3.5 goes to 4.

  5. Keep the place you rounded to

    Rounding 1274 to the nearest hundred gives 1300, not 13. The zeros are load-bearing: they say which place the answer is accurate to.

The same numbers, rounded four ways

School rounding (5 or more goes up) applied to each place. Note the numbers that do not move: they are already exact multiples of that place.

Number1 d.p.2 d.p.Nearest 102 s.f.
3.4723.53.4703.5
2.6752.72.6802.7
12741274127412701300
0.0045670000.0046
-2.5-2.5-2.50-2.5
9.96109.961010
0.50.50.500.5
149.5149.5149.5150150

Worked examples

3.472 to one decimal place

plain
3.472

The neighbours are 3.4 and 3.5. The gaps are 0.072 and 0.028, so 3.5 is nearer and that is the answer. The shortcut agrees: the digit after the tenths place is 7, which is 5 or more, so round up. The rounding error is 0.028 - which is what "to one decimal place" costs you.

The tie nobody's calculator sees: 2.675 to two decimals

plain
2.675

Held exactly, this number sits precisely halfway between 2.67 and 2.68. School rounding sends it up to 2.68; a bank would send it to the even neighbour, 2.68 as well; half-down would give 2.67. Your phone almost certainly says 2.67, because in binary 2.675 is stored as slightly less than a half.

A negative tie: -2.5 to the nearest whole number

plain
-2.5

The school rule acts on the digit, so it rounds away from zero: -3. A ceiling function goes towards positive infinity and gives -2; a floor gives -3; truncation just drops the .5 and gives -2. Four defensible answers, which is exactly why the convention has to be stated.

Significant figures: 0.004567 to two

plain
0.004567

Counting starts at the 4, so two significant figures means the 4 and the 6, and the deciding digit is the 7 that follows: round up to 0.0046. The three leading zeros are not figures - they are placeholders telling you where the number sits.

When rounding carries: 9.96 to one decimal place

plain
9.96

The neighbours are 9.9 and 10.0, and 9.96 is nearer the second, so the answer is 10 - the carry ripples all the way through the units. This is the case that catches people out, because the digit before the rounding place changes too.

Nothing to do: 149.5 to one decimal place

plain
149.5

149.5 is already an exact multiple of 0.1, so there are no two neighbours to choose between and the number is returned unchanged with a rounding error of zero. To the nearest ten it is a different story: that IS a tie, and school rounding gives 150.

Common mistakes

  • Rounding in stages. Round from the ORIGINAL number every time: 2.446 taken to two decimals and then to one gives 2.5, but rounded straight to one decimal it is 2.4.
  • Dropping the place-holding zeros. 1274 to the nearest hundred is 1300; writing 13 changes the number by a factor of a hundred.
  • Counting significant figures from the decimal point. In 0.004567 the first significant figure is the 4, so two significant figures is 0.0046 and not 0.00.
  • Assuming the calculator's tie behaviour is the maths. A spreadsheet's ROUND rounds a tie away from zero, Python's round() rounds it to even, and both are defensible - the disagreement is about convention, not correctness.
  • Reading "round up" as "towards positive infinity" for negatives. Under the school rule -2.5 goes to -3, because the digit rule works on size and ignores sign.
  • Forgetting that a rounded number is an approximation. Once you have written 3.5, the 0.028 is gone for good - so round at the END of a calculation, never in the middle.

Rounding FAQ

How do I round a number to a decimal place?
Look at the first digit past the place you want. If it is 5 or more, round up; otherwise round down. For 3.472 to one decimal place the next digit is 7, so the answer is 3.5. Equivalently, and more honestly: pick whichever of 3.4 and 3.5 is nearer.
Does 5 always round up?
Under the rule taught in school, yes - and a lone 5 is the one case where the two neighbours are equally near, so the rule is a convention rather than a fact. Other conventions exist and are widely used: rounding to the even neighbour, rounding down, or rounding towards zero.
What is bankers' rounding and why does it exist?
Round-half-to-even: a tie goes to whichever neighbour is even, so 2.5 becomes 2 and 3.5 becomes 4. Always rounding ties up biases a long column of figures upward; sending half of them down cancels that bias out. It is the default in IEEE floating point and in several statistical packages.
How do I round to significant figures?
Count from the first non-zero digit rather than from the decimal point, then round at that place. 0.004567 to two significant figures is 0.0046, and 123456 to three is 123000. This page works out where that place falls for you and then rounds normally.
Why does my calculator say 2.675 rounds to 2.67?
Because it never had 2.675. In binary floating point that value is stored as 2.67499999999999982…, which is genuinely below the halfway point, so the calculator is rounding correctly on the number it actually holds. This page keeps the number as an exact fraction, so it can see the tie your calculator cannot.
How do negative numbers round?
Depends on the convention, which is exactly why this page shows all six. The school digit rule rounds away from zero, giving -3 for -2.5. A ceiling goes towards positive infinity (-2), a floor towards negative infinity (-3), and truncation towards zero (-2).
What is the difference between rounding and truncating?
Truncating drops everything past the place, no matter what it says: 3.99 truncated to a whole number is 3. Rounding picks the nearer neighbour, so 3.99 becomes 4. Truncation is faster and always biased towards zero, which is why it is fine in a loop counter and dangerous in money.
Where in a calculation should I round?
At the very end. Rounding intermediate values throws away information you still need, and the errors accumulate: this is why the exact answers on these pages keep fractions as fractions and radicals as radicals until you ask for a decimal.

More math tools

Coddy programming languages illustration

Learn math with Coddy

GET STARTED