runbookify
← All plans
Human Resources / Offboarding

Final Pay & PTO Payout Calculator

Build an internal tool that computes a departing employee's final-period wages, accrued-PTO payout, reimbursements, and policy-allowed deductions per your rules and jurisdiction — then routes the full breakdown to HR and payroll for review and sign-off before anything hits payroll.

IntermediateA weekendBuilds onNext.js (App Router) on VercelSupabase (Postgres + Auth + RLS + Storage)Resend (email)
What you'll build

A login-protected app where HR picks a departing employee and last day, sees a fully explained final-pay breakdown (wages + PTO payout + reimbursements + deductions), approves it through a human gate, and exports a payroll-ready CSV — with a complete audit trail.

Gated download

Enter your email — the plan downloads instantly and a copy lands in your inbox.

By submitting your email you'll also receive the weekly runbookify newsletter. You can unsubscribe at any time.

Before you start

  • A free Vercel account
  • A free Supabase account
  • A free Resend account
  • Your written PTO-payout and final-pay policy (which leave types pay out, caps, deduction rules)
  • A list of the final-pay columns your payroll system imports

The problem this kills

When someone leaves, the clock starts. In many places final pay is legally due fast — sometimes on the last day — and getting the number wrong (or late) is exactly the kind of mistake that turns into a wage claim. Yet most HR/payroll coordinators still build the final check by hand: open the PTO spreadsheet, eyeball the accrual balance, guess which leave types pay out, subtract for the laptop that never came back, and hope the math and the policy line up.

It is slow, it is error-prone, and there is no record of how the number was reached or who signed off. One transposed balance or one deduction that your policy doesn't actually allow, and you have a problem.

What you'll build

A small, secure internal web app that does the calculation the same careful way every time. You pick the departing employee and their last day, and the tool computes every component of final pay — final-period wages, accrued-unused PTO payout, owed reimbursements, and any policy-allowed deductions — using your configured rules and jurisdiction settings. It shows the full breakdown with plain-language explanations of how each line was derived, flags anything risky (negative balances, capped accruals, deductions that need sign-off), and routes it to HR and payroll to approve. Only after a human approves does it produce the payroll CSV in exactly the columns your system expects.

What's inside the Implementation Plan

The plan is a complete, paste-and-go runbook for Claude Code. It opens by interviewing you about your business — your current process, your PTO accrual and payout rules, your pay periods, the exact fields and naming in your data, your typical and peak volumes, your approval chain, and your messiest edge cases — and then tailors the data model, the calculations, and every later build step to your answers. It is not a generic template; it becomes your tool.

From there it walks you through, step by step, building the database, the login, the employee/last-day picker, the rules engine, the explained breakdown screen, the approval gate, the audit trail, and the payroll CSV export — each step ending with a ready-to-paste prompt.

The governance it includes (this is the point)

  • Login so only your team can open the tool.
  • Row-level security so people only ever see their own organization's data.
  • A complete audit trail — who calculated, who approved, what the numbers were, and when.
  • A hard human-in-the-loop approval gate — the tool drafts the final-pay breakdown, but nothing is treated as final and nothing is exported until HR and payroll review and approve it. Any deduction (like unreturned equipment) requires explicit sign-off plus a policy reference before it can be applied.
  • A duplicate guard keyed on employee ID + last day, so the same person's final pay can't be calculated and committed twice.

This tool applies the rules you configure. It is not legal advice — it's a disciplined, auditable way to do what your policy and your jurisdiction already require.

Who it's for

HR and payroll coordinators who calculate final pay by hand today and carry the legal and timing risk when it goes wrong. If you've ever rebuilt a final check at 4:55pm on someone's last day, this is for you.

You've got this — paste the first prompt and let the agent interview you.

Gated download

Enter your email — the plan downloads instantly and a copy lands in your inbox.

By submitting your email you'll also receive the weekly runbookify newsletter. You can unsubscribe at any time.