Invoice Generator
All guidesInvoice fundamentals

How Invoice Totals Are Calculated

Follow a worked example from quantity and rate through discount, tax, shipping, retention, amount paid, and final balance due.

9 min read · By AllInvoiceGenerator.com Editorial Team · Updated

The calculation order

An invoice total begins with each line's quantity multiplied by its rate. A line discount reduces that line before its tax is calculated. The discounted lines form the subtotal, then document-level adjustments produce the total. Recorded payments reduce the balance due without changing what was originally invoiced.

AllInvoiceGenerator.com uses decimal arithmetic for document calculations instead of relying on binary floating-point shortcuts, and the preview uses the same document values as the editor.

Worked PKR example

This fictional example shows the calculation method; it does not prescribe a tax rate. Two design sessions at PKR 25,000 produce a PKR 50,000 line amount. A 10% discount is PKR 5,000, leaving PKR 45,000 before tax.

  • Quantity × rate: 2 × PKR 25,000 = PKR 50,000.
  • Line discount: 10% of PKR 50,000 = PKR 5,000.
  • Discounted line amount: PKR 50,000 − PKR 5,000 = PKR 45,000.
  • Illustrative tax: 5% of PKR 45,000 = PKR 2,250.
  • Shipping: PKR 1,000. Illustrative total: PKR 48,250.
  • Amount paid: PKR 10,000. Balance due: PKR 38,250.

Discount, tax, shipping, and retention

A percentage discount and a fixed discount are not interchangeable. Verify which method the agreement uses. Tax should be applied to the correct base, which may differ by jurisdiction and transaction. Shipping adds an agreed charge; retention withholds an agreed amount or percentage from the current payable balance.

Do not use the calculator to decide whether a tax or retention rule applies. Enter only a rule you have independently established for the transaction.

Rounding and currency

Keep one currency per invoice and review how minor units are displayed. Rounding can differ when calculated per line versus on an aggregate total, so the commercial or statutory method should be chosen consistently.

The example uses PKR because the generator supports PKR alongside other currencies. Changing the currency label does not convert amounts or retrieve an exchange rate.

Calculation review checklist

Recalculate unusual or high-value invoices independently before sending them. Check quantity, rate, discount basis, tax basis, shipping, retention, recorded payments, currency, and the displayed balance due.

This guide explains the product's calculation sequence and a fictional example. It is not tax, accounting, or financial advice.

Editorial note

This guide is written and reviewed against the behavior of the live AllInvoiceGenerator.com product. Examples use fictional businesses and explain document workflows; they are not legal, accounting, or tax advice.

Create your next document

Build an invoice or quotation with bilingual labels, custom fields, accurate totals, and an A4 PDF.

Open free invoice generator