Tax
How to add GST or VAT to an invoice
A worked example with real numbers: exclusive vs inclusive tax, applying a discount before tax, rounding, and what a compliant tax invoice must show.
By Faiq Ahmad · 8 min read
Short answer
How do I add GST or VAT to an invoice?
Total the line items, subtract any discount, then multiply what is left by the tax rate and add it on. A subtotal of 95,000 with a 5% discount gives a taxable amount of 90,250; GST at 18% is 16,245; the total due is 106,495.
Show the taxable amount, the rate, the tax and the total as separate lines on the invoice, and include your tax registration number. A tax invoice that hides the tax inside one figure is not a valid tax invoice in most countries.
GST, VAT and sales tax are different names for broadly the same mechanism: a percentage added to the value of what you sold, collected by you, and passed to the tax authority. The names differ, the rates differ wildly, and the compliance rules differ — but the arithmetic on the invoice is identical everywhere.
What follows is the calculation worked through with real numbers, including the two places people get it wrong: discounts and tax-inclusive pricing.
The order of operations
Every tax invoice is built in the same sequence:
- Line totals. Quantity × unit rate, for each item.
- Subtotal. The sum of the line totals, before tax.
- Discount. Subtracted from the subtotal, giving the taxable amount.
- Tax. Taxable amount × rate.
- Total due. Taxable amount + tax.
Step 3 sits before step 4 deliberately. Tax applies to the amount the customer actually pays for the goods or services, so a discount reduces the taxable base. Discounting after tax inflates the tax you declare and, in a jurisdiction that checks, creates a discrepancy.
Worked example: 18% GST, tax-exclusive
A freelance designer invoices a client for three items, with a 5% early-payment discount, at an 18% GST rate.
| Line | Qty | Rate | Amount |
|---|---|---|---|
| Website design | 1 | 60,000 | 60,000 |
| Logo and brand mark | 1 | 25,000 | 25,000 |
| Hosting setup (per site) | 2 | 5,000 | 10,000 |
| Calculation | Amount | |
|---|---|---|
| Subtotal | 60,000 + 25,000 + 10,000 | 95,000 |
| Discount (5%) | 95,000 × 0.05 | −4,750 |
| Taxable amount | 95,000 − 4,750 | 90,250 |
| GST @ 18% | 90,250 × 0.18 | 16,245 |
| Total due | 90,250 + 16,245 | 106,495 |
Note what the invoice shows: five figures, each on its own line. A client can check the arithmetic, and an auditor can see exactly how much tax was charged on exactly what base. That transparency is the point of the format.
Tax-inclusive pricing, and how to reverse it
Consumer-facing businesses often quote a price with tax already inside it — a retail price of 11,800 rather than “10,000 plus GST”. The invoice still has to break the tax out, so you work backwards.
The formula is: net = gross ÷ (1 + rate), then tax = gross − net.
| Rate | Gross (inclusive) | Net | Tax |
|---|---|---|---|
| 18% GST | 11,800 | 11,800 ÷ 1.18 = 10,000 | 1,800 |
| 20% VAT | 120.00 | 120 ÷ 1.20 = 100.00 | 20.00 |
| 5% VAT | 525.00 | 525 ÷ 1.05 = 500.00 | 25.00 |
| 17% GST | 1,170.00 | 1,170 ÷ 1.17 = 1,000.00 | 170.00 |
The common mistake is to take 18% ofthe gross figure. On 11,800 that gives 2,124 — wrong by 324, because the 18% was applied to the wrong base. Divide, don't multiply.
Rounding
Round the tax figure once, at the total, rather than rounding each line and summing the rounded values — the second approach drifts and the invoice stops adding up. Round to the smallest unit your currency actually uses: two decimals for USD, EUR and GBP; whole rupees is normal practice for PKR and INR on smaller invoices. Whatever you choose, be consistent across every invoice you issue.
What a compliant tax invoice must show
Requirements differ by country, so confirm yours with your tax authority. This list covers the fields almost every regime asks for:
- The words “Tax Invoice” (required in many countries)
- Your business name, address and tax registration number
- The customer's name and address, and their tax number for B2B sales
- A unique, sequential invoice number with no gaps
- The date of issue, and the date of supply if it differs
- A clear description of each item or service supplied
- The taxable amount, before tax
- The tax rate and the tax amount, shown separately
- The total payable, and the currency
If different lines carry different rates — some standard-rated, some zero-rated or exempt — show the tax per rate band rather than as one blended figure.
Three mistakes worth avoiding
- Charging tax you are not registered to collect. If you are under the registration threshold, issue a plain invoice with no tax line and no tax number. Collecting tax without registration is an offence, not a rounding error.
- Adding tax only at invoice time. If you quoted a number and the client understood it as the final figure, adding tax afterwards will be disputed. Show the tax on the estimate or quotation too.
- Gaps in the invoice numbering. Sequential numbering is a legal requirement in many jurisdictions and the first thing an auditor scans for. Do not delete an invoice — issue a credit note against it.
Doing it in Invoice Spark
Set your rate once in the app and give it the label your country uses — GST, VAT, sales tax or a local equivalent. Apply it to the whole invoice or per line item, add per-item discounts where you need them, and the subtotal, discount, tax and total are calculated and printed as separate lines on the PDF. Your registration number sits in your business profile and appears on every invoice automatically.
This article is general information about invoice arithmetic and formatting, not tax advice. Rates, thresholds and compliance rules differ by country and change; confirm your obligations with your tax authority or a qualified practitioner.
Last updated:
FAQ
GST and VAT questions
- How do I calculate GST on an invoice?
- Add up your line items to get the subtotal, subtract any discount, then multiply the result by the tax rate. At 18% GST, a taxable amount of 90,250 gives 90,250 × 0.18 = 16,245 in tax, and a total due of 106,495. Always apply the discount before the tax, not after.
- What is the difference between tax-exclusive and tax-inclusive pricing?
- Tax-exclusive means your listed price is before tax and the tax is added on top — 10,000 plus 18% becomes 11,800. Tax-inclusive means the tax is already inside the price you quoted, so 11,800 inclusive of 18% contains 10,000 of net value and 1,800 of tax. To extract the tax from an inclusive price, divide by 1 + the rate, then subtract.
- Should I apply a discount before or after tax?
- Before, in almost every jurisdiction. Tax is charged on the amount actually payable for the goods or services, so a discount reduces the taxable base and therefore the tax. Applying tax first and discounting the gross overstates the tax you owe.
- What must a tax invoice show?
- Requirements vary by country, but a compliant tax invoice almost always needs: the words "Tax Invoice", your business name, address and tax registration number, the customer's name and address, a unique sequential invoice number, the date of issue, a description of the goods or services, the taxable amount, the tax rate and tax amount shown separately, and the total payable.
- Can I charge GST if I am not registered?
- No. Charging tax you are not registered to collect is illegal in every jurisdiction that has a registration threshold. If you are below the threshold and not registered, issue a plain invoice with no tax line and no tax number on it.
- Does Invoice Spark calculate GST automatically?
- Yes. Set your rate once, label it GST, VAT or sales tax as your country requires, and apply it to the whole invoice or per line item. Subtotal, discount, tax and total are calculated for you and printed as separate lines on the PDF, which is what a compliant tax invoice needs.
Let the app do the arithmetic.
Set your rate once and every invoice shows subtotal, discount, tax and total correctly. Offline, no account, free for 3 invoices a month.
Free plan · No ads · No account needed · Works offline