runbookify
← All plans
Accounting & Finance / Expense Management

Mileage & Per-Diem Calculator: Turn Trip Logs into Approved Reimbursements

Drop in a month of trip logs and per-diem days, and the tool computes every reimbursement from your firm's mileage rate and per-diem table — then a manager approves before anything reaches AP or payroll.

BeginnerAn afternoonBuilds onNext.jsSupabaseResend
What you'll build

A web tool where employees log trips and per-diem days, AI computes mileage and per-diem per your policy (tiered first/last day, rates that change by date, personal vs business miles), a manager reviews and approves, and the tool exports a reimbursement file for payroll/AP plus a per-employee summary.

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 Supabase account (free)
  • A Vercel account (free)
  • A Resend account (free)
  • Your firm's mileage rate(s) and per-diem table
  • A trip log CSV (date, from/to or miles, purpose)
  • Claude Code or any AI coding agent

The problem this kills

Every reimbursement cycle, someone in accounting becomes a human calculator. An employee emails a list of trips — "drove to the client Tuesday, two nights in Denver, back Thursday" — and now AP has to look up the mileage rate that applied on that date, multiply it out, figure out which per-diem applies to Denver, remember that the first and last travel days only pay 75%, subtract the miles that were really a personal detour, and re-key the total into payroll. Multiply that by every traveling employee, every month.

It's slow, it's error-prone, and the mistakes go both ways: you overpay when nobody catches a double-counted trip, and you underpay (and annoy your team) when the per-diem tier is applied wrong. Worse, the math lives in one person's head and one fragile spreadsheet. You don't need to live like this, and you don't need to be a developer to fix it.

What you'll build

A simple internal web tool. Employees log their trips (date, from/to or miles, purpose) and their per-diem days (dates and location). You load your firm's mileage rate table (with effective dates, because the IRS rate changes) and your per-diem table (by location, with the first/last-day tier). The tool computes each person's mileage and per-diem exactly per your policy: it picks the right rate for each trip's date, applies the right per-diem to each day, drops the days/miles flagged personal, and dedupes on trip ID so the same drive can't be claimed twice. It shows the manager a clean reimbursement worklist — totals per employee, with every line they can drill into. The manager reviews, fixes anything off, and clicks Approve. Only then does the tool export a reimbursement file for payroll/AP and email each employee a per-trip summary of what they're being paid.

What's inside the Implementation Plan

The downloadable plan is a step-by-step file you paste into an AI coding agent. It opens by interviewing you about your business — how employees submit trips today, what your mileage rate is and when it last changed, exactly how your per-diem table is structured (per location? first/last day at 75%? meals vs lodging?), how you tell business miles from personal, your typical and peak claim volumes, and your messy edge cases — and then it tailors the data model, the rate logic, and every later step to your answers. This is not a generic template; the agent reflects a short spec back to you and waits for your thumbs-up before it builds anything. From there it walks the agent through trip logging, the per-diem-day logging, the calculation engine, the manager review-and-approve screen, the payroll/AP export, and the per-employee email — each step with a ready-to-copy prompt. There's also a fallback so you can build the whole thing today even with no integration to your payroll or expense system.

The governance it includes (this is the point)

This is real money headed to payroll, so it ships with the controls a finance team needs: login so only your team can use it, row-level security so an employee only ever sees their own trips and a manager sees only their organization's claims, a complete audit trail of who submitted, edited, and approved which reimbursement and when, a hard human-approval gate so nothing is exported to AP/payroll until a manager signs off, and duplicate guards keyed on trip ID so the same trip can't be reimbursed twice. Personal miles and days are flagged and excluded by default rather than silently paid.

Who it's for

Employees who travel and the managers and AP staff who reimburse them — anyone tired of re-keying trip lists into a calculator under a deadline. If you can describe how your firm sets its mileage rate and per-diem, you can build this.

You've got this — start with the plan, paste the first prompt, answer the interview, and you'll see your first computed reimbursement worklist take shape the same afternoon.

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.