How this calculator works
The text input keeps the entered decimal digits, so half-cent ties are decided with integer arithmetic. Half-up sends an exact tie away from zero; half-even sends it to an even cent. In line mode, amounts are first aligned to a common decimal scale and added exactly. The page compares the sum of rounded lines against rounding that exact total once. Results are decimal amounts in the same currency as the input; no currency conversion is performed.
Formula
For half-up, rounded cents = sign(x) × floor(100|x| + 0.5). Difference = sum(round_each_line) - round(sum_of_lines). Integer arithmetic evaluates the decimal fractions exactly.
Worked example
2.675 rounds to 2.68 with half-up. Two lines of 0.005 each round separately to 0.01 + 0.01 = 0.02, but their exact total 0.010 rounds once to 0.01. The difference is one cent.
Advertisement
Frequently asked questions
Why can the two totals differ?
Rounding discards information on each line. Adding those rounded values can accumulate a difference from keeping all digits until the final total.
Is this Canadian cash rounding to five cents?
No. This tool rounds decimal amounts to one cent. Rounding a final cash payment to five cents is a different operation.
What happens with negative amounts?
Refunds and negative lines are accepted. Half-up sends -2.675 to -2.68, while ceiling always moves toward plus infinity. Choose the rule required by your calculation.