AI Agent Cost Calculator: Cost per Successful Task
Prices verified 2026-07-14 against official provider pricing pages. Methodology and formula: how these numbers are computed.
Quick answer: a typical production support agent (50K tasks/month, 5-call chain, 70% cache hit rate, 90% first-attempt success, one retry) on Claude Sonnet 5 costs $0.022 per successful task — 11% above the naive single-attempt estimate of $0.020. Monthly: $1,095 in LLM spend plus $1,500 of human fallback for escalated tasks = $2,595 all-in. Enter your own workload below.
Your agent workload
Success rate moves cost more than model price
Same 5-call support workload on Claude Sonnet 5, up to 3 attempts — only the per-attempt success rate changes. From 99% down to 60%, cost per successful task rises 1.7x, and at 60% first-attempt success, 6.4% of tasks still exhaust all three attempts and land on a human.
| First-attempt success | Solved within 3 attempts | Avg attempts per task | Cost per successful task |
|---|---|---|---|
| 60% | 94% | 1.56 | $0.033 |
| 70% | 97% | 1.39 | $0.028 |
| 80% | 99.20% | 1.24 | $0.025 |
| 90% | 99.90% | 1.11 | $0.022 |
| 95% | 99.99% | 1.05 | $0.021 |
| 99% | >99.99% | 1.01 | $0.020 |
Practical rule: below ~70% first-attempt success, reliability engineering (prompts, tool descriptions, guardrails) returns more than switching to a cheaper model.
Worked examples
Three common agent shapes, computed with the same formula as the calculator. All models are compared under identical workload and success-rate assumptions — in practice success rates differ by model, so measure yours on an eval set before switching.
Support-triage agent — Anthropic Claude Sonnet 5: $0.022 per successful task, $2,595/month all-in
50,000 tasks/month, 5 LLM calls per attempt, 2,000 input / 250 output tokens per call, 70% prompt-cache hit rate, 90% first-attempt success, up to 2 attempts, failed tasks escalate to a human (6 min at $30/h). Real-time, no batch.
| Model | Cost / successful task | Monthly LLM cost | Monthly total incl. human fallback |
|---|---|---|---|
| DeepSeek DeepSeek V4 Flash | $0.001 | $43.43 | $1,543 |
| DeepSeek DeepSeek V4 Pro | $0.003 | $133 | $1,633 |
| Google Gemini 3.1 Flash-Lite | $0.003 | $154 | $1,654 |
| Anthropic Claude Haiku 4.5 | $0.011 | $547 | $2,047 |
| OpenAI GPT-5.6 Luna | $0.012 | $616 | $2,116 |
| Google Gemini 3.5 Flash | $0.019 | $924 | $2,424 |
Deep research / browsing agent — OpenAI GPT-5.6 Sol: $0.416 per successful task, $2,829/month all-in
5,000 tasks/month, 12 LLM calls per attempt (long tool-use chains), 4,000 input / 500 output tokens per call, 50% cache hit rate, 75% first-attempt success, up to 3 attempts, escalation 15 min at $40/h. Real-time.
| Model | Cost / successful task | Monthly LLM cost | Monthly total incl. human fallback |
|---|---|---|---|
| DeepSeek DeepSeek V4 Flash | $0.007 | $33.52 | $815 |
| Google Gemini 3.1 Flash-Lite | $0.021 | $102 | $884 |
| DeepSeek DeepSeek V4 Pro | $0.021 | $103 | $885 |
| Anthropic Claude Haiku 4.5 | $0.075 | $370 | $1,151 |
| OpenAI GPT-5.6 Luna | $0.083 | $410 | $1,191 |
| Google Gemini 3.5 Flash | $0.125 | $614 | $1,396 |
Overnight document-extraction agent — OpenAI GPT-5.6 Luna: $0.007 per successful task, $1,863/month all-in
200,000 tasks/month, 3 LLM calls per attempt, 3,000 input / 400 output tokens per call, 30% cache hit rate, 95% first-attempt success, up to 2 attempts, escalation 2 min at $25/h. Batch API enabled.
| Model | Cost / successful task | Monthly LLM cost | Monthly total incl. human fallback |
|---|---|---|---|
| DeepSeek DeepSeek V4 Flash (no batch API) | $0.001 | $257 | $674 |
| Google Gemini 3.1 Flash-Lite | $0.002 | $361 | $778 |
| DeepSeek DeepSeek V4 Pro (no batch API) | $0.004 | $797 | $1,213 |
| Anthropic Claude Haiku 4.5 | $0.007 | $1,320 | $1,737 |
| OpenAI GPT-5.6 Luna | $0.007 | $1,446 | $1,863 |
| Google Gemini 3.5 Flash | $0.011 | $2,169 | $2,585 |
Sources: OpenAI pricing · Anthropic pricing · DeepSeek pricing · Gemini API pricing. Per-token prices and model caveats are listed on the migration savings calculator and in the methodology.
Frequently asked questions
How much does it cost to run an AI agent in production?
For a typical support-triage agent (50,000 tasks/month, 5 LLM calls per attempt, 70% prompt-cache hit rate, 90% first-attempt success, one retry) on Claude Sonnet 5, the LLM bill is about $1,095/month — $0.022 per successfully completed task. Adding human fallback for the tasks the agent cannot finish (6 minutes at $30/h) brings the true monthly total to $2,595. Costs scale linearly with chain depth and task volume; prices verified 2026-07-14. Use the calculator above with your own workload profile.
What is cost per successful task and how do I calculate it?
Cost per successful task = total LLM spend (including every failed attempt and retry) divided by the number of tasks the agent actually completed. Formula: cost_per_attempt × expected_attempts ÷ task_success_rate, where expected_attempts = (1 − (1 − p)^n) ÷ p for per-attempt success rate p and up to n attempts. It is the honest unit economics of an agent — a naive tokens-×-price estimate assumes one attempt and 100% success, and understates real cost by 10-80% for most production agents.
Why do AI agents cost 10-100x more than a chatbot per request?
Three multipliers stack: (1) chain depth — one task triggers 3-15 internal LLM calls for planning, tool use and validation; (2) context accumulation — each step re-sends the growing conversation and tool results, so input tokens per call are 5-20x a chatbot turn; (3) retries — a 75% first-attempt success rate with 3 attempts means ~1.3 full chain runs per task on average. A 12-step research agent can easily consume 50,000+ input tokens per attempt.
How does success rate change agent economics?
Dramatically, and non-linearly. Holding a 5-step workload constant on Claude Sonnet 5 with up to 3 attempts, dropping per-attempt success from 99% to 60% raises cost per successful task by 1.7x — you pay for more retries and divide the spend across fewer completed tasks. Below roughly 70% first-attempt success, engineering work that improves reliability (better prompts, tool descriptions, guardrails) usually returns more than switching to a cheaper model.
Is a cheaper model always cheaper for agents?
No. Cost per successful task couples price to reliability: a model at half the token price that drops your first-attempt success from 92% to 70% can end up more expensive once retries and human escalations are counted — human fallback minutes are often the largest line item. Test cheaper models on your own eval set first, then put the measured success rate into this calculator rather than assuming the rate transfers.
Does prompt caching matter for agent costs?
More than for any other workload. Agents re-send the system prompt, tool definitions and accumulated context on every step, so 50-90% of input tokens are repeats. Cached input is billed at ~10% of the list input price on OpenAI, Anthropic and Google, and ~1% on DeepSeek — at a 70% cache hit rate, effective input price drops to ~37% of list. If your agent framework does not enable prompt caching, that is usually the single largest saving available.