September 29, 2026
AI agent cost per completed task: a worksheet that catches false savings
A practical cost-per-outcome worksheet for comparing agent runs without rewarding cheap failures or hidden retries.
Quick answer
Divide the full cost of a workflow by the number of accepted outcomes, not by the number of model calls. Include retries, failed runs, tool fees, and human review. Keep incomplete runs visible as their own line item.
A cheaper model can lower the price of one call while increasing the cost of getting a task done. If it needs more retries or more human repair, the invoice line looks better and the workflow looks worse.
Use a run ledger, not just a token chart
For each run, record a task id, model, input and output tokens, cached-input tokens where reported, tool charges, retry count, human review time, and final outcome. Define an accepted outcome before you run the comparison. For a support workflow it might be a reply approved by a reviewer. For a coding workflow it might be a merged change with required checks passing.
Here's a deliberately hypothetical worksheet. The numbers illustrate the method, not a Clawback customer result:
| Variant | Run spend | Accepted tasks | Cost per accepted task |
|---|---|---|---|
| A | $12 | 8 | $1.50 |
| B | $9 | 4 | $2.25 |
Variant B spent less in total, but each accepted task cost more. The arithmetic is simple: $12 / 8 = $1.50 and $9 / 4 = $2.25. If B also required more human cleanup, this table still understates its true cost.
Define the boundary before calculating
Start the clock at the trigger and stop it only after validation. Count model calls in subagents and fallback paths, not just the main agent. If a run fails and gets restarted with a new id, link both ids to the same attempted task. Otherwise retry spend disappears from the denominator.
Keep human review separate from provider charges, then show both a provider-only view and an all-in view. Blending them without saying so makes model comparisons hard to reproduce.
Three numbers worth watching
- Cost per accepted task: total workflow cost divided by accepted outcomes.
- Acceptance rate: accepted outcomes divided by attempted tasks.
- Unfinished spend: cost attached to blocked, timed-out, or abandoned work.
Review all three together. A lower cost per task can hide a growing pile of abandoned runs if the denominator silently excludes them.
FAQ
Should failed runs count in cost per task?
Yes, in the numerator. They used resources even if they produced no accepted outcome.
What if tasks vary a lot in difficulty?
Group comparable tasks first. Report simple triage, research, and code changes separately rather than averaging unlike work.
Where do I start?
Track one repeatable workflow for a week, agree on its acceptance test, then compare variants against the same test.
See your actual numbers
The calculator runs in your browser. No account needed.