Agent runs, priced.
An agent doesn't pay for one prompt — it pays for the whole conversation again on every step. On a 20-step task that's 521K input tokens for 24K of output. Describe your agent's loop and get the cost of one task on 15 models, from $0.022 to $2.16, caching and retries included.
Every step re-sends the whole conversation: the system prompt, the task, and every earlier output and tool result. Reasoning tokens bill as output but aren't sent back. With caching, the part already sent reads at the cached rate and only the new tokens bill as fresh input. Runs per task counts failed attempts you still pay for.
- Claude Haiku 5.5$0.022/task Anthropic $21.59/mo
- GPT-6 Luna$0.022/task OpenAI $21.59/mo
- DeepSeek V4.1 Flash$0.043/task DeepSeek $43.13/mo
- MiniMax M3$0.069/task MiniMax $69.20/mo
- Gemini 3.8 Flash$0.155/task Google $155/mo
- DeepSeek V4 Pro$0.167/task DeepSeek $167/mo
- GLM-5.3$0.284/task Zhipu $284/mo
- Claude Sonnet 5.5$0.384/task Anthropic $384/mo
Rates from our model catalog, each verified on the vendor's pricing page. Long-context surcharges, batch pricing, tool-call fees (search, code execution) and cache storage not modeled.
Six agent profiles
Click one to load it. Step counts, token sizes and retry rates are scenario assumptions — replace them with numbers from your own traces. Verdicts are computed from the current catalog.
Your agent on every model
The scenario configured above on all 15 models. Rates are each model's list price in our catalog; rows keep the default order while rank and costs recompute live. ✕ marks a final context larger than the model's window.
| # | Model | Input / cached / output | Context | Final context | Per task | Uncached | Per month |
|---|---|---|---|---|---|---|---|
| 1 | Claude Haiku 5.5 Anthropic | $0.10 / $0.01 / $0.50 | 1M | 44.1K | $0.022 | $0.064 | $21.59 |
| 2 | GPT-6 Luna OpenAI | $0.10 / $0.01 / $0.50 | 1.1M | 44.1K | $0.022 | $0.064 | $21.59 |
| 3 | DeepSeek V4.1 Flash DeepSeek | $0.30 / $0.006 / $1.20 | 1M | 44.1K | $0.043 | $0.185 | $43.13 |
| 4 | MiniMax M3 MiniMax | $0.30 / $0.06 / $1.20 | 1M | 44.1K | $0.069 | $0.185 | $69.20 |
| 5 | Gemini 3.8 Flash Google | $0.75 / $0.075 / $3.75 | 1M | 44.1K | $0.155 | $0.481 | $155 |
| 6 | DeepSeek V4 Pro DeepSeek | $1.32 / $0.044 / $3.96 | 1M | 44.1K | $0.167 | $0.783 | $167 |
| 7 | GLM-5.3 Zhipu | $1.40 / $0.26 / $4.40 | 1M | 44.1K | $0.284 | $0.835 | $284 |
| 8 | Claude Sonnet 5.5 Anthropic | $2.00 / $0.10 / $10.00 | 1M | 44.1K | $0.384 | $1.28 | $384 |
| 9 | GPT-6.1 Sol OpenAI | $2.00 / $0.10 / $10.00 | 1.1M | 44.1K | $0.384 | $1.28 | $384 |
| 10 | Grok 4.7 SpaceXAI | $2.00 / $0.50 / $6.00 | 500K | 44.1K | $0.462 | $1.19 | $462 |
| 11 | Kimi K3 Moonshot | $3.00 / $0.30 / $15.00 | 1M | 44.1K | $0.619 | $1.92 | $619 |
| 12 | Claude Opus 5.5 Anthropic | $4.00 / $0.20 / $20.00 | 1M | 44.1K | $0.767 | $2.56 | $767 |
| 13 | Qwen3.8 Max Alibaba | $2.00 / — / $6.00 | 1M | 44.1K | $1.19 | $1.19 | $1,186 |
| 14 | Claude Fable 5.1 Anthropic | $10.00 / $0.25 / $50.00 | 1M | 44.1K | $1.80 | $6.41 | $1,797 |
| 15 | GPT-6 Astra OpenAI | $10.00 / $1.00 / $50.00 | 1.1M | 44.1K | $2.16 | $6.41 | $2,159 |
Rates per 1M tokens from our model catalog; each model links to its page, where the rate is dated and sourced. "Uncached" is the same task with caching off. The lineup is an editorial selection of each lab's current flagship and workhorse models, reviewed 2026-10-13.
The same task, step by step
The default task on Claude Sonnet 5.5, stopped after a given number of steps. Context grows in a straight line; the tokens billed grow with its square.
| Steps | Context at last step | Input billed (all steps) | Cost, cached | Cost, uncached |
|---|---|---|---|---|
| 1 | 8K | 8K | $0.018 | $0.028 |
| 5 | 15.6K | 59K | $0.089 | $0.178 |
| 10 | 25.1K | 165.5K | $0.182 | $0.451 |
| 20 | 44.1K | 521K | $0.384 | $1.28 |
| 40 | 82.1K | 1.8M | $0.843 | $4.08 |
The math behind the ranking
Rates come from our LLM pricing catalog, where each one is read from the vendor's pricing page and dated — a reprice there moves this page on the next build. One task is modeled as a loop:
context_1 = system + task context_k = context_(k−1) + output + tool_result /* k ≥ 2 */ input = Σ context_k /* every step re-sends */ output = steps × (output + reasoning) /* reasoning not re-sent */ /* with caching */ cached = system + Σ context_(k−1) for k = 2..steps fresh = input − cached /* billed at cache-write rate if priced */ per_task = cached × cached_rate + fresh × write_or_input_rate + output × output_rate per_month = per_task × runs_per_task × tasks
Not modeled: long-context surcharges above a model's threshold, batch pricing (agents run live), per-call tool fees such as web search or code execution, cache expiry between slow steps, parallel tool calls and sub-agents, and compaction once a run outgrows the window — flagged, not priced. Image inputs (screenshots) count as whatever token size you enter for tool results.
Full methodology lives at /methodology/. Found a stale rate? Report it.
Three trade-offs, real numbers
Computed from the current catalog on the default task unless noted.
What the price per token doesn't show
A 20-step task here sends 521K input tokens and generates 24K — because every step re-sends the whole conversation. Even with caching, re-reading history is 44% of the cheapest model's bill. Output prices make the headlines; input volume pays the invoice.
With caching, the history each step re-sends reads at a fraction of the input rate — 5% of it on Claude Opus 5.5. On the default task that cuts the bill by 61%–79% across the models that offer it. Anthropic and OpenAI charge a premium to write the cache, which this calculator applies to every new token. Qwen3.8 Max has no cached rate in our catalog, so it pays full price for every step.
Thinking tokens bill at the output rate on every step, but the model doesn't send them back into the conversation, so they don't grow the context. They're why a frontier model's output line can rival its input line on short tasks — set the reasoning field to what your traces show.
The context grows by output + tool result every step. At the default pace that's 1.9K a step, so Grok 4.7's 500K window fills after about 260 steps. Past that an agent has to compact — summarise and restart — which this calculator flags rather than prices.
An agent that loops, stalls or gets the wrong answer still bills every step it took. "Runs per task" multiplies the month: 1.3 means three tasks in ten need a second attempt. A cheaper model that fails twice as often is not cheaper.
Agent costs — answered.
The questions this calculator exists for, answered with the current numbers. Every figure recomputes when a rate in the catalog changes.
Q · 01 How much does an AI agent cost to run? +
Q · 02 Why do agents cost so much more than chat? +
Q · 03 How much does prompt caching save on agent tasks? +
Q · 04 What is the cheapest model for AI agents? +
Q · 05 How many tokens does an AI agent use per task? +
Q · 06 How much does a Claude agent task cost? +
Q · 07 Does the context window limit what an agent can do? +
Q · 08 How can I cut AI agent costs? +
Put this calculator on your site
Free to embed — your readers always see current rates. The widget links back here for the full tables.
The cost toolbox
Every tool runs on the same live-pricing backbone. See the full index →