Calculate an invoice total from line items, discounts, tax, shipping, fees, and payments already received.
For a full walkthrough of building and sending invoices, see Creating Invoices. Payment timing is covered in invoice payment terms, and deposits are explained in invoice deposits.
Invoice total = subtotal − discounts + tax + shipping + fees
Balance due = invoice total − payments already received
Tax is calculated after the discount: tax = (subtotal − discounts) × tax rate. To focus on discount math alone, use the Invoice Discount Calculator.