Clearquire (opens in a new tab) 4 min read
How to calculate discount and tax on an invoice
Work out each line, take the discount, apply tax to what is left, round to the penny, then add shipping. A worked example with the order that keeps totals right.
Invoice totals go wrong in the order of operations. Tax on the full price instead of the discounted one. Rounding at the end instead of per line. Shipping taxed when you meant it not to be. A client's accounts team will notice a penny out.
This is arithmetic, not tax advice. Whether you charge tax, which rate applies, and whether shipping is taxable depend on where you and your client are. Check with your tax authority or an accountant.
The order that works
For each line:
- Line amount = quantity × unit price. Round to the currency's smallest unit: pence for GBP, cents for USD and EUR, whole yen for JPY.
- Discount. A percent discount is taken from the line amount. A fixed discount is the amount you enter, and it cannot be more than the line amount.
- Tax = the line's tax rate × the discounted amount. Round the same way.
Then for the whole invoice:
- Subtotal = the sum of the rounded line amounts.
- Discount total = the sum of the line discounts.
- Tax total = the sum of the rounded line tax figures.
- Grand total = subtotal − discount total + tax total + shipping or other charges.
Tax is applied after the discount, because the client pays tax on what they are actually charged, not on the list price.
A worked example
Three lines in GBP. The 20% rate is only an example.
- Design work. 10 × £45.00 = £450.00. A 10% discount is £45.00, leaving £405.00. Tax is £81.00.
- Hosting setup. 1 × £120.00 = £120.00. A fixed £20.00 discount leaves £100.00. Tax is £20.00.
- Printed proofs. 7 × £13.99 = £97.93. No discount. Tax is £19.59.
The last line is where rounding shows up. 20% of £97.93 is £19.586, which rounds to £19.59.
Then the totals, with £9.50 of courier added after tax:
Subtotal £667.93
Discount total −£65.00
Tax total £120.59
Courier £9.50
Grand total £733.02
Check it: 667.93 − 65.00 = 602.93. Add 120.59 to get 723.52. Add 9.50 to get 733.02.
Why round per line
If you add up unrounded tax and round once at the end, the tax total can differ by a penny from the sum of the tax figures printed on each line. The client adds the lines, gets a different number, and asks why.
Rounding each line, then summing the rounded figures, means every number on the page adds up to the total on the page.
Some tax rules ask for a different method, such as rounding the tax on the invoice total. If yours does, follow the rule.
Discounts: percent or fixed
Use a percent discount when the deal is a rate, such as 10% off for a returning client. Use a fixed discount when the deal is a sum, such as £20 off setup.
Show the discount on the line it applies to. A lower unit price with no explanation looks like a different agreement. A visible discount shows the client what they saved.
Shipping and other charges
Shipping, courier, or a one-off fee often sits outside the line items. Decide whether it is taxed before you add it. If it is taxable where you work, add it as its own line item with a tax rate instead.
Let the browser do the maths
Clearquire (opens in a new tab) uses this exact order. Each line has a quantity, unit price, an optional discount (none, percent, or amount), and an optional tax rate applied to the discounted amount. Each figure is rounded to the currency's minor units. A shipping or other charge is added after tax and is not taxed. The basis is shown beside the totals, so you can check the numbers before you download the PDF.
Press Fill with an example to see a filled invoice and its totals. The PDF is created in your browser, there is no account, and invoice details are not uploaded. More on that in how to create an invoice PDF without an account.
Checklist
- Line amount = quantity × unit price, rounded.
- Discount taken from the line amount, never more than the line.
- Tax on the discounted amount, rounded per line.
- Totals are sums of the rounded line figures.
- Shipping added after tax, or made its own taxed line.
- Every figure on the page adds up to the grand total.
For the rest of what belongs on the invoice, see what to include on a freelance invoice.