DEV Community

Aan Chen
Aan Chen

Posted on

Your client paid you less than the invoice. Here's where the money went (and how to get it back)

If you freelance for companies in India, Indonesia, the Philippines, Spain, most of Latin America, parts of Africa, or you do construction work in the UK, you have probably had this moment: you invoice 2,000, and 1,800 lands in your account. No dispute, no late fee, no explanation.

The missing 200 is withholding tax (also called tax deducted at source, retención, PPh, TDS, CIS, or in the US "backup withholding"). Your client was legally required to keep part of your fee and pay it to the tax office in your name. It is not a cost — it is a prepayment of your own income tax. But it only counts as a prepayment if you can prove it. Most freelancers can't, so they pay the tax twice.

This post is the bookkeeping system I use to make sure that never happens, plus the spreadsheet logic so you can build it yourself.

1. Three numbers per invoice, not one

The core mistake is tracking only the invoice total. Every invoice actually has three amounts you care about:

Amount What it is Who it belongs to
Pre-tax fee What you charge for the work You (income)
Sales tax / VAT / GST Added on top if you are registered The tax office (you are just collecting it)
Withholding Deducted by the client You, but parked at the tax office until you file

So the cash you should expect is:

net cash = fee + sales tax − withholding
Enter fullscreen mode Exit fullscreen mode

In a spreadsheet, with the fee in F, withholding rate in H and the sales-tax toggle in Settings:

I  (withheld)  = F * H
J  (sales tax) = IF(Settings!B10="YES", F * Settings!B11, 0)
K  (total)     = F + J
L  (net cash)  = K − I
Enter fullscreen mode Exit fullscreen mode

Note the order: withholding is usually calculated on the pre-tax fee, and sales tax is added on top of it. If your country does it the other way, it's a one-cell change — but write the rule down once and apply it to every invoice, because a tracker that is inconsistent is worse than none.

2. Make the rate a lookup, never a typed number

Rates change. Clients also fall into categories (business with your tax ID on file, business without it, private individual, overseas). Put the categories and their rates in one small table and let every invoice look them up:

H = IFERROR(INDEX(Settings!$B$19:$B$23, MATCH(G2, Settings!$A$19:$A$23, 0)), 0)
Enter fullscreen mode Exit fullscreen mode

where column G is a dropdown of the type names. When your country's rate changes from 10% to 12%, you edit one cell and every invoice that uses that type updates. If you had typed 10% into 80 rows, you now have 80 edits and probably three mistakes.

A small discipline that pays off: keep NONE (0%) as the first row. Private clients and most overseas clients don't withhold, and "no type selected" should mean zero, not an error.

3. The certificate log is the whole point

Here is what actually recovers the money. Your tax return lets you claim withheld tax as a credit, but the tax office will only accept it with the client's withholding certificate (Form 16A in India, bukti potong in Indonesia, CIS statement in the UK, etc.). Clients forget. You forget. By filing season it's a scramble.

So the tracker has one column on the invoice sheet — Certificate received? YES / NO / N/A — and a separate sheet that lists only the invoices with withholding, pulled automatically:

A2 = IF(AND(Invoices!I2<>"", Invoices!I2>0), Invoices!A2, "")
Enter fullscreen mode Exit fullscreen mode

Then two numbers at the top of that sheet:

Total credit to claim    = SUM(F:F)
Still missing (paid, NO) = SUMIFS(F:F, G:G, "PAID", H:H, "NO")
Enter fullscreen mode Exit fullscreen mode

The second number is your to-do list. Chase it monthly, when the client's finance team still remembers the payment, not in April.

4. Month and quarter columns make the dashboard free

Add two helper columns to each invoice:

Q = TEXT(B2, "yyyy-mm")              → "2026-10"
R = "Q" & ROUNDUP(MONTH(B2)/3, 0)    → "Q4"
Enter fullscreen mode Exit fullscreen mode

Now every dashboard number is a SUMIFS on those columns, with a <>CANCELLED guard so voided invoices never inflate revenue:

=SUMIFS(Invoices!F:F, Invoices!Q:Q, "2026-10", Invoices!N:N, "<>CANCELLED")
Enter fullscreen mode Exit fullscreen mode

Twelve rows for months, four rows for quarters (sum of three months each), and you have: invoices issued, revenue, sales tax collected (this is your VAT return), tax withheld (this is your credit), net cash billed, cash received, outstanding. The quarterly block exists for estimated / advance tax payments, which most countries base on the quarter's actual income.

One more column I always add: suggested set-aside = cash received × a percentage you choose (I use 25%). It's not a tax computation, it's a nudge to move money into a separate account before it turns into a new lens.

5. Days late, computed from status

A due date is just invoice date + terms. Days late depends on status:

P = IF(N2="PAID", MAX(0, O2 − M2), IF(N2="CANCELLED", 0, MAX(0, TODAY() − M2)))
Enter fullscreen mode Exit fullscreen mode

Paid: how late was the payment. Unpaid: how late is it right now. Cancelled: zero. Add a conditional-format rule — red fill when P > 0 and status isn't PAID — and your receivables list reads itself. The dashboard KPIs then come free: overdue total, overdue count, average days to payment (AVERAGEIFS of P on paid invoices + terms), collection rate (cash received ÷ net cash billed).

6. The print sheet is twelve INDEX/MATCH formulas

You don't need an invoicing app for a clean invoice. One sheet, one yellow cell for the invoice number, and every field is:

=IFERROR(INDEX(Invoices!E:E, MATCH($C$3, Invoices!A:A, 0)), "")
Enter fullscreen mode Exit fullscreen mode

Show subtotal, sales tax, total, then — and this is what clients appreciate — a line that says "Less tax withheld at source (WHT 10%): −200" and "Amount payable: 1,800". When the invoice already shows the net amount, nobody at the client's end has to guess, and you get far fewer "we paid what the invoice said" arguments.


That's the system: three amounts per invoice, rates in a lookup table, a certificate log, month/quarter helpers, status-aware lateness, and a print sheet. It takes about an evening to build from scratch.

If you'd rather not spend the evening, I packaged exactly this as a 7-sheet Excel workbook (5,700 live formulas, no macros, works in Excel / Google Sheets / LibreOffice, every rate is an input so it fits any country): Freelancer Invoice & Tax Tracker 2026 — English edition, $9. Indonesian freelancers: the bilingual edition with PPh 23 / PPh 21 / PPN pre-wired is here.

Top comments (0)