
How to Create a Legal Invoice in Excel (Time Entries + Matter Codes)
Learn how to create a legal invoice in Excel with a time-entry log, matter code lookup, hours-times-rate formulas, and a separate costs section — step by step, from blank sheet to client-ready PDF.
Knowing how to create a legal invoice in excel means building four working pieces: a header block, a time-entry log with hours-times-rate formulas, a matter code reference, and a costs section that stays separate from fees. None of that is complicated on its own — the trick is wiring the pieces together so the math updates itself as you add rows. Hub: Legal Invoice Template Excel: Bill Matters, Time Entries, and Client Fees.
Key takeaway: Build the time-entry log as an Excel Table with a rate lookup, keep costs on a separate block, and let the invoice summary pull totals with formulas — never type a fee or cost total by hand.
Hub: legal invoice template excel
Before you type a single header
Decide three things first, on paper or in a notes cell: your matter-code format, whether hours round to the nearest tenth or to six-minute increments, and whether costs get billed at actual amount or with a stated markup. Building the sheet before deciding these leads to inconsistent invoices later.
Step-by-step build
Build a legal invoice workbook from scratch
- Header block — Matter number/code, matter name, client name and address, invoice number, statement period, firm name and payment terms.
- Timekeeper/rate table — Name, role, hourly rate, on its own small block or sheet.
- Time-entry log — Columns: Date, Timekeeper, Matter code, Task description, Hours, Rate, Amount. Set Rate with a lookup formula (
VLOOKUP/XLOOKUPagainst the timekeeper table) and Amount as=Hours*Rate. - Convert the log to a Table (Ctrl+T) so new rows extend formulas automatically.
- Fees subtotal —
=SUBTOTAL(109, Amount column)so filtered views still total correctly. - Costs section — Date, Description, Amount — a separate small table, summed independently.
- Retainer/trust box (if used) — Opening balance, amount applied this invoice, closing balance.
- Invoice summary — Fees subtotal + Costs subtotal (− retainer applied, if relevant) = Amount due.
- Format for the client — currency formatting, freeze the header row, hide helper columns (like raw lookup keys) before exporting to PDF.
Formula cheat sheet
| Cell purpose | Example formula | Notes |
|---|---|---|
| Rate lookup | =XLOOKUP(B2,Timekeepers[Name],Timekeepers[Rate]) | Pulls rate from the rate table by name |
| Line amount | =E2*F2 | Hours × Rate |
| Fees subtotal | =SUBTOTAL(109,TimeLog[Amount]) | Stays correct when filtered |
| Costs subtotal | =SUM(Costs[Amount]) | Separate from fees |
| Amount due | =FeesSubtotal+CostsSubtotal-RetainerApplied | Adjust if retainer is tracked separately |
Matter codes: reference, don't retype
Add a Matter code column to the time-entry log and reference a short Matters lookup sheet (matter code, matter name, client, status) rather than typing the full matter name on every row. This makes filtering for a single-matter statement — or a multi-matter client statement — a two-click job instead of a manual sort.
Warning: Do not hardcode a rate or a matter name directly into a formula. If either changes, every entry using that hardcoded value will be wrong and invisible to a normal formula audit.
Common build mistakes
Mistakes that break a DIY legal invoice
| Mistake | Why it hurts | Fix |
|---|---|---|
| Free-text hours ("about 2 hrs") | Cannot multiply by rate | Use decimal hours (2.0, 2.5) |
| One "Amount" column for fees and costs | Client cannot verify either | Separate fees and costs blocks |
| Rate typed per row, not looked up | Rate changes miss old entries | Lookup formula against a rate table |
| No matter code | Cannot filter or audit by case | Add a matter code column + lookup sheet |
| SUM instead of SUBTOTAL for fees | Filtered totals go wrong | Use SUBTOTAL(109, …) for filter-safe totals |
When DIY stops being worth it
Building this sheet once is a reasonable afternoon project. Rebuilding it for every new client, or discovering after month three that your rate lookups were hardcoded, is where a structured workbook starts paying for itself. If you would rather start from a working version, the Billing Invoice for Legal Services template ships the header block, timekeeper table, time-entry log, and costs section already wired — one-time purchase, instant download.
For a checklist of what to verify in a free download instead of building from scratch, see Free Legal Invoice Template Excel. For daily time-capture habits that make this log easy to keep current, see Attorney Billing Template Excel.
[PRO_CON]
Build it yourself
- Pros: free; full control over layout and conventions
- Cons: an afternoon of setup; easy to hardcode something you regret later
Start from a structured workbook
- Pros: formulas and matter fields already correct
- Cons: paid workbook (price on product page)
Product highlight: The single most common DIY legal-invoice bug is a rate typed directly into the Amount formula instead of pulled from a rate table — invisible until the firm raises rates and half the entries quietly stay at the old number.
Extra billing notes worth keeping
Keep a short "billing conventions" note inside the workbook — even one sheet tab — so a new paralegal or a covering associate does not guess whether hours round up, round to the nearest tenth, or round down at the six-minute mark. The same note should say whether costs are billed at actual receipt amount or at a small handling markup, since firm policy and some state bar guidance on cost billing can differ from firm to firm.
If a client asks for a breakdown mid-matter, you should be able to filter the time-entry log by matter code and date range and hand over a partial statement in minutes, not re-build the invoice from memory. That single capability is often the real difference between a workbook that survives client audits and one that generates a dispute call weeks later.
Handling rate changes without breaking old invoices
Rates change — a paralegal is promoted, an associate's hourly rate goes up at the new fiscal year, or a firm adjusts pricing for a practice area. When that happens, never edit the rate table in a way that silently changes the amount on invoices you already sent. Instead, keep prior invoices as flattened copies (values, not live formulas) once they are finalized, and only let the live rate table affect new, unbilled time entries going forward.
A simple habit that prevents this problem: once an invoice is sent, save a static copy (PDF or a values-only worksheet snapshot) before touching the rate table again. That way a rate correction next quarter cannot retroactively change what a client was already billed and already paid.
A short note on trust and retainer accounting
Trust and retainer accounting (IOLTA and similar client-fund rules in many jurisdictions) carries real record-keeping obligations that a spreadsheet alone does not automatically satisfy. A well-built Excel workbook can display a retainer's opening balance, the amount applied on a given invoice, and the balance remaining — and that visibility is genuinely useful to both the firm and the client. It is not, by itself, a substitute for your bar's specific trust-accounting requirements or for dedicated trust-accounting software once a practice's volume or jurisdictional rules call for it. When in doubt, confirm with your bar association or an accountant familiar with legal trust rules in your state.
Disclosure
PlanoNest sells this template. Links to PlanoNest products and collections point to our own digital template shop.
Frequently Asked Questions
What is the Excel formula for a legal invoice line amount?
Typically hours multiplied by rate, for example =E2*F2 when E is Hours and F is Rate. Pull the rate from a timekeeper rate table with a lookup formula rather than typing it per row.
How do I keep fees and costs separate in the same workbook?
Use two separate small tables — one for time entries (fees) and one for costs/disbursements — each with its own subtotal, and combine only at the final "amount due" line.
Should I use SUM or SUBTOTAL for the fees total?
Use SUBTOTAL(109, …) so the total stays correct if you ever filter the time-entry log by matter or date range. Plain SUM will silently include hidden/filtered rows.
Related reading
- Invoice templates collection
- Billing Invoice for Legal Services template
- Legal Invoice Template Excel: Bill Matters, Time Entries, and Client Fees
- Attorney Invoice Template Excel: Fees, Costs, and Matter Detail Clients Expect
- Law Firm Invoice Template: Matter Codes, Fee Earners, and Client-Ready Statements
- Free Legal Invoice Template Excel: What to Verify Before You Bill a Client
- Attorney Billing Template Excel: Track Time Entries by Matter Code

