How to build an auto-calculating invoice in Excel

You will build a reusable invoice in Excel that fills in client details, product prices, due dates, totals and tax from a few dropdowns. It suits freelancers, consultants and small business owners who want clean invoices without paid software. You need Excel 365 or any version that has XLOOKUP.

YouTube video: This FREE Invoice Template Auto-Calculates Everything | Excel Tutorial

Caption availability is unknown. Check the CC control in the YouTube player.

Video length
13 min 31 s
Time to do it
30 minutes
Difficulty
Medium
Steps
9

What you need

Steps

  1. Open a new workbook and add three sheets: Invoice, Clients and Products. In row 1 of the Clients sheet type Name, Address, Email and Payment Terms, then fill in a few rows.

  2. On the Invoice sheet, select the client name cell and open Data then Data Validation. Pick List, point the source at your Clients name column, and tick the in-cell dropdown.

  3. Pull the other client details with =XLOOKUP($B$4,Clients!$A:$A,Clients!$B:$B). Copy it across and change the return column for address, email and payment terms.

  4. Add a product dropdown to each item row the same way. Use XLOOKUP against the Products list to fill the unit price, then multiply by quantity: =D10*E10.

  5. Set the due date with =InvoiceDate+Terms, where Terms comes from the client row. Store Net 15 and Net 30 as plain numbers, 15 and 30, so the addition works.

  6. Add the subtotal with =SUM(F10:F19). Put the discount percent in its own cell and use =Subtotal*DiscountPct, then tax with =(Subtotal-Discount)*TaxRate.

  7. Make the grand total =Subtotal-Discount+Tax. Format every money cell as Currency with two decimals so the invoice looks clean when you export it to PDF.

  8. Build the status cell with a nested IF that shows Overdue when today is past the due date and the balance is unpaid, otherwise Paid, Unpaid or Partial.

  9. Save the finished file as an Excel template (.xltx) so each new invoice opens as a fresh copy. Run one test invoice with dummy data to check every formula.

Tips and common mistakes

Use absolute references like $B$4 so copied formulas keep pointing at the same cell.

Turn the Clients and Products ranges into Excel Tables so XLOOKUP picks up new rows automatically.

If XLOOKUP returns #N/A, the name in the dropdown does not match the list exactly. Check for trailing spaces.

Keep the tax rate and payment terms on a separate Setup sheet so you change them in one place.

Questions

Why does my invoice show #N/A after I pick a client?

The lookup value must match the Clients list exactly. An extra space or a different spelling breaks XLOOKUP.

Can I add more line items?

Yes. Insert rows above the subtotal row so the SUM range grows, or convert the item range to a Table first.

Does this work in Google Sheets?

Most of it does, but XLOOKUP support is newer there. Use VLOOKUP or INDEX with MATCH if your version lacks it.

The notes are drafted automatically from video details and general task knowledge. How the guide was prepared

Report a correction

More in Money & Office

See all