MathsFractions & Decimals

Rounding
calculator.

Round to any place or multiple, and see why it landed there.

How it’s worked out

Every rounding has the same shape. Your number sits between two neighbors at the place you chose, and the rule picks one. For 2.345 at hundredths, the neighbors are 2.34 and 2.35, and the halfway point is 2.345 itself.

Nearest-neighbor rules

Look at what comes after the place you keep, and compare it with half of one unit at that place. A unit here means 1 in that place, so at hundredths it is 0.01. If what you drop is less than half, go to the neighbor nearer zero. If it is more than half, go to the one farther away.

|answer−number|\displaystyle |\text{answer} - \text{number}|≤12×unit\displaystyle {}\le \tfrac{1}{2} \times \text{unit}

So 2.341 becomes 2.34. The first digit you drop usually settles it, but all of them count: a 5 followed by anything except zeros is more than half. That is the part most rules agree on, because only a tie is left open.

The tie

A tie is a number exactly halfway, such as 2.345 at hundredths. There is no nearer neighbor, so a tie rule chooses. Half up goes away from zero, giving 2.35. Half to even picks the neighbor whose last digit is even, giving 2.34, while 2.355 gives 2.36. The second rule is the one NIST gives in its guide to the SI, SP 811, Appendix B.7.1: 6.974950 and 6.974952 are its own examples at 7 digits.

Rules with a direction

Some jobs do not want the nearest neighbor. Always up and always down go by value, so on negative numbers always up moves toward zero. Cut off drops the extra digits, which always moves toward zero. Away from zero grows the size of anything that has something left over.

Exact digits

The tool works on the digits you typed, as whole numbers of any length. It never turns your number into binary, so a real tie stays a tie. Rounding to a multiple, such as the nearest 0.05, works the same way with that multiple as the unit: 18.45 is the nearest 0.05 to 18.47.

Worked examples

Sam rounds to the nearest hundred

Sam's homework asks for 3,482 to the nearest hundred. He keeps 34 and drops 82. Half of a hundred is 50, and 82 is more than that, so he goes up. The answer is 3,500. The grade 3 standard, 3.NBT.A.1, asks for this skill, and 5.NBT.A.4 takes it on to decimals.

Open this example in the tool

Lena checks an invoice

Lena's invoice has three lines: 19.995, 4.125 and 7.505. Rounding each to the cent gives 20.00, 4.13, 7.51, and those add up to 31.64. The exact total is 31.625, which rounds to 31.63. The two are 0.01 apart. Neither is wrong, but the supplier and Lena need to agree on which one counts.

Open this example in the tool

Ana buys boxes of tile

Ana works out she needs 12.2 boxes of tile. Half up says 12, which leaves her short. She needs to round in one direction, so she picks always up and gets 13 boxes.

Open this example in the tool

Reading your result

Which rule to use. For homework, use the one your teacher gives, which is usually half up. Otherwise, the table below shows what each does. The first three only differ on a tie. The tool's table of every rule shows the same thing for your number.

RuleWhat it does2.53.5−2.52.45 to tenths
Half upA tie goes away from zero34−32.5
Half to evenA tie goes to the even digit24−22.4
Half downA tie goes toward zero23−22.4
Always upToward higher values34−22.5
Always downToward lower values23−32.4
Cut offToward zero23−22.4
Away from zeroAnything left over grows34−32.5

What your software does. Python's round() goes to the even choice on a tie, according to its documentation, so round(0.5) is 0. Excel's ROUND page does not spell out a tie rule, but its example of ROUND(2.15, 1) gives 2.2, and ROUND(−1.475, 2) gives −1.48, which is what half up gives here. The same page points to ROUNDUP (away from zero), ROUNDDOWN (toward zero) and MROUND (a multiple).

Why a program can disagree. Most programs hold numbers in binary, and most decimals do not fit exactly. Python's documentation gives the classic case: round(2.675, 2) returns 2.67, not 2.68, because 2.675 is held as 2.67499999999999982236. It works in both directions. 2.345 is held as 2.3450000000000001954, a little too high, and JavaScript's toFixed gives 2.35. And 1.005 is held as 1.00499999999999989342, so toFixed gives 1.00 where paper says 1.01. The card on the tool shows this for your own number.

Cash and multiples. Canada withdrew its penny, and its Budget 2012 notes say only the final amount of a cash payment is rounded, after items and taxes are added up exactly. To the nearest five cents, 18.47 becomes 18.45 and 18.48 becomes 18.50. The same setting handles hours to the quarter: 7.36 is 7.25.

Common mistakes

  • Rounding in stages. 2.445 to tenths is 2.4. Going through hundredths first gives 2.45, and then 2.5, which is wrong. Always round from the original number.
  • Rounding every line, then adding. This is where cents go missing. Three lines of 0.125 add to 0.375, which is 0.38. Rounded first, they total 0.39 with half up, and 0.36 with half to even. Add first if the rules allow it.
  • Calling anything with a 5 a tie. 2.3451 is not a tie, because the digits after the 5 are not all zero. It rounds to 2.35, even under half to even.
  • Dropping a zero that matters. 2.5 to hundredths is 2.50, not 2.5. The zero says the value is known to that place.
  • Expecting half up to mean upward on negatives. Here half up means away from zero, so −2.5 becomes −3. Excel's examples work this way too. If you need to go toward higher values, use always up, which gives −2.

Questions people ask

Keep two digits after the decimal point and look at what follows. If it is more than half of the last place, add one to the second digit; if it is less, leave it. So 3.14159 becomes 3.14 and 2.678 becomes 2.68. A tie, such as 2.345, depends on the rule you choose.

Sources