Topic 4 of 6 · 4 min read
Cost per task, not per token
Goal: Compare two models on cost per completed task rather than price per million tokens.
The number that matters is what it costs to get one task done correctly, and that depends on tokens used, calls made and how often the result must be redone. A low per-token price does not guarantee a low bill.
Check yourself · 1 of 3
Why can a model with a lower price per million tokens cost more per finished task?
Why it matters
Price tables list cost per million tokens. A task is not a token. A task might be "fix this bug" or "answer this support ticket", and it can take many calls, long outputs and a few failures before it is finished. Two models can differ more in tokens per task than in price per token.
How to compute it
- Define the task and what counts as success. For example: a support reply that a person accepts without edits.
- Run a sample. Use 20 to 50 real tasks on each model. Record input tokens, output tokens, thinking tokens and tool calls for each.
- Price the average task. Multiply the average counts by the rates.
- Divide by the success rate. If a model succeeds on 60 percent of tasks, you pay for about 1.67 attempts per success, plus any human time spent fixing the failures.
- Compare. The lower cost per accepted task wins, unless speed or quality matters more.
A worked comparison
| Model Small | Model Large | |
|---|---|---|
| Price per million (input / output) | $0.50 / $2 | $3 / $15 |
| Average tokens per attempt (in / out) | 6,000 / 2,500 | 4,000 / 900 |
| Cost per attempt | $0.008 | $0.0255 |
| Success rate | 55% | 92% |
| Cost per accepted task | $0.0145 | $0.0277 |
Small is still cheaper here, but only by about half, not by the six-fold gap in token prices. If a failed task costs five minutes of staff time, the picture flips, so include that cost when it exists.
Before and after
Before: "We chose the model with the lowest price per million tokens."
After: "We ran 40 real tickets on both, counted tokens and accepted replies, and chose by cost per accepted reply."
What goes wrong
- Comparing price tables and ignoring tokens per task.
- Testing on easy samples, then meeting harder real traffic.
- Leaving out retries and the human time to fix failures.
Cost per task is an estimate from your own sample, so rerun it when prices or your workload change.
Examples
The cheap model that rambles
Model A costs half as much per token as Model B, but its answers are three times as long and need a retry one time in three. Per accepted task, the two models end up close, and Model B is faster.
Where a failure is expensive
An agent fails 20 percent of code fixes, and each failure costs a developer ten minutes. At typical salaries that time outweighs the token bill many times over, so a higher-accuracy model is the cheaper choice.
Key points
- Cost per million tokens is a price, not a cost. Cost per finished task is the useful number.
- Two models can use very different numbers of tokens for the same task.
- Divide the attempt cost by the success rate to price a successful result.
- Include the cost of human time spent fixing failures when it applies.
- Measure on a sample of your real tasks, and repeat when prices or workload change.
Common mistakes
- Choosing by price per million tokens alone.
- Testing on a handful of easy examples.
- Ignoring retries and manual fixing time.
- Treating one measurement as permanent.
Check yourself · 2 of 3
Model X costs $0.02 per attempt and succeeds 50% of the time. Model Y costs $0.03 per attempt and succeeds 100% of the time. Which costs less per accepted task?
Check yourself · 3 of 3
You want to compare two models for answering support tickets. What is the best first step?
Practice items, not counted towards your mastery.
Start here
- Claude API pricing (opens in a new tab)DocsFree
Anthropic's price table with cache, batch, long-context and tool-fee sections to practise reading.
- OpenAI API pricing (opens in a new tab)DocsFree
OpenAI's per-model table, including cached input and batch prices.
- Gemini API pricing (opens in a new tab)DocsFree
Google's price table with free and paid tiers and separate rates for long prompts.
More for this topic
- LLM inference prices have fallen rapidly but unequally (Epoch AI) (opens in a new tab)ArticleFree
Data on how fast the price of a fixed capability level has dropped, and how uneven it is.