Invoice Calculator
Invoice calculation formula
With your numbers
Is tax worked out before or after a discount?
| Step | Tax after the discount | Tax before the discount |
|---|---|---|
| Subtotal | 1,000.00 | 1,000.00 |
| Discount (10%) | −100.00 | −100.00 |
| Tax (10%) | +90.00 (10% of 900.00) | +100.00 (10% of 1,000.00) |
| Total | 990.00 | 1,000.00 |
About this page
These are the steps the calculator follows, in order. Each amount is rounded to 2 decimals (cents).
- Line total = quantity × unit price, rounded to 2 decimals.
- Subtotal = the sum of the line totals.
- Discount = subtotal × discount rate, or the fixed amount (never more than the subtotal).
- Tax = (taxed lines − their share of the discount) × tax rate, rounded. Tax on shipping is added only when "Shipping is taxable" is ticked.
- Balance = subtotal − discount + tax + shipping − deposit.
The order changes the total. An arithmetic illustration: a subtotal of 1,000.00 with a 10% discount and a 10% tax rate.
This calculator and all our invoice generators work out tax on the amount after the discount. Which order applies to your sale is set by the tax rules where you sell, not by the invoice. See the VAT & GST invoicing guide, or use the VAT calculator to convert a single amount between net and gross.
This calculator does arithmetic only. It does not decide which tax rate applies, whether shipping or a discount is taxable, or what an invoice must show where you sell. Check those with your tax authority or a qualified adviser.
How rounding works here
Each line total is rounded to 2 decimals before the lines are added, and the discount, the tax and the final total are each rounded to 2 decimals, the same way our invoice generators round. A total can therefore differ by a cent from a calculation that rounds only at the end.
Tax authorities can set their own rounding rules. In the United Kingdom, HMRC's VAT Notice 700
(para 17.5) says: You may round down the total VAT payable on all goods and services shown on a VAT
invoice to a whole penny. You can ignore any fraction of a penny.
HMRC adds that this concession is
designed for invoice traders and, as a general rule, is not appropriate to retailers, who should read
paragraph 17.6. Source:
HMRC VAT Notice 700, checked September 25, 2026.
This calculator does not round tax down; it rounds to the nearest cent.
The Excel file on our blank invoice template page multiplies quantity × unit price without rounding each line, rounds only the tax to 2 decimals, and has no discount, shipping or deposit rows, so its total can differ from the result here.