Why It Happens
Shopify's Cart Transform distributes discounts across individual line items. When the discount doesn't divide evenly, rounding occurs.
Clean example: 3 × $15 = $45, 20% off = $9 discount. $9 ÷ 3 = $3 each. Total: $36.00 ✓
Rounding example: 3 × $17 = $51, 17% off = $8.67 discount. $8.67 ÷ 3 = $2.89 each. Total might be $42.32 or $42.34 instead of $42.33.
Which Discounts Are Affected
Discount Type | Rounding Risk |
Fixed Price | None — always shows exact price |
Fixed Amount Off | Low — only when dividing across items |
Percentage Off (10%, 20%, 25%) | Low — divides cleanly |
Percentage Off (15%, 17%, 33%) | Higher — creates repeating decimals |
Solutions
Use Fixed Price — Avoids rounding entirely. "3 for $40" always shows $40.
Use round percentages — 10%, 20%, 25% divide more cleanly than 15%, 17%, 33%.
Accept minor variance — $39.99 vs $40.00 rarely bothers customers. The savings message is what matters.
When to Investigate
A few cents off ($39.99 vs $40.00) — Normal, nothing to fix
More than $1 off ($38.50 vs $40.00) — Check discount settings and product prices
