Issue #24224:normalize margin calculations

Just curious: what problem does this solve? Is it possible for `SUM(tax)` to be a non-integer?