Invoice Calculator
Add up an invoice from its line items (quantity × unit price), a discount, one tax rate, shipping and a deposit. The totals use the same rounding and the same order as our invoice generators, and the invoice calculation formula below is filled in with your numbers.
Invoice calculation formula
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.
With your numbers
Is tax worked out before or after a discount?
The order changes the total. An arithmetic illustration: a subtotal of 1,000.00 with a 10% discount and a 10% tax rate.
| 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 |
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.
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.
Invoice calculator FAQ
How do you calculate an invoice total?
Multiply each line's quantity by its unit price and add the lines to get the subtotal. Subtract any discount, add the tax on the discounted taxable amount, add shipping, and subtract any deposit already paid. As a formula: total = subtotal − discount + tax + shipping − deposit. This calculator rounds each line to 2 decimals, as our invoice generators do, and shows every step with your numbers.
How do I show a deposit and the balance due?
Enter the amount already paid in the deposit field: the result then shows "Deposit Paid" and "Balance Due" instead of a plain total. To print them on an invoice, use one of the generators with a Deposit Paid field: freelance, commercial, consulting, contractor, multi-currency, photographer or VAT. Their PDFs print "Deposit Paid" and then "Balance Due" when a deposit is entered. The home page generator has no deposit line.
Is shipping taxed?
It depends on the state or country where you sell and on what is shipped, so check the rule with your tax authority. The calculator does not decide it for you: tick "Shipping is taxable" and it adds tax on the shipping amount at the same rate; leave it unticked and shipping is added without tax. Our generators have the same switch, labelled "+Tax" next to the shipping amount.
Are my figures sent anywhere?
No. The calculation runs in your browser; the figures you enter are not sent anywhere. The page uses Google Analytics, which records that the calculator was used (an event with the type "invoice_total"), not the amounts you type.
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.