Shopping Cart Total Calculator - Tax, Discount & Shipping

Add up your cart with discount codes, loyalty points, sales tax and shipping. See the order of operations, a worked example and what you save.

Quick Sample Carts:

Cart Items

The Mathematical Order of Operations in E-Commerce Checkout

A common consumer misconception is that sales tax and discounts can be applied in any sequence. In statutory tax accounting (and in major e-commerce platforms like Shopify, Amazon, and WooCommerce), discounts must reduce the taxable transaction subtotal BEFORE sales tax is calculated:

1. Gross Item Subtotal = Σ (Unit Price × Quantity) 2. Promotional Discount = Percentage or Fixed Amount deducted from Subtotal 3. Loyalty Points Credit = Points × Value per Point (capped at remaining subtotal) 4. Net Taxable Subtotal = Subtotal − Promotional Discount − Loyalty Credit 5. Sales Tax = Net Taxable Subtotal × (Local Tax Rate ÷ 100) 6. Final Total = Net Taxable Subtotal + Sales Tax + Shipping Cost

Why this order matters: Applying a 10% discount before tax saves you money on both the items and the sales tax itself! For example, on a $100 cart with 8% tax, discounting first gives tax of $7.20 ($90 × 8%), whereas applying the discount after gross tax would mean paying tax on the full $100 ($8.00).

Worked Example: The $100 Cart Breakdown

Suppose your cart contains 2 shirts at $40.00 each ($80.00) and 1 pair of socks at $20.00, yielding a gross subtotal of $100.00. You apply a 10% coupon code, redeem 500 loyalty points (at $0.01/point = $5.00), your state tax rate is 8.0%, and standard ground shipping is $5.00:

  • Gross Subtotal: (2 × $40.00) + (1 × $20.00) = $100.00
  • 10% Coupon Discount: $100.00 × 0.10 = −$10.00 (Remaining = $90.00)
  • Loyalty Points Credit: 500 × $0.01 = −$5.00 (Net Taxable Base = $85.00)
  • Sales Tax (8%): $85.00 × 0.08 = +$6.80
  • Untaxed Shipping: +$5.00
  • Final Checkout Total: $85.00 + $6.80 + $5.00 = $96.80
  • Total Savings Achieved: $10.00 + $5.00 = $15.00 (15.0% total discount off retail merchandise)

Percentage Off vs. Fixed Amount Discounts: Which Is Better?

Choosing between a percentage coupon (e.g., 15% off) and a flat dollar coupon (e.g., $20 off) depends strictly on your subtotal break-even point:

  • Break-Even Formula: Threshold = Fixed Dollar Amount ÷ Percentage Rate. For a choice between $20 off and 15% off: $20 ÷ 0.15 = $133.33.
  • If your subtotal is UNDER $133.33: The $20 fixed discount gives superior dollar savings (e.g., on an $80 order, $20 off saves 25%).
  • If your subtotal is OVER $133.33: The 15% discount yields higher dollar savings (e.g., on a $200 order, 15% off saves $30.00).
  • Cart Subtotal Cap: Note that fixed discounts cannot exceed the order subtotal (you cannot receive negative cart amounts).

Sales Tax Jurisdictions & Shipping Taxation

Sales tax regulations vary substantially by geographic location and state law. In this calculator, enter your applicable local sales tax rate (e.g., 0% in Delaware, Oregon, New Hampshire, or Montana; 4% to 10.25% in other US states and municipalities). While many e-commerce merchants charge sales tax exclusively on physical goods, certain jurisdictions mandate tax on delivery freight when shipping is deemed non-separable. Check local merchant policy for precise tax boundaries.

Formulas Used

Gross Subtotal

Subtotal = Σ (Item Unit Price × Quantity)

Sum of all line items before coupons, credits, tax or shipping.

Discount Amount

Percentage: Subtotal × (Discount % ÷ 100) | Fixed: min(Discount Value, Subtotal)

Reduction in merchandise price from promotional codes.

Net Taxable Base

Taxable Subtotal = Subtotal − Discount Amount − Loyalty Credit

The statutory adjusted purchase amount subject to government sales tax.

Order Total

Total = Taxable Subtotal + (Taxable Subtotal × Tax Rate) + Shipping

Final charge to your credit card or payment method at checkout.

Variables Explained

Cart Items

List of items with unit price and quantity added to your basket.

Discount Type & Value

Percentage off (e.g., 10%) or fixed cash amount (e.g., $15.00).

Tax Rate (%)

Local, state, or provincial sales tax percentage (defaults to 0%).

Shipping Cost

Delivery fee charged by carrier or retailer.

Loyalty Points & Value

Rewards points balance and dollar value per point (e.g., 500 pts at $0.01 = $5.00).

Important Notes

•

Sales tax rules, exemptions for essential groceries/apparel, and freight taxation vary by country, state, and municipality.

•

This calculator computes standard commercial checkout arithmetic. Always review the merchant's final review screen before completing payment.

Frequently Asked Questions

First calculate the gross subtotal by multiplying each item's price by its quantity and summing them. Next, deduct any discount codes and loyalty credits to determine the net taxable amount. Then multiply that net taxable amount by your sales tax rate. Finally, add the sales tax and shipping cost to find the total.
In nearly all jurisdictions and e-commerce platforms, discounts are applied before sales tax. Sales tax is assessed on the final negotiated price paid for the merchandise, which reduces both your item costs and the amount of sales tax owed.
Multiply the total subtotal of the items by the discount percentage divided by 100. For example, a 15% discount on a $120 shopping cart equals $120 × 0.15 = $18.00 off, leaving a subtotal of $102.00.
Most retail loyalty programs value points at between $0.01 (1 cent) and $0.02 (2 cents) per point. For example, 1,000 points typically redeem for $10.00 to $20.00 in checkout credit. Check your retailer's specific rewards terms.
It depends on local state and country laws. In many US states, shipping is exempt if delivery charges are stated separately on the invoice and the goods are delivered by a common carrier (USPS, FedEx, UPS). In other states, delivery charges are deemed part of the taxable transaction.
List all item prices and quantities, multiply each line, and add them together. As a rule of thumb, multiply the subtotal by 1.10 (to account for roughly 8-10% in combined tax and delivery) to ensure you do not exceed your budgeted cash limit at the checkout counter.
A fixed-amount coupon deducts a flat cash amount (e.g., $10 off) regardless of order size, making it most valuable on smaller purchases. A percentage coupon (e.g., 20% off) scales with the size of your order, providing substantially higher dollar savings on larger baskets.
Minor differences usually stem from item-specific tax exemptions (e.g., unprepared food or medicine taxed at 0%), tax levied on delivery fees, local municipal surcharges, or minimum shipping thresholds applied by individual store checkout engines.