On this page
What this issue is
Money has a fixed number of decimals (2 for USD and EUR, 0 for JPY, 3 for KWD). When a store converts a price, adds tax or applies a discount, the result often has extra decimals. The store must round it. A currency rounding error appears when the cart, the checkout, the payment page and the confirmation email round at different points or use different rules, so the totals disagree by a cent or two.
| Method | Line 1 (3 x 1.333) | Line 2 (2 x 2.666) | Total shown |
|---|---|---|---|
| Round each line, then add | 4.00 | 5.33 | 9.33 |
| Add exact values, round once | 3.999 | 5.332 | 9.33 |
| Round each unit price first | 3 x 1.33 = 3.99 | 2 x 2.67 = 5.34 | 9.33 |
Why it costs you leads or sales
- Shoppers who notice the total changed between cart and payment lose trust and may leave.
- Payment gateways or accounting tools may reject or flag orders where the charged amount and the order total differ.
- Refunds and reconciliation take longer when invoice, order and payment amounts disagree by cents.
- Conversion data sent to ad platforms can carry a slightly different value than the real order.
- In some regions, invoices must show correct tax totals, so rounding differences can create compliance work.
Example: illustrative scale only, not measured data. Cent-level gaps rarely lose a sale by themselves but add support and reconciliation work.
How to check if your site has it
Pick awkward test products
Use prices that produce long decimals after conversion or tax, such as 19.99 with 7.5% tax, or products with 3 or 7 units.
Compare totals at every step
Note the product page price, cart subtotal, checkout total, payment page amount, confirmation page and confirmation email.
Repeat in each currency and country
Switch currency and shipping country. Zero-decimal currencies like JPY and tax-inclusive regions often expose differences.
Test with a discount code
Discounts split across lines are a frequent source of one-cent gaps.
Stop before paying
Use your payment provider's test mode if you want to see the charged amount. Never use real card details for tests.
- Product pagePrice shown, possibly converted
- CartLine totals and subtotal
- CheckoutTax and shipping added, rounded differently
- PaymentCharged amount differs by cents
- ConfirmationEmail and invoice show another total
The total is recalculated at several steps. A mismatch can start at any of them.
How to fix it
Check Markets currency settings
In Settings > Markets, open the market and review currency and rounding. Shopify lets you set price rounding for converted prices (for example, end in .99).
Use fixed prices where it matters
In the Markets product pricing, set fixed prices per currency instead of relying on automatic conversion for key products.
Review tax settings
In Settings > Taxes and duties, confirm whether prices include tax. Mixed settings between markets cause mismatched totals.
Check apps that change prices
Disable currency converters, bundle or discount apps one by one and retest to find the one that rounds differently.
Review WooCommerce tax rounding
In WooCommerce > Settings > Tax, check the option 'Round tax at subtotal level, instead of per line'. Switch it and retest your awkward products.
Check the number of decimals
In WooCommerce > Settings > General, confirm Number of decimals matches the currency (0 for JPY, 2 for USD).
Audit multi-currency plugins
Plugins that convert prices in the browser can round differently from the server. Set the plugin's rounding rule and make sure the order is charged in the same currency shown.
Work in minor units
Store and calculate money as integers (cents), not floating-point decimals, and convert to display format only at the end.
Round once with a fixed rule
Choose per-line or per-order rounding and use it in the cart, order, invoice and payment request.
Send the server-calculated amount to the gateway
Never let the browser total be the amount charged. Use the server's value and compare it with the order record.
// Prices in cents (integers) avoid floating-point drift
const lines = [
{ unitCents: 1333, qty: 3 },
{ unitCents: 2666, qty: 2 }
];
const taxRate = 0.075;
const subtotal = lines.reduce((sum, l) => sum + l.unitCents * l.qty, 0);
// Round tax once, on the subtotal
const tax = Math.round(subtotal * taxRate);
const total = subtotal + tax;
console.log((total / 100).toFixed(2));How to confirm it's fixed
- Cart subtotal, checkout total and payment amount match to the cent for every test product.
- The same holds in each currency and shipping country you sell in.
- Tests with a discount code and with multiple quantities also match.
- The confirmation page and email show the same total as checkout.
- The value sent to your analytics and ad platforms matches the order total.
Before
- Cart shows 9.33, payment page shows 9.34.
- Tax rounded per line in one place and per order in another.
- Invoice total differs from the payment amount.
After
- One rounding rule applied everywhere.
- Every screen reads the same server-calculated total.
- Invoice, order and payment amounts match.
How to prevent it happening again
- Retest awkward-decimal products after changing tax, currency or rounding settings.
- Retest after installing or updating pricing, discount, bundle or currency apps and plugins.
- Keep a small set of test products and a discount code for checks.
- Document your rounding rule so developers and apps follow it.
- Run an automated check of the order total on a schedule.
How FunnelGuard handles this
Questions people ask
Why is my checkout total off by one cent?
Usually because tax, discounts or currency conversion are rounded at different steps. For example, the cart may round each line while the checkout rounds the whole order. Choose one rounding rule and make every screen use the same calculated total.
Why does my order total not match the cart total?
The cart and checkout may calculate tax, shipping or discounts differently, or a plugin may convert prices in the browser. Compare each step with a test product that has long decimals to find where the numbers split.
How do I fix currency rounding in WooCommerce?
Go to WooCommerce > Settings > Tax and test the option to round tax at subtotal level instead of per line. Also confirm Number of decimals under Settings > General and review any multi-currency plugin's rounding rule.
How do I set price rounding for other currencies in Shopify?
Open Settings > Markets, select the market, and review its currency and rounding options. For key products, set fixed prices per currency so conversion does not create odd decimals.
Should I round each line item or the order total?
Either can be valid, but you must use one consistently and follow your local tax rules. Many stores round tax once on the subtotal. Check with your accountant if invoices must show specific tax totals.
Why do floating-point numbers cause rounding errors in prices?
Computers store many decimals like 0.1 as approximations, so sums can come out slightly off. Store money as integer minor units such as cents and round only once at the end.
Can FunnelGuard catch rounding differences at checkout?
Yes. Its order_total_consistent check compares the totals shown in the checkout journey and flags differences larger than 0.02. A gap of one or two cents falls within that tolerance.
Related issues
- CNV-341Currency switcher doesn't change pricesFix guide
- CNV-342Prices shown in wrong currency for countryFix guide
- CNV-337Language switch loses cart or form dataFix guide
- CNV-339Geo-redirect sends visitors to wrong country siteFix guide
- CNV-336Language switcher goes to 404Fix guide
- CNV-338Translated page has untranslated form or errorsFix guide