Wrong totals are one of the most common reasons invoices get sent back. Here's how to calculate invoice totals correctly, in the order most businesses use.

1. Calculate each line item

For every product or service, multiply the quantity by the rate:

Line amount = quantity × rate

  • Website design: 1 × $500 = $500
  • Development: 1 × $800 = $800
  • Maintenance: 3 × $100 = $300

2. Add them up for the subtotal

$500 + $800 + $300 = $1,600 subtotal. The subtotal is the value of the goods or services before any discount or tax. Our guide on gross vs net invoice amounts explains the terminology.

3. Apply any discount

A percentage discount is calculated on the subtotal. With a 10% discount:

$1,600 × 10% = $160 discount → $1,600 − $160 = $1,440

Want to discount without hurting your margins? Read how to offer discounts on an invoice without losing money.

4. Calculate tax on the discounted amount

Tax — whether it's VAT, GST or sales tax — is usually charged on the price after discount. With a 15% tax rate:

$1,440 × 15% = $216 tax

Rules vary by country and product, so check what applies to you. See how to calculate tax on an invoice and VAT and GST invoices explained.

5. Add tax to get the total due

$1,440 + $216 = $1,656 total due

Summary of the formula

  • Subtotal = sum of (quantity × rate)
  • Discount = subtotal × discount %
  • Tax = (subtotal − discount) × tax %
  • Total = subtotal − discount + tax

Tips for accurate totals

  • Round each amount to two decimal places.
  • Show the discount and tax as separate lines so the client can see how the total was reached.
  • Keep the currency consistent on every line.
  • Use an invoice generator with automatic calculations, so the subtotal, discount, tax and total are always correct.