Multiply each item's quantity by its unit price, add those line totals together, then add tax, shipping, and any handling fees to get the true total. The line-item subtotal is easy; the money leaks in the layers above it — per-unit shipping that doesn't scale, tax applied per line versus per order, and discounts that land before or after tax. Get those three layers right and the total you calculate will match the amount actually charged.

This matters most when you're buying across mixed categories or mixed sellers. A single tax rate on a combined basket overwrites the taxability rules for each product, and a flat shipping estimate hides weight tiers that kick in at the third item. The method below keeps every item on its own line so the arithmetic stays auditable, then folds in the adjustments in the order retailers and tax authorities apply them.

Separate Each Item Into a Quantity, Unit Price, and Line Total

Start by giving every item three fields: how many you're buying, what one costs, and the resulting line total. If a listing shows a "2 for $9" price, the unit price is $4.50, not $9. A 12-pack of batteries priced at $18 has a unit price of $1.50 per battery if you're comparing against singles sold at $2.50 each — the pack saves you a dollar per battery, but only if you'll use all twelve.

Item Quantity Unit price Line total
Coffee beans, 12 oz 3 $11.50 $34.50
Paper towels, 6-roll 2 $8.25 $16.50
Dish soap, 16 oz 1 $4.99 $4.99
Subtotal $55.99

The subtotal is the anchor number. Everything downstream — tax, shipping, discounts — is applied to it or to subsets of it, so if the subtotal is wrong, the final total is wrong by the same margin. Reconcile the subtotal against the order confirmation page before you touch anything else, because the confirmation is what the seller considers binding.

One trap lives in bulk pricing tiers: a "buy 3, save 10%" offer usually applies to the qualifying line total, not the order total. If you buy three coffee bags at $11.50, the discount is $3.45 on that line, dropping it to $31.05. Mixing a discounted line with a full-price line means you can't apply the percentage to the subtotal.

The Core Arithmetic: Subtotal Plus Adjustments, In the Right Order

Retailers and tax authorities apply adjustments in a fixed sequence, and changing the order changes the answer. The standard sequence is: line totals → subtotal → discounts → shipping and handling → tax → grand total. Apply a percentage discount to the subtotal before tax, and the tax base shrinks with it, which is why "10% off plus tax" costs less than "10% off after tax."

Run the coffee-and-paper-towels basket above with a 15% discount, flat $6.99 shipping, and an 8.25% sales tax rate:

Tax on shipping is the wrinkle that trips people. Many US states tax shipping when it's bundled into the price of the goods but not when shipping is a separate, optional charge — the exact rule differs by state, so a mixed-state order or a seller shipping from another state can produce a total that doesn't match your own calculation. The Streamlined Sales Tax Governing Board publishes a state-by-state matrix showing which states tax delivery charges; check it if your order crosses state lines.

Here's the same basket if you instead discount after tax: $55.99 subtotal, $6.99 shipping, 8.25% tax on $62.98 is $5.20, giving $68.18, then a 15% discount brings it to $57.95. That's a dollar and change less than the correct sequence — discounting after tax removes less tax than discounting before it, and the seller applies before.

Per-Unit Shipping and Handling Rarely Scales Linearly

Flat shipping is the easy case. The hard case is per-item or weight-tiered shipping, where adding the fourth item costs more than adding the second. If a seller charges $4.95 per item and you buy six, shipping is $29.70, not $4.95 — and if the seller caps shipping at five items, the sixth ships free, changing the marginal cost of item six to zero.

Shipping model 1 item 3 items 6 items What to watch
Flat per order $6.99 $6.99 $6.99 Best for large baskets
Per unit $4.95 $14.85 $29.70 Punishes bulk buying
Weight tier $5.00 $8.00 $14.00 Tiers vary by carrier
Free over $75 $6.99 $6.99 $0.00 Threshold excludes tax

Weight tiers follow carrier rules rather than round numbers. USPS Ground Advantage pricing, which the Postal Regulatory Commission oversees, climbs in weight bands; a parcel that tips from 15.9 to 16.1 ounces can jump into a higher band and cost more than the extra two-tenths of an ounce suggests. If you're near a tier boundary, cutting one item can save more than its price.

Build the shipping line from the carrier's own rate calculator rather than a remembered number, because carrier rates change annually and a figure recalled from last year is frequently wrong. For marketplace orders, the seller sets the shipping policy, not the carrier, so read the seller's policy page before assuming the carrier rate applies.

Sales Tax Depends on Where the Item Ships and What It Is

Sales tax is not one rate applied to one number. It's a rate for the destination jurisdiction multiplied by the taxable portion of the order, and the taxable portion excludes some items entirely. In most US states, unprepared food is exempt or taxed at a reduced rate while prepared food is fully taxed; clothing thresholds vary by state; and digital goods taxability is inconsistent across jurisdictions.

The governing rule is destination-based: the rate is set where the buyer receives the item, which is why an order shipped to a different address than your billing address can change the total. The seller collects based on the shipping address unless your state has a sourcing rule that says otherwise. The Federation of Tax Administrators tracks state sales tax rates and the Streamlined Sales Tax Governing Board maintains uniform definitions for categories like "food and food ingredients" — use those when a product's classification is unclear.

Item Taxable? Rate Tax owed
Coffee beans (unprepared food) Varies by state Confirm locally Depends on state rule
Paper towels (tangible goods) Usually yes 8.25% $1.36 on $16.50
Dish soap (tangible goods) Usually yes 8.25% $0.41 on $4.99

For a multistate or international order, look up each destination's rate through the state revenue department's own lookup tool rather than a general rate list, because local jurisdictions add district taxes on top of state rates. Local rates can push a nominal 6% state rate to 9% or more in some metro areas.

Discounts, Coupons, and Promotions Change the Tax Base

The single most common calculation error is applying a coupon to the total after tax. Promotions that reduce the price of goods reduce the taxable amount; promotions that are reimbursement for something else don't. A "$20 off orders over $100" coupon applied to the subtotal shrinks the tax base by $20 times the tax rate. A gift card used as payment doesn't change the subtotal or the tax at all, because it's a payment method, not a price reduction.

Watch for stacking rules. Sellers frequently bar combining a percentage-off code with a free-shipping code, so the "best" combination may be illegal under their terms even though the arithmetic works. Read the offer's exclusions before building the calculation, because a coupon that doesn't apply to sale items changes which items qualify.

BOGO offers need unpacking. "Buy one, get one 50% off" on a $30 item means two for $45, or $22.50 each — not two for $30. If the store applies the discount as a second-line markdown, the tax base is $45, not $60, and the tax owed drops by 25%. Enter the discounted amounts as line totals and let the subtotal reflect them rather than adjusting at the end.

A Worked Multiline Order, Start to Finish

Put the whole method together on a realistic mixed order: a $47.00 jacket, a $22.00 shirt, and a $14.50 pair of socks, shipped to a state with a 7% sales tax that taxes clothing, with $8.95 shipping and a $10-off coupon on orders over $75.

Notice the coupon moved the order below the shipping threshold if the store offered free shipping over $75 — the subtotal before coupon was $83.50, but the discounted subtotal is $73.50, and some sellers test the threshold against the post-discount subtotal. That single ordering choice can cost you the $8.95 shipping. Check the seller's threshold rule in the promo terms before stacking.

The tax base here is $73.50 because this state doesn't tax shipping. In a state that taxes shipping, the tax base becomes $82.45 and tax at 7% is $5.77, raising the total to $88.22. Same goods, same rates, different sourcing rule, 62 cents apart.

Spreadsheet and App Methods for Repeat Calculations

For anything you'll calculate more than twice, build a four-column sheet: item, quantity, unit price, line total. In Excel or Google Sheets, the line total is =B2C2, the subtotal is =SUM(D2:D10), and the grand total applies the multipliers in order: =(SUBTOTAL(1-discount))*(1+taxrate)+shipping. Keep the tax rate in its own cell so you can change jurisdictions without rewriting formulas.

Separate the shipping row from the tax row even if the sheet is only for yourself, because tax on shipping is conditional and a combined row hides whether it was applied. For orders you'll repeat, save a copy with the tax rate and discount blank so you don't accidentally carry forward a stale rate.

Store calculators and spreadsheet templates built by retailers use the same sequence but bury the assumptions. If you use one, verify that its discount lands before tax by checking the intermediate line it displays — many show only the grand total, which makes an ordering error invisible.

Reading the Order Confirmation to Verify Your Figure

The confirmation page is the authoritative record, and it breaks costs into components you can compare against your own calculation line by line. Look for the subtotal, the discount line with its exact amount, shipping and handling, estimated tax, and the grand total. If any component differs from your figure by more than rounding, find the cause before paying — a tax difference usually means the ship-to state differs from what you assumed.

Rounding is a real source of small mismatches. Sellers typically round tax to the cent per line or per order, and the two methods can differ by a cent or two on a large basket. That's not an error; it's a rounding convention. Compare to the nearest cent and stop worrying about pennies.

If the delivered receipt differs from the confirmation, the receipt governs what was actually charged, and you can dispute the difference. Keep the confirmation screenshot until the charge clears, because the displayed total and the charged total should match unless a tax re-rate occurred after shipment.

Common Mistakes That Shift the Total by Real Money

The most expensive mistake is applying a single tax rate across mixed-category items. A basket with food and non-food items taxed at different rates produces a wrong total if you apply one blended rate, and the error grows with basket size.

The second is treating a percentage discount as a flat subtraction. "20% off" on a $84.95 subtotal is $16.99, not $20, and the difference compounds when tax is computed on the discounted base.

Mistake Effect on total Correct approach
One blended tax rate for all items Over- or understates tax Rate per item category
Discount applied after tax Understates tax owed Discount before tax
Flat shipping on a per-item order Understates shipping Use the seller's per-unit rule
Threshold tested pre-discount Wrong side of free-shipping line Read the promo terms
Per-unit price mistaken for pack price Doubles the line total Convert to unit price first

A subtler error is forgetting that some fees — restocking, handling, small-order surcharges — are added by the seller and aren't visible in the listed price. Add a line for them if the seller's checkout lists one; otherwise your calculation will come in low and you won't know why.

FAQ

Does the order of discount and tax actually change the total?

Yes, and the gap is the tax rate times the discount. A $10 discount in an 8% state reduces tax by $0.80 when applied before tax, so discounting after tax costs $0.80 more. Sellers apply discounts before tax on goods, which is the correct sequence; a calculator that does otherwise will read low.

Is shipping taxed in every state?

No. State rules split three ways: some tax delivery charges, some exempt them, and some tax shipping only when it's bundled with taxable goods. The Streamlined Sales Tax Governing Board's delivery-charge matrix lists each state's treatment. The rate also depends on whether the seller is registered in the destination state.

How do I handle a BOGO offer in a line-item total?

Convert the offer to a per-unit cost first. "Buy one, get one 50% off" on a $30 item means the pair costs $45, so each unit is $22.50. Enter $45 as the line total for two units, then let tax apply to that $45. Don't enter two $30 lines and subtract $15 later — that breaks the tax base.

What happens if my basket straddles the free-shipping threshold after a coupon?

Some sellers test the threshold against the subtotal before discounts and some after, and the difference can be the full shipping charge. Check the promotion terms for the word "subtotal" versus "order total" — post-discount orders often fall below the line. If the terms are silent, assume the stricter reading.

Why does my calculated tax differ from the confirmation by a few cents?

Rounding conventions. Sellers round per line or per order, and tax rates with multiple local components can produce a cent-level split. A difference of one or two cents is normal; a difference of dollars means a rate, jurisdiction, or taxability classification was wrong, so verify the ship-to address and item categories.

Can I calculate a total across sellers in one checkout?

Only if the marketplace charges everything at once. Marketplaces often tax and ship per seller, so a cart with three sellers can produce three shipping charges and three tax computations, each with its own destination rule. Add the seller-level totals rather than applying one shipping and tax figure to the combined basket.

Do gift cards or store credit change the taxable amount?

No. A gift card is a payment method, not a price reduction, so the subtotal and tax are computed on the merchandise price and the card pays down the total afterward. Store credit applied as a promotional credit, though, may reduce the price and therefore the tax — read how the seller labels it.

What should I do if the receipt total doesn't match the confirmation?

Screenshot both and compare line by line — subtotal, discount, shipping, tax. If tax differs, the ship-to jurisdiction was likely re-rated. If shipping differs, check whether a weight tier or threshold rule applied. Dispute with the seller's support before the charge clears, citing the confirmation as the agreed price.