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.

Example figures are filled in: replace them with your own.

Line items
A fixed discount is capped at the subtotal.
Leave at 0 if you do not charge tax. It applies to the lines ticked "Taxed", after the discount.
When above 0, the result shows "Deposit Paid" and "Balance Due".

The totals update as you type.

Your invoice totals

    Subtotal
    —
    Discount
    —
    Tax
    —
    Shipping
    —
    Total
    —

    Invoice calculation formula

    These are the steps the calculator follows, in order. Each amount is rounded to 2 decimals (cents).

    1. Line total = quantity × unit price, rounded to 2 decimals.
    2. Subtotal = the sum of the line totals.
    3. Discount = subtotal × discount rate, or the fixed amount (never more than the subtotal).
    4. Tax = (taxed lines − their share of the discount) × tax rate, rounded. Tax on shipping is added only when "Shipping is taxable" is ticked.
    5. 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.

      Tax after the discount compared with tax before the discount (illustration)
      StepTax after the discountTax before the discount
      Subtotal1,000.001,000.00
      Discount (10%)−100.00−100.00
      Tax (10%)+90.00 (10% of 900.00)+100.00 (10% of 1,000.00)
      Total990.001,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.

      Turn the result into an invoice

      No deposit? Use the free invoice generator on our home page. Its editor starts with sample content to replace: "Your Company Name" and a sample address, two sample line items, two sample payment methods, a "Tax" line at 0% and the terms "Payment is due within 30 days." Enter the same quantities, prices, discount, tax rate and shipping as here, with every line ticked "Taxed" (the home editor taxes all lines), and the PDF shows the same totals; its last line is "Total".

      Deposit already paid? The home page editor has no deposit line. Use the freelance invoice generator: enter the amount in its Deposit Paid field and the PDF prints "Deposit Paid" and then "Balance Due". The same field is in the commercial, consulting, contractor, multi-currency, photographer and VAT generators.

      The generators are free and unmetered for normal use; an anti-abuse cap of 20 PDFs per device per day (200 per IP) applies, well above ordinary use, and blank template file downloads are not metered. A one-line "Created free with myinvoicetemplate.com" credit is switched on by default and one free checkbox in the settings turns it off. Your draft is stored in your own browser on this device, so download and keep the PDF you need.

      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.