Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Cart total doesn't match line items: how to find and fix it

CNV-158High impactPartlyBy FunnelGuardPublished Updated
On this page

What this issue is

The cart shows items, each with a price and quantity. Under them is a total. If the line items add up to one number and the total shows another, and the gap is not explained by a visible discount, shipping or tax line, you have this issue.

Typical forms: a total that ignores a quantity change, a discount applied to the total but not shown, tax added to some lines but not others, a cached total from an earlier cart state, or rounding that drifts by a cent or a penny per line.

Why it costs you leads or sales

Shoppers check the sums. A total that looks wrong reads as a mistake or a hidden charge, and people leave rather than ask. If the total is too low, you may sell at a loss. If it's too high, you lose the sale. The cart and checkout can also disagree, which is the moment shoppers are most likely to stop.

Where a wrong total hurts
  1. Add to cartItems and prices correct
  2. Cart pageTotal differs from line items
  3. CheckoutShopper doubts the price and leaves
  4. PurchaseOrder and purchase tracking never happen

The mismatch appears in the cart, so the steps after it are at risk.

Shoppers continuing from cart to checkoutExample numbers
Shoppers continuing from cart to checkout (example)Total correct: 60 %; Total mismatch: 42 %023466042Total correctTotal mismatch%

Example: illustrative numbers showing how a visible total mismatch could reduce progress from cart to checkout.

How to check if your site has it

Build a test cart that exercises each rule you use, then do the sum yourself.

Check the cart maths by hand
  1. Build a mixed cart

    Add two or three products, one with quantity 2 or more, one on sale, and one variant if you sell them.

  2. Write down each line

    Note unit price times quantity for every line, then add them up to get your own subtotal.

  3. Compare with the cart

    Check the subtotal, discount, shipping, tax and total shown. Each gap should have a visible label.

  4. Change something and recheck

    Change a quantity, remove an item, apply a discount code, change the country, then repeat the comparison without reloading, and again after a reload.

  5. Compare with checkout

    Proceed to checkout and confirm the order summary total matches the cart. Test on mobile and in a private window as well.

Common causes and what to look for
CauseSymptomWhere to look
Cached cart fragmentTotal is old until reloadCaching plugin or CDN rules for cart pages
Discount ruleTotal lower than lines with no discount lineAutomatic discounts, cart rules, hidden codes
Tax settingLines show tax-inclusive, total adds tax againTax display and price entry settings
RoundingOff by one cent or pennyPer-line vs per-order rounding
Custom code or widgetTotal ignores upsell or bundle itemsTheme cart template, upsell apps, scripts
Currency or marketLines in one currency, total in anotherMulti-currency or market settings

How to fix it

First find which number is wrong: a line, the subtotal, or the total. Then fix the cause for your platform.

Fix by platform
  1. Exclude cart pages from caching

    In your caching plugin and CDN, never cache the Cart, Checkout and My Account pages, and the cart cookies. WooCommerce sets these by default, but plugins can override them.

  2. Review tax settings

    Go to WooCommerce > Settings > Tax. Check 'Prices entered with tax' and 'Display prices in the shop/cart'. They should match how you enter prices.

  3. Check rounding

    In the same Tax settings, test the 'Round tax at subtotal level' option and see whether the drift disappears.

  4. Isolate plugins

    On a staging copy, disable discount, bundle, upsell and currency plugins one by one and retest the cart to find the one that changes totals.

Sum in minor units to avoid rounding driftjavascript
function cartTotals(lines, discountMinor, shippingMinor, taxMinor) {
  const subtotal = lines.reduce(
    (sum, l) => sum + l.unitPriceMinor * l.quantity, 0
  );
  const total = subtotal - discountMinor + shippingMinor + taxMinor;
  return { subtotal, total };
}
Cart summary

Before

  • Lines add up to 80.00
  • Total shows 72.00 with no explanation
  • Checkout shows 80.00

After

  • Lines add up to 80.00
  • Discount line of -8.00 shown
  • Cart and checkout both show 72.00

How to confirm it's fixed

Confirmation checks
  • Hand-calculated subtotal equals the cart subtotal
  • Every difference to the total has a labelled line
  • Total updates correctly after changing quantity and removing an item
  • Total is the same after a page reload
  • Cart and checkout totals match
  • Result is the same on mobile and in a private window
  • Result is the same for each country or currency you sell in

How to prevent it happening again

Retest the cart after any change to discounts, tax, shipping, themes, caching or cart apps. Keep one fixed test cart and its expected total in your notes, so a quick check takes a minute. Avoid scripts that rewrite prices on the page.

How FunnelGuard handles this

FunnelGuard detects this issue only partly. It runs an order_total_consistent check on the cart and checkout totals, so it can flag when the totals it reads on those pages disagree. It does not add up the individual line items, so a total that is wrong in a way that still looks consistent between cart and checkout will not be caught.

To cover the rest by hand, keep a fixed test cart with a known expected total, and redo the hand calculation from this guide after every pricing, tax, discount or theme change. Checks run on a schedule from the EU or the US, and a failure is re-checked from a second region before one alert goes out with a screenshot and a likely cause. FunnelGuard stops before payment unless your store's test mode is set up. The Free plan covers 1 site and 2 journeys with daily checks and no card, and every paid plan has a 3-day free trial.

Questions people ask

Why does my cart total not match the line items?

The total is usually calculated from something other than the lines you see: a hidden discount, tax or shipping, a cached older cart, rounding, or custom code. Add up the lines by hand, then find which number differs and why.

Why is my cart total different from the checkout total?

The cart and checkout may use different calculations, such as shipping or tax only added at checkout, a cached cart page, or a discount that applies in one place only. Make both use the same totals logic and show every extra charge as its own line.

Why is my WooCommerce cart total wrong?

Common causes are caching of the cart page, tax display and price-entry settings that don't match, rounding settings, and discount or bundle plugins. Exclude cart pages from caching, review WooCommerce > Settings > Tax, and test with plugins disabled on staging.

Why is my Shopify cart total different from the items?

Check automatic discounts, tax and duties settings, market currency rounding, and any cart or upsell app or theme code. If checkout is right but the cart is wrong, the theme or an app is likely rendering the total incorrectly.

How do I fix a rounding difference in the cart total?

Calculate in minor units such as cents or pence and round once with a clear rule. On platforms with a setting, choose whether tax is rounded per line or per order, then retest with your usual product mixes.

Can FunnelGuard detect a cart total that doesn't match line items?

Only partly. It checks that the cart and checkout totals are consistent but does not sum the individual line items. You should still test a known cart by hand after changes.

How often should I test my cart totals?

Test after every change to prices, discounts, tax, shipping, themes, plugins or caching, and regularly in between. A scheduled automated check helps catch problems you didn't expect.

Does FunnelGuard catch this?

Partly

FunnelGuard checks part of this.

How: order_total_consistent on cart/checkout totals; line items not summed.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.