Skip to main content
Invoicing Basics

How to Calculate Invoice Totals: Subtotal, Tax, Discount

How to calculate an invoice total step by step: line totals, subtotal, discounts, shipping, tax and balance due, with a worked example and Excel formulas.

By Invoice Creator Editorial Team 7 min read

An invoice total is built in a fixed order: line totals, then the subtotal, then discounts, then extra charges such as shipping, then tax, and finally any deposit deducted to reach the balance due. If you follow that sequence, you can calculate invoice totals that your customer, their accounts payable team and your tax return will all agree with. This guide walks through each step with a fully worked example and the spreadsheet formulas behind it.

The invoice total formula at a glance

Every invoice, whether it bills one hour of consulting or 400 parts, uses the same arithmetic:

  1. Line total = quantity × unit price
  2. Subtotal = sum of all line totals
  3. Net after discount = subtotal − discount
  4. Taxable amount = net after discount + taxable extras (shipping, handling, materials surcharges)
  5. Tax = taxable amount × tax rate (rounded to two decimals)
  6. Invoice total = taxable amount + tax + any non-taxable charges
  7. Balance due = invoice total − deposits or payments already received

The order matters because tax is calculated on what the customer actually pays for the taxable supply. Apply the discount after tax and you will overcharge tax; add shipping after tax when it should be taxed and you will undercharge it.

Worked example: calculating an invoice total step by step

A small design studio bills a client for a logo, business cards and five website pages. It gives the client a 10% loyalty discount, charges $15.00 to ship the printed cards, applies an 8% sales tax to the whole taxable amount (assume shipping is taxable in this state) and has already received a $300.00 deposit.

Step 1: Calculate each line total

DescriptionQtyUnit priceLine total
Logo design, 3 concepts + 2 revision rounds1$450.00$450.00
Business cards, 350gsm matte, double-sided500$0.18$90.00
Website page design (Home, About, Services, Contact, Blog)5$120.00$600.00

The math: 1 × 450.00 = 450.00; 500 × 0.18 = 90.00; 5 × 120.00 = 600.00. If you are unsure how to label quantities like "500 cards" versus "1 box", our guide to units of measure on invoices explains how to keep quantity and unit price consistent.

Step 2: Add the lines to get the subtotal

450.00 + 90.00 + 600.00 = $1,140.00.

Step 3: Apply the discount

10% of 1,140.00 = 114.00, so the net after discount is 1,140.00 − 114.00 = $1,026.00. Show the discount as a negative line or a separate row under the subtotal so the customer sees exactly what they saved. Our article on how to show a discount on an invoice covers percentage, fixed and line-level discounts.

Step 4: Add taxable extras

Add the $15.00 shipping charge: 1,026.00 + 15.00 = $1,041.00 taxable amount. Whether shipping is taxable depends on where you sell, so treat it as its own line. The details are in our guide to shipping and handling charges on invoices.

Step 5: Calculate tax

1,041.00 × 8% = 83.28. Tax = $83.28. Here the result happens to land on whole cents; when it does not, round to two decimals using a consistent rule. Our article on invoice rounding rules explains line-level versus total-level rounding.

Step 6: Calculate the invoice total

1,041.00 + 83.28 = $1,124.28.

Step 7: Deduct payments already received

1,124.28 − 300.00 deposit = $824.28 balance due.

The bottom of the finished invoice looks like this:

Subtotal$1,140.00
Discount (10%)−$114.00
Shipping$15.00
Taxable amount$1,041.00
Sales tax (8%)$83.28
Total$1,124.28
Less deposit received 2 Nov 2026−$300.00
Balance due$824.28

Labelling the deposit with its date is a small detail that prevents a lot of "did you get my payment?" emails. If customers regularly pay in instalments, see how to lay out a partial payment invoice with amount paid and balance due.

Tax-exclusive vs tax-inclusive pricing

The example above uses tax-exclusive prices: you quote a price and add tax on top. That is the norm in business-to-business invoicing and in the US.

Many retailers and consumer-facing businesses in the UK, EU, Australia, New Zealand and India quote tax-inclusive prices instead. In that case the total is already known and you work backwards to find the tax:

  • Tax = inclusive price × rate ÷ (100 + rate)
  • Net price = inclusive price ÷ (1 + rate/100)

Example at 20% VAT: a $240.00 inclusive price contains 240 × 20 ÷ 120 = $40.00 VAT, and the net price is 240 ÷ 1.2 = $200.00. Do not take 20% of 240 (that gives 48.00, which is wrong). The same back-calculation applies to GST, explained with country examples in our guide on how to calculate GST and remove it from a price.

Discounts: which ones reduce the taxable amount?

Not every discount is treated the same way, which is why the invoice total calculation sometimes trips people up.

  • Trade or volume discounts given on the invoice normally reduce the taxable amount. Tax is charged on the discounted price.
  • Line-level discounts (for example 15% off one product) work the same way, but apply only to that line before the subtotal.
  • Early payment (settlement) discounts depend on whether the customer pays early, so they are usually shown as a term rather than deducted up front. How tax is handled varies by country; the mechanics are explained in our guide to early payment discounts like 2/10 Net 30.
  • Coupons in US retail can differ by state: a store's own discount usually reduces the taxable price, while some states tax the pre-coupon price when a manufacturer reimburses the store.

How to calculate invoice totals in Excel or Google Sheets

If you build your own invoice in a spreadsheet, set up the formulas once and lock them. Assuming quantities in column C, unit prices in column D and line totals in column E (rows 2 to 10):

CellPurposeFormula
E2Line total=C2*D2 (copy down to E10)
E11Subtotal=SUM(E2:E10)
E12Discount 10%=ROUND(E11*10%,2)
E13Shipping15.00 (typed)
E14Taxable amount=E11-E12+E13
E15Tax 8%=ROUND(E14*8%,2)
E16Total=E14+E15
E17Deposit received300.00 (typed)
E18Balance due=E16-E17

The ROUND functions matter. Without them, the sheet may store 83.2800001 or 0.555 behind a two-decimal display, and the printed figures stop adding up. For a full template build, see how to make an invoice in Excel with formulas. If you only need the tax figure, the sales tax calculator gives it instantly.

Invoices with more than one tax rate

Some invoices mix items taxed at different rates, for example standard-rated goods and zero-rated books, or Indian goods at 5% and 18% GST. In that case:

  1. Group the lines by tax rate.
  2. Calculate a subtotal for each group (after any discount allocated to that group).
  3. Calculate tax separately for each group.
  4. Show each rate and its tax amount in the totals block, then add everything for the grand total.

Example: $500.00 of items at 20% and $200.00 at 0%. Tax = 500 × 20% = 100.00 plus 200 × 0% = 0.00. Total = 500 + 200 + 100 = $800.00. Spreading an invoice-wide discount across groups is done in proportion to each group's value: a $70 discount on that invoice would reduce the 20% group by $50 and the 0% group by $20.

Common mistakes when calculating an invoice total

  • Discounting after tax. Taking 10% off the tax-inclusive total also discounts the tax, so the tax line no longer matches the taxable amount.
  • Taxing non-taxable items. Exempt services, reimbursed expenses passed through at cost, or zero-rated exports should not be in the taxable amount.
  • Mixing inclusive and exclusive prices on the same invoice. Pick one basis and state it, for example "All prices exclude VAT".
  • Forgetting the deposit. If the customer paid 30% up front and the invoice still shows the full amount as due, you invite an overpayment or a dispute.
  • Unit price and quantity that do not multiply. A line showing 3 × $33.33 = $100.00 will be queried. Use 3 × $33.33 = $99.99, or bill 1 × $100.00 as a package.
  • Currency confusion. State the currency next to the total, especially when invoicing internationally.

The UK government's guidance on what an invoice must include lists the amounts charged, any VAT and the total amount owed as separate items, which is a good rule of thumb anywhere: show the building blocks, not just the final figure.

Quick checklist before you send

  • Every line total equals quantity × unit price.
  • The subtotal equals the sum of the lines.
  • Discount and extra charges are labelled and shown separately.
  • Tax is calculated on the correct taxable amount and the rate is printed.
  • Deposits are deducted with their date, and the balance due is clear.
  • The currency and due date appear next to the amount owed.

If you would rather not build formulas at all, our free invoice generator calculates line totals, discounts, tax and the balance due automatically as you type. There is no sign-up, and you can download the finished invoice as a PDF in a couple of minutes.

Frequently asked questions

What is the correct order to calculate an invoice total?

Work from the lines down. Multiply quantity by unit price for each line, add the lines to get the subtotal, subtract any discount, add taxable extras such as shipping, calculate tax on the resulting taxable amount, then add the tax to get the invoice total. Finally subtract any deposits or payments already received to show the balance due. Doing the steps in this order keeps the tax figure correct and easy to audit.

Is tax calculated before or after a discount?

For an ordinary trade discount that the customer receives on the invoice, tax is normally calculated after the discount, on the reduced price the customer actually pays. Some discounts are treated differently, for example manufacturer coupons in certain US states or settlement discounts that depend on paying early. If you are unsure how your tax authority treats a particular discount, check its guidance or ask an accountant.

What is the difference between subtotal and total on an invoice?

The subtotal is the sum of all line items before discounts, shipping and tax are applied. The total is the final amount the customer owes for the invoice after those adjustments. If the customer has already paid a deposit, many invoices add a third figure, the balance due, which is the total minus payments received. Keeping all three visible helps the customer check your math quickly.

Should shipping be included in the taxable amount?

It depends on the jurisdiction. In the UK, delivery that is part of the contract follows the VAT treatment of the goods, so it is usually taxed at the same rate. In the US, some states tax shipping charges and others do not, and the answer can change if shipping is bundled with handling. Show shipping as its own line so you can apply the right rule and the customer can see it clearly.

How do I calculate an invoice total in Excel?

Put quantity in column C and unit price in column D, then use =C2*D2 for each line total. Use =SUM(E2:E10) for the subtotal, =E11*10% for a 10 percent discount, =E11-E12+E13 for the taxable amount including shipping, =ROUND(E14*8%,2) for 8 percent tax and =E14+E15 for the total. Wrapping tax in ROUND avoids hidden decimals that make totals look one cent off.

Why does my invoice total look one cent off?

Usually because of rounding. If you round tax on each line and then add the lines, the result can differ by a cent from calculating tax once on the subtotal. Spreadsheets can also hide extra decimals behind a two-decimal display. Choose one method, apply it consistently, and round the tax amount to two decimals before adding it to the total so the printed figures always add up.

IC

Invoice Creator Editorial Team

Guides on invoicing, cash flow and small-business finance from Invoice Creator, operated by Next Software Development Company. Content is reviewed for accuracy against the fields our own invoice generator produces.

Try the invoice generator

Related reading