AI agent retry & waste cost calculator
The scariest line item in an agent bill is the work you paid for that went nowhere — retries, timeout loops, hallucinated tool calls, and tasks that failed and had to re-run. Model your failure rates to see your true cost per successful task and your monthly waste.
Switching from Claude Opus 4.8 to DeepSeek-V4 Pro (reasoner) (DeepSeek, same frontier tier) cuts monthly spend by $6.6K — 92% — for this workload.
Where each task's cost goes
| Model | $/task | $/successful | Monthly | vs current |
|---|---|---|---|---|
CHEAPEST OpenAI · fast | $0.0508 | $0.0591 | $76.18 | cheapest |
| Groq · fast | $0.054 | $0.0627 | $80.94 | 1.1× |
| Gemini · fast | $0.0928 | $0.1079 | $139 | 1.8× |
| OpenRouter · mid | $0.1114 | $0.1296 | $167 | 2.2× |
| DeepSeek · mid | $0.1213 | $0.141 | $182 | 2.4× |
| OpenRouter · mid | $0.2264 | $0.2632 | $340 | 4.5× |
| OpenAI · mid | $0.2539 | $0.2953 | $381 | 5.0× |
| Gemini · mid | $0.3069 | $0.3569 | $460 | 6.0× |
| Together · mid | $0.3622 | $0.4211 | $543 | 7.1× |
| DeepSeek · frontier | $0.3756 | $0.4368 | $563 | 7.4× |
| Groq · mid | $0.6334 | $0.7365 | $950 | 12.5× |
| Anthropic · mid | $0.95 | $1.10 | $1.4K | 18.7× |
| Together · mid | $1.11 | $1.29 | $1.7K | 21.8× |
| OpenAI · frontier | $1.27 | $1.48 | $1.9K | 25.0× |
| Gemini · frontier | $1.27 | $1.48 | $1.9K | 25.0× |
| OpenAI · frontier | $1.92 | $2.24 | $2.9K | 37.9× |
| Anthropic · frontier | $2.85 | $3.31 | $4.3K | 56.1× |
CURRENT Anthropic · frontier | $4.75 | $5.52 | $7.1K | 93.5× |
Per-1M-token list prices; figures are estimates and exclude embeddings, fine-tuning, image/audio, and infrastructure. Rows marked verifystill need a final check against the provider's live pricing. LLM prices change often.
Frequently asked questions
How much do retries add to AI agent costs?+
More than most teams think. A retry re-runs a model call at the current (often large) context, so a 10% retry rate on a long-context agent adds roughly 10% to spend — and timeout loops that burn full-context calls without progress can add much more. Set the retry, loop and hallucination inputs to see the waste line.
What is cost per successful task?+
Your spend divided by tasks that actually succeeded. If 14% of tasks fail and re-run, you pay for those failed attempts too, so cost per successful task is higher than cost per attempt. It's the number that should drive budgeting — the calculator surfaces it directly.
How do hallucinated tool calls waste money?+
A wrong tool call burns a tool result (sometimes large) plus a correction round-trip through the model. At a few percent of tool calls across thousands of tasks, that adds up. The hallucinated-tool input models both the wasted result and the correction call.
How do I cut agent waste?+
Lower retry and timeout rates with better tool design and guardrails, cap loop iterations, validate tool calls before executing, and route to a more reliable model where failure rates are high (a cheaper model that fails more can cost more per successful task). Adjust the inputs to test each lever.