How invoice tax is calculated
Tax on an invoice is calculated on the taxable value — the line amount after any discount. With exclusive tax the tax is added on top of your price; with inclusive tax it is already contained in the price and is extracted from it. Discounts must be applied before tax is calculated, otherwise the tax is overstated.
Exclusive tax: added on top
This is the usual B2B arrangement. You quote a price before tax and the tax is added to it.
| Step | Calculation | Amount |
|---|---|---|
| Line amount | 2 × 500.00 | 1,000.00 |
| Taxable value | no discount | 1,000.00 |
| Tax at 18% | 1,000.00 × 0.18 | 180.00 |
| Line total | 1,000.00 + 180.00 | 1,180.00 |
Inclusive tax: extracted from the price
Common in consumer pricing, where the advertised price is what the customer pays. The tax is worked backwards out of the gross amount rather than added to it.
| Step | Calculation | Amount |
|---|---|---|
| Line amount (gross) | 1 × 1,180.00 | 1,180.00 |
| Taxable value | 1,180.00 ÷ 1.18 | 1,000.00 |
| Tax at 18% | 1,180.00 − 1,000.00 | 180.00 |
| Line total | unchanged | 1,180.00 |
Discounts come before tax
Tax is charged on what is actually paid. A 1,000.00 line with a 10% discount and 18% tax is 900.00 taxable, 162.00 tax, 1,062.00 total. Calculating the tax first and then discounting would give 1,062.00 as well in this simple case — but as soon as the discount is invoice-level and spread across lines with different tax rates, the two approaches diverge, and only the discount-first order is defensible.
Multiple taxes on one line
Where a combined rate is split into components — CGST 9% plus SGST 9% — each component is calculated on the same taxable value and shown separately. For inclusive pricing the combined rate is extracted once and then apportioned between the components by their share of the rate, so the components always sum exactly to the tax contained in the price.
Rounding: why invoices fail to add up
If you carry full precision through every calculation and round only the final total, the printed rows can add up to a figure one cent away from the printed total. Customers notice. The fix is to round each amount to the currency's precision as it is produced, then build the totals from those rounded numbers — so the invoice adds up exactly as printed. That is how this generator calculates.
Frequently asked questions
Should tax be calculated before or after a discount?
After. Tax applies to the amount actually payable, so the discount reduces the taxable value first.
How do I show tax if my prices already include it?
Mark the tax as inclusive. The invoice then shows the taxable value and the tax contained in the price separately, while the total stays the price you advertised.