A unique invoice number is a sequential identifier assigned to each invoice a business issues, used to track payments, link records, and keep tax filings tidy. The simplest Excel pattern is to put =COUNT($A$1:A1)+1 in the first invoice cell and drag it down so every new row inherits the next number automatically. That works on a clean sheet, but it collapses the moment you delete a row, sort the list, or paste new data above the existing entries, because COUNT keeps counting non-empty cells rather than tracking true invoice order. For anyone who bills clients regularly, that fragility is the main reason people look for a more reliable way to generate invoice numbers than a spreadsheet column.
Excel can certainly produce sequential invoice numbers with a few different formulas, and this article walks through the typical approaches, explains exactly where each one breaks, and then shows how the Invoice Generator handles the same task in a way that does not depend on row order, formulas, or a macro-enabled workbook.

How Excel Users Try to Auto-Number Invoices
There are three common Excel approaches to invoice numbering, and each has a specific failure mode worth understanding before deciding whether to keep the workflow in a spreadsheet.
The COUNT formula approach
The most popular method is to put a running counter in column A and increment it per row. The classic patterns are:
- =COUNT($A$1:A1)+1 in cell A2, then dragged down to A3, A4, and so on.
- =ROW()-1 when there is exactly one header row, which returns the row number minus one as the invoice number.
- =COUNTA($A$1:A1)+1 to count non-empty rows in column A and use that as the next number, ignoring blanks.
These formulas look tidy but rely on the assumption that rows are never deleted, never sorted, and never have invoice numbers inserted out of order. The moment you insert a new row in the middle of the sheet, the row references shift and the numbers either repeat or skip. The same happens if you filter the sheet and copy-paste, because Excel recalculates based on position rather than history.
The manual approach
Many small businesses skip formulas entirely and type each invoice number by hand, starting at 1001 or 0001 and incrementing by one. This is reliable but easy to mess up: a duplicate number from a copy-paste slip, a forgotten increment, or a typo means two invoices share the same identifier and your accounting breaks at month-end.
The VBA macro approach
More technical users add a small VBA snippet that increments a stored value each time a new row is created or a button is clicked. This works inside that one workbook, but the macro only runs in files that have macros enabled, breaks when the sheet is shared with someone whose security settings block macros, and does not survive copying data into another workbook. It also requires every recipient to enable macros, a step most modern security guides recommend against.
Generate an Invoice Number With the Invoice Generator
The browser-based Invoice Generator sidesteps every one of those failure modes. The invoice number is a simple text field at the top of the form, defaulting to INV-001, that you change once per invoice. There is no formula to maintain, no row position to protect, and no macro to enable. Here is the full workflow.
- Open the Invoice Generator in your browser and fill in the From section with your name or company and address.
- Fill in the Bill To section with your client's name and address.
- Set the Invoice number field to whatever your numbering scheme requires, such as INV-001, 2026-014, ACME-0427, or any other format you prefer.
- Pick the Issue date and Due date using the date pickers, then choose the Currency symbol that matches how you bill: US dollar ($), British pound (£), euro (€), or yen (¥).
- Add a line item for each product or service by typing a description, the quantity (whole numbers such as 3 or decimals such as 1.5 hours both work), and the unit price. Click Add item to insert more rows or the remove button to delete one.
- Enter the Tax rate as a percentage and an optional flat Discount amount. Watch the subtotal, tax, discount, and total update instantly in the live preview on the right.
- Add any Notes you want at the bottom, such as payment terms, bank details, or a thank-you line.
- Click Download PDF to save a clean, print-ready invoice. The PDF is generated locally in your browser with JavaScript, so the file never uploads to a server and carries no watermark.
Because every calculation and the final PDF are produced on your own device, the invoice number you type and the totals attached to it stay private. The tool also keeps working offline once the page has loaded, which is useful when you are billing a client from a café, a client site, or anywhere with patchy internet.
Comparing Excel Methods and the Invoice Generator
The table below lines up the four common ways to assign an invoice number, scored against the things that actually matter when you bill a client: whether the next number is automatic, whether totals stay accurate, and what happens when the data moves.
| Method | Auto-increments? | Handles inserts or deletes? | Totals stay exact? | Output |
|---|---|---|---|---|
| =COUNT($A$1:A1)+1 in Excel | Yes, while rows stay in order | No, numbers shift or repeat | Only if SUM formulas stay in sync | Spreadsheet cell, no PDF |
| Manual numbering in Excel | No, typed by hand each time | Yes, but duplicates are easy | Only if SUM formulas stay in sync | Spreadsheet cell, no PDF |
| VBA macro in Excel | Yes, when macros are enabled | Yes, but only inside that workbook | Yes, if written carefully | Spreadsheet, optional macro PDF |
| Invoice Generator in browser | Set manually per invoice | Yes, each invoice is a fresh document | Yes, math runs in integer cents, total never goes negative | Print-ready PDF, no watermark, no upload |
The trade-off is clear: Excel formulas auto-increment, but only as long as nothing moves. The Invoice Generator makes you type each number, which takes about a second, but in exchange it gives you a finished PDF with totals that are guaranteed to add up to the cent.
Why the Number Alone Is Not the Whole Invoice
An invoice number without a date, a client name, a line-item breakdown, and a tax calculation is just a label. Excel handles all of those, but the formulas and references that connect them tend to drift the moment the sheet grows past a dozen rows. The Invoice Generator keeps every line connected by re-running the math in real time as you type, so when you change a unit price the subtotal, tax, and total all move with it instantly.
To see the math in action, consider a single consulting line: 5 hours × $80 = $400. With an 8.5% tax rate, the tax line becomes $400 × 0.085 = $34.00. Subtracting a flat $20 discount gives a final total of $400 + $34.00 − $20 = $414.00. The exact figures for your own invoice, including any number of line items, are produced the same way inside the tool, where you type the numbers and the total appears. The math is done in integer cents rather than floating-point dollars, which avoids the off-by-a-cent rounding that often plagues spreadsheets that handle currency as plain decimals.
Going From Excel Sheet to a Print-Ready PDF
For many freelancers, the last step of the Excel workflow is the slowest: print to PDF, format the columns, make sure the header repeats on page two, attach it to an email, and double-check the totals did not move during the layout change. The Invoice Generator collapses those steps into one click. The PDF it downloads already has a bold INVOICE heading, your From and Bill To blocks, the invoice number and dates, an itemized table with Description, Qty, Unit Price, and Amount columns, and a Subtotal, Tax, and Total summary in the lower right, plus any notes you added at the bottom.
Long item lists flow onto additional pages automatically, so a 30-line invoice does not clip its last few rows. Because the PDF is generated locally, it keeps working without a network connection after the page has loaded. For businesses that want a fuller billing workflow beyond a single invoice, the guide How to Generate an Invoice for Small Business covers how to chain multiple invoices together with consistent numbering.
Keeping Invoice Numbers Sequential Across Batches
Whether the numbers live in Excel or in the Invoice Generator, the rule is the same: never reuse a number, never skip one, and keep the format consistent. A practical numbering scheme is YEAR-SEQUENCE (for example, 2026-001, 2026-002), so each year starts at zero and a quick glance tells you how old an unpaid invoice is. If you bill in batches, say ten invoices on the last working day of each month, write the numbers down before you start or keep a small text file as a counter. The Invoice Generator has no memory of past numbers, so it is on you to assign the next value, but doing it once per batch instead of once per row removes the most common cause of duplicate numbers.
For a paper trail, name each downloaded PDF using the invoice number itself (for example, 2026-014-acme.pdf) and store the files in a single folder per year. That folder becomes your invoice register, and you can hand it to an accountant at tax time without rebuilding anything from a spreadsheet.