Invoice Calculator

Add line items with quantity, unit price and tax rate — get a full invoice breakdown with subtotal, tax, and grand total.

How to calculate an invoice total

An invoice total is built up from individual line items. For each line, the net amount is calculated as quantity × unit price. Tax is then applied to that net amount at the rate you specify — so a line item of 3 units at $50 with 20% tax produces a net of $150 and tax of $30, giving a gross of $180 for that line.

The invoice subtotal is the sum of all line item net amounts. Total tax is the sum of all per-line tax amounts. The grand total is subtotal plus total tax. This approach — calculating and rounding each line independently — ensures every line reconciles exactly: you can check any line by hand and it will always add up.

Each line can carry a different tax rate, which matters when invoicing for a mix of standard-rated and zero-rated items (common in UK VAT, EU VAT, and US sales tax contexts where some goods or services are exempt). Leave the tax rate at 0 for tax-exempt lines.

Worked example

ItemQtyUnit priceTax rateLine total
Consulting (3hrs)3$150.0020%$540.00
Software licence1$200.000%$200.00
Subtotal$650.00
Total tax$90.00
Grand total$740.00

Frequently asked questions

How do I calculate an invoice total?
For each line item, multiply quantity by unit price to get the net amount. Apply the tax rate to that net to get the tax for the line. Add all line nets together for the subtotal, all line taxes for the total tax, and the two together for the grand total.
What is the difference between subtotal and grand total?
The subtotal is the sum of all line item amounts before tax. The grand total is the amount the customer actually pays — subtotal plus total tax.
What is the difference between net and gross?
Net is the amount before tax. Gross is the amount including tax. So a $100 net item with 20% tax has a gross of $120.
Can each line have a different tax rate?
Yes — tax is calculated per line, so you can mix taxable and tax-exempt items on the same invoice. Set the tax rate to 0 for any exempt lines.
Why might my totals differ slightly from adding the raw numbers myself?
Each line's net amount is rounded to the cent first, then tax is calculated from that rounded figure — so every line's net + tax always equals its displayed gross exactly, and the invoice totals are the sum of those already-rounded lines, not a separately-rounded raw total.
What currencies are supported?
Any currency code you enter — USD, EUR, GBP, AUD, and so on. The code is used as a label and does not convert amounts.
What tax rate should I use?
Use the applicable rate for your jurisdiction and the goods or services you are invoicing. Common rates: US sales tax varies by state (0–13%); UK VAT standard rate 20%; EU VAT varies by country and product category (5–27%); Australia GST 10%.
How do I add VAT to an invoice?
Enter your line items, set the tax rate to your applicable VAT rate (e.g. 20% for UK standard rate), and the calculator will compute the VAT amount per line and the total VAT due. The grand total is the VAT-inclusive amount to charge your customer.
Can I use this in my own app?
Yes — every calculator on Stupidly Clever has a matching REST API and MCP tool that runs the same underlying logic.

Related calculators