Cost per Task
What is Cost per Task?
Cost per task is the full cost of completing one unit of AI-assisted work, such as a resolved support request or a processed document, including every model call, tool and retry involved.
Updated November 2026 · 2 min read
Cost per task measures what it costs to get one piece of work done with AI: one support request resolved, one invoice processed, one contract reviewed, one code change made. It is a more useful number than cost per token or cost per request, because modern AI systems often take many steps to complete a task. An agent might call a model ten times, use several tools and retry when something fails. Cost per task adds all of that up and ties it to a unit the business understands.
How to calculate cost per task
Cost per task = total AI-related cost for a period ÷ number of tasks completed in that period. The total should include:
- Every model call involved, including planning, tool use, checks and retries.
- Reasoning tokens, which may not be visible in outputs.
- Embeddings and retrieval from vector databases.
- Tool and API charges, such as web search or data lookups.
- Failed attempts that are abandoned or escalated, spread across successful tasks.
- Human review time, where a person checks or completes the work.
Fixed costs, such as engineering salaries, are usually tracked separately and added when calculating full unit economics. See AI unit economics.
Why the distribution matters
Average cost per task can hide a long tail. Most tasks may cost a few cents, while a small share, where an agent loops, retries repeatedly or processes very long documents, cost many dollars. These outliers can dominate the total. Teams track the median and high percentiles, such as the 95th and 99th, and set limits on steps or spending per task to keep the tail under control.
An example
Consider a hypothetical accounts payable team using an AI agent to process invoices. Average cost per invoice is $0.18, compared with an estimated $4.50 for manual processing. But the 99th percentile is $6.40. Investigation finds that scanned invoices with poor image quality cause the agent to retry extraction up to 15 times before giving up. The team caps retries at three, sends failed invoices straight to a person and adds an image-quality check at the start. Average cost falls to $0.14, the 99th percentile to $0.60 and the share of invoices completed without human help stays at 82%.
Using cost per task
- Comparing with the alternative: the cost of a person or existing system doing the same task.
- Comparing models and designs: a more expensive model that finishes in fewer steps may cost less per task.
- Pricing: setting prices for AI features or outcome-based pricing.
- Monitoring: spotting changes after model, prompt or workflow updates.
Common pitfalls
- Counting only successful tasks and ignoring the cost of failures.
- Measuring cost per request and assuming one request equals one task.
- Ignoring quality: a cheaper task that needs more human correction may not be cheaper overall.
Cost per task is a core measure in AI token economics and in comparing AI agent pricing offers.
Frequently asked questions
How do you calculate cost per task for an AI system?
Divide the total AI-related cost for a period by the number of tasks completed in that period. Include every model call, reasoning tokens, embeddings and retrieval, tool and API charges, failed attempts spread across successful tasks and human review time. Fixed costs such as engineering salaries are usually added separately for full unit economics.
Why is cost per task better than cost per token for comparing AI models?
Models differ in how many tokens and steps they need and how often they fail. A model with a higher token price can finish in fewer steps or need fewer retries, making it cheaper per task. Cost per task ties all of that to a unit the business understands, such as a resolved request.
Why should you track percentiles of AI cost per task, not just the average?
Average cost per task can hide a long tail. Most tasks may cost a few cents while a small share, where an agent loops, retries repeatedly or handles very long documents, costs many dollars. Tracking the median and high percentiles such as the 95th and 99th shows these outliers so teams can cap steps or spend per task.
Related terms
Reasoning Tokens
Hidden thinking a model does before answering, usually billed as output.
Vector Database
A database that stores embeddings and finds items with similar meaning.
AI Unit Economics
AI cost and revenue per customer or task, showing if each use pays off.
Outcome-Based Pricing
Paying for results, like a resolved ticket, rather than seats or usage.