Sales Commission Calculator with an Approval Gate
Import your closed-won deals and your comp plan, let AI apply the rates, tiers, accelerators, caps, and splits to compute every rep's commission with a per-deal breakdown — then finance reviews the run and approves the payout batch before anything goes to payroll.
An internal web tool where you import closed-won deals and a versioned comp plan, AI computes each rep's commission deal by deal with a transparent breakdown, rolls it up per rep with attainment and accelerators, finance reviews and approves the payout batch, and you export a clean payroll CSV plus per-rep statement data — and nothing is final until a human signs off.
Before you start
- A Supabase account (free)
- A Vercel account (free)
- A closed-won deals export (rep, amount, product, margin, close/paid date, split %)
- Your comp plan written down (rates, tiers, accelerators, caps, eligibility rules)
- Claude Code or any AI coding agent
The problem this kills
It's the last week of the month and the commission spreadsheet is open again. Somebody on sales ops or finance is pasting in the closed-won deals, hand-keying the comp plan's tiers and accelerators, nesting IF formulas five deep to handle the caps and the splits, and praying nobody fat-fingered a rate. Then the reps get their numbers — and the disputes start. "That deal was split with me." "I crossed quota that month, where's my accelerator?" "Why is this capped?" Now you're rebuilding the math under pressure, with a rep staring at you, trying to prove a spreadsheet you no longer trust.
The cost isn't just the hours. It's the errors that slip through — a tier applied to the wrong band, a clawback window missed, a deal paid twice because it appeared in two exports. It's the comp plan changing mid-year and nobody being sure which version a given run used. And it's the slow erosion of trust: when reps can't see how their number was computed, every payout is a negotiation.
You don't need an enterprise commission platform to fix this. You can build a calculator that shows its work — and keeps finance firmly in control of the final say — in a weekend.
What you'll build
An internal web tool your sales ops and finance team logs into. You import two things: a closed-won deals export (rep, amount, product, margin, close and paid dates, split %) and a comp-plan definition (base rates, quota tiers and accelerators, caps, product modifiers, eligibility and clawback rules). The tool pins the run to a specific comp-plan version, then walks every deal: it figures out the rep's attainment for the period, applies the right tier and any accelerator, layers on product modifiers, honors splits so each rep gets their slice, respects caps, and produces a line-by-line breakdown that explains exactly how each commission number was reached.
It rolls the deals up per rep — total attainment, which tier they landed in, accelerator earned, and total commission — and reconciles the whole run back to your source revenue so the totals tie out. Finance opens the review screen, reads the per-deal explanations and the reconciliation totals, makes any logged adjustments, and approves the payout batch. Only then does the run go final, and you export a clean payroll CSV in the exact columns your payroll system wants, plus per-rep statement data so every rep can see their own math.
What's inside the Implementation Plan
The downloadable plan is a single markdown file you paste into an AI coding agent. It opens by interviewing you about your own comp plan and deal data — your real field names, how splits are recorded, what your tiers and accelerators actually are, how caps and clawback windows work, and your messiest exceptions — and then it reads a short spec back for your thumbs-up before it builds anything. That's the difference between a calculator shaped to your plan and a generic template you'd spend a weekend fighting.
From there it walks the agent through the data model (reps, deals, comp-plan versions, computed commission lines, runs, and adjustments), the importers, the duplicate guard, the commission engine (tiers, accelerators, caps, splits, product modifiers, clawback windows), the per-rep rollup with attainment, the reconciliation back to source revenue, the finance review-and-approve screen, and the final payroll export. Every step ends with a ready-to-copy prompt. There's a full "No API yet?" path: import deals and the plan from Google Sheets or CSV, export a clean payroll CSV — you never need a CRM or payroll API to ship.
The governance it includes (this is the point)
This is money going to people's paychecks — the controls are the product. The plan builds them in: a login so only your team can use it; row-level security so each organization only ever sees its own deals and payouts; a complete audit trail of who imported, computed, adjusted, approved, and exported, and when; a hard human-approval gate so nothing is marked final or exported to payroll until finance approves the batch, with every adjustment logged and attributed; and duplicate guards (on deal id + rep + period) so the same deal can't be paid twice. Each run is pinned to a comp-plan version, so you can always answer "which rules did this payout use?" — and the reconciliation totals give you the tie-out your controller will ask for.
Who it's for
Sales ops and finance professionals who calculate commissions by hand each period and dread the disputes. If you can explain to a new hire how a rep's commission is figured — the tiers, the accelerators, the splits, the caps — you can build this. No developer required.
You've got this — open the plan, paste the first prompt, answer a few questions about how your comp plan actually works, and you'll watch your first run compute itself, deal by deal, with the math right there for anyone to check.