TOOLTIKI Lovable tool, really free

Rounding twice gives a different answer

Rounding 2.44 to one decimal gives 2.4, and rounding that to a whole number gives 2. Rounding 2.44 straight to a whole number also gives 2 — but 2.45 rounds to 2.5 and then to 3, while rounding it directly gives 2. Double rounding is a real source of error, and it is why financial and scientific work rounds once, at the end.

Standard rounding sends 2.5 up to 3. Banker’s rounding sends it to 2 — the nearest even number — so that repeated rounding does not drift upward across a long column of figures.

Which rounding rule does what?

Three in common use, and they disagree only at the exact halfway point.

Rule 2.5 3.5 −2.5 Used by
Round half up 3 4 −2 Most school teaching
Round half away from zero 3 4 −3 Most spreadsheets
Banker’s (half to even) 2 4 −2 Accounting, IEEE floating point

Banker’s rounding exists because always rounding halves upward introduces a systematic bias. Across ten thousand transactions that bias is money, and the fix is to send half the halves down — which rounding to even does without needing to track anything.

Truncation is a fourth option and a different operation entirely: it drops the decimals, so 2.9 becomes 2. It is what integer division does in most programming languages, and it biases downward by an average of half a unit.

What counts as a significant figure?

The digits that carry meaning, and the rules for zeros are the whole of the difficulty.

  • Leading zeros never count. 0.00340 has three significant figures.
  • Zeros between digits always count. 1002 has four.
  • Trailing zeros count after a decimal point. 3.400 has four; 3400 is ambiguous without notation.

That last ambiguity is why scientific notation exists. Writing 3.4 × 10³ says two significant figures and 3.400 × 10³ says four, where "3400" says neither.

How do significant figures propagate?

Differently for different operations, which is the rule most often skipped.

Multiplication and division keep the significant figures of the least precise input: 2.0 × 3.14159 is 6.3, not 6.28318. Addition and subtraction keep the decimal places of the least precise input instead: 12.1 + 3.005 is 15.1.

The reason they differ is that multiplication compounds relative error while addition compounds absolute error. It is the same distinction that makes a percentage error and a plus-or-minus tolerance two different specifications.

Subtracting two nearly equal numbers is the pathological case. 1.0002 − 1.0001 has five significant figures on each side and one in the answer, and that loss of precision — catastrophic cancellation — is behind a whole category of numerical bug.

What about currency and half-cents?

Money is the case where the rule has to be decided rather than defaulted, because the smallest representable unit is a legal fact. A price of 1.005 has no representation in a currency with two decimal places, and the direction it goes is worth a hundredth of a unit on every transaction that produces one.

The standard defence is to hold monetary values as integers of the smallest unit — pence, cents — and never as decimals at all. Arithmetic then has no fractional part to round, and rounding becomes an explicit step at the point of display rather than an accident of storage.

Where does this cost real money?

Anywhere a total is computed from rounded parts. Rounding each line of an invoice and summing gives a different answer from summing and rounding once, and the difference grows with the number of lines.

Tax authorities generally specify which, precisely because both are defensible. VAT rules in several jurisdictions require rounding per line; others require it on the total — and a system that does the other one produces returns that are consistently a few units out with no obvious cause.

The VAT article covers the related trap of removing a percentage by subtraction rather than division, which is a larger error from the same family.

Why does floating point round oddly?

Because binary cannot represent most decimal fractions exactly. One tenth in binary is a repeating fraction, so 0.1 + 0.2 stores as something fractionally above 0.3 and comparing it to 0.3 fails.

IEEE 754 uses banker’s rounding at every step for the same anti-bias reason, which is why a language may print 2.675 rounded to 2.67 rather than 2.68 — the stored value is very slightly below the halfway point before any rounding happens.

The practical rule is to compare floating-point numbers with a tolerance rather than for equality, and to hold money in integers of the smallest unit rather than in floats at all.

Questions people ask

Which rounding should a spreadsheet use? Most default to half away from zero. Where the total of a rounded column must match the rounded total, banker’s rounding or explicit reconciliation is needed — neither happens automatically.

Is truncation ever right? When the fraction genuinely cannot be used: whole boxes, whole people, whole tickets. It is a floor operation rather than a rounding one, and calling it what it is avoids the confusion.

How many figures should I report? No more than the least precise input justifies. Reporting six figures from a measurement good to two is a claim about precision that the data does not support.

Does rounding early ever help? Only for readability in intermediate display. Any value that will be used in a further calculation should carry full precision through and round once, at the end.

Round once, at the end, and state which rule. The rounding calculator shows the three rules side by side, and the significant figures calculator applies the propagation rules that decide how many digits you are entitled to.