AI agent cost calculator
110/128 prices match the official page, 102 match models.devSynced 2026-11-24 01:00 UTC · Method
Agents call the model many times per task, and each call re-reads everything so far. Enter your loop shape to see cost per task and per month.
| Model | Provider | Per task | Heavy run (2× calls) | Monthly |
|---|
Agent runs vary: the same task can take twice the calls after retries and dead ends. Because the context grows with every call, twice the calls costs about three to four times as much. Every current text model is ranked (126); 2 evaluation-only models (no text output) are left out, so this list has 2 fewer than the 128 in the price table.
Coding tools on an API key: Claude Code, Codex, Cursor
Coding tools run agent loops: every step resends the conversation, file contents and tool results. When a tool bills per API token, a session costs the model's API price times those tokens, so the calculator above applies. Subscription plans are billed differently and are not compared here.
| Tool | How API usage is billed (official docs) | Source |
|---|---|---|
| Claude Code | Charged by API token consumption: per token through the Claude Console or a cloud provider (Amazon Bedrock, Google Cloud, Microsoft Foundry). Uses Anthropic (Claude) models. | code.claude.com/docs/en/costs |
| Codex | With an API key, usage is charged at standard OpenAI API rates; the models available follow your key. Uses OpenAI models. | learn.chatgpt.com/docs/pricing |
| Cursor | Third-party models (Claude, GPT, Gemini) are billed at the model's API list price from prepaid credit, on Premium and above. | cursor.com/docs/models |
Cost of one coding session by model (example)
Example assumption, not a measurement: 30 model calls per session, 15,000 starting tokens (instructions, tool definitions, files), +2,000 tokens per call, 400 output tokens per call, 90% of input read from the prompt cache, 5 sessions a day. That is 1,320,000 input and 12,000 output tokens per session; real sessions can be far smaller or larger. Load this example into the calculator and change it
| Model | Provider | Input /1M | Cached /1M | Output /1M | Per session | Month (5/day) |
|---|---|---|---|---|---|---|
| Claude Haiku 5.5 | Anthropic | $0.10 | $0.01 | $0.50 | $0.03 | $5.16/mo |
| Claude Sonnet 5.5 | Anthropic | $2.00 | $0.10 | $10.00 | $0.57 | $85.32/mo |
| Claude Sonnet 5 | Anthropic | $2.00 | $0.20 | $10.00 | $0.69 | $103/mo |
| Claude Sonnet 4.6 | Anthropic | $3.00 | $0.30 | $15.00 | $1.03 | $155/mo |
| Claude Opus 5.5 | Anthropic | $4.00 | $0.20 | $20.00 | $1.14 | $171/mo |
| Claude Opus 5 | Anthropic | $5.00 | $0.50 | $25.00 | $1.72 | $258/mo |
| Claude Opus 4.8 | Anthropic | $5.00 | $0.50 | $25.00 | $1.72 | $258/mo |
| Claude Opus 4.7 | Anthropic | $5.00 | $0.50 | $25.00 | $1.72 | $258/mo |
| Claude Opus 4.6 | Anthropic | $5.00 | $0.50 | $25.00 | $1.72 | $258/mo |
| Claude Opus 4.5 | Anthropic | $5.00 | $0.50 | $25.00 | $1.72 | $258/mo |
| Claude Fable 5.2 | Anthropic | $8.00 | $0.20 | $40.00 | $2.04 | $306/mo |
| Claude Mythos 5.2 | Anthropic | $8.00 | $0.20 | $40.00 | $2.04 | $306/mo |
| Claude Fable 5.1 | Anthropic | $10.00 | $0.25 | $50.00 | $2.55 | $382/mo |
| Claude Mythos 5.1 | Anthropic | $10.00 | $0.25 | $50.00 | $2.55 | $382/mo |
| Claude Mythos 5 | Anthropic | $10.00 | $1.00 | $50.00 | $3.44 | $516/mo |
| Claude Fable 5 | Anthropic | $10.00 | $1.00 | $50.00 | $3.44 | $516/mo |
| GPT-6 Luna | OpenAI | $0.10 | $0.01 | $0.50 | $0.03 | $5.16/mo |
| GPT-5.6 Luna | OpenAI | $0.20 | $0.02 | $1.20 | $0.07 | $10.67/mo |
| GPT-5.4 mini | OpenAI | $0.75 | $0.075 | $4.50 | $0.24 | $36.31/mo |
| GPT-6.1 Terra | OpenAI | $1.00 | $0.05 | $5.00 | $0.28 | $42.66/mo |
| GPT-6.2 Sol | OpenAI | $2.00 | $0.10 | $10.00 | $0.57 | $85.32/mo |
| GPT-6.1 Sol | OpenAI | $2.00 | $0.10 | $10.00 | $0.57 | $85.32/mo |
| GPT-5.2 | OpenAI | $1.75 | $0.175 | $14.00 | $0.61 | $91.03/mo |
| GPT-6 Sol | OpenAI | $2.00 | $0.20 | $10.00 | $0.69 | $103/mo |
| GPT-5.6 Terra | OpenAI | $2.00 | $0.20 | $12.00 | $0.71 | $107/mo |
| GPT-5.4 | OpenAI | $2.50 | $0.25 | $15.00 | $0.81 | $121/mo |
| GPT-5.6 Sol | OpenAI | $4.00 | $0.40 | $20.00 | $1.38 | $206/mo |
| GPT-5.5 | OpenAI | $5.00 | $0.50 | $30.00 | $1.61 | $242/mo |
| GPT-6.2 Astra | OpenAI | $8.00 | $0.40 | $40.00 | $2.28 | $341/mo |
| GPT-6.2 Astra Law | OpenAI | $8.00 | $0.40 | $40.00 | $2.28 | $341/mo |
| GPT-6 Astra | OpenAI | $10.00 | $1.00 | $50.00 | $3.44 | $516/mo |
| GPT-5.2 Pro * | OpenAI | $21.00 | — | $168.00 | $29.74 | $4,460/mo |
| GPT-5.5 Pro * | OpenAI | $30.00 | — | $180.00 | $41.76 | $6,264/mo |
| GPT-5.4 Pro * | OpenAI | $30.00 | — | $180.00 | $41.76 | $6,264/mo |
| Gemini 3.5 Flash Lite | Google (Gemini) | $0.30 | $0.03 | $2.50 | $0.11 | $15.79/mo |
| Gemini Flash Lite (latest) | Google (Gemini) | $0.30 | $0.03 | $2.50 | $0.11 | $15.79/mo |
| Gemini 3 Flash Preview | Google (Gemini) | $0.50 | $0.05 | $3.00 | $0.16 | $24.21/mo |
| Gemini 3.8 Flash | Google (Gemini) | $0.75 | $0.075 | $3.75 | $0.23 | $34.96/mo |
| Gemini Flash (latest) | Google (Gemini) | $0.75 | $0.075 | $3.75 | $0.23 | $34.96/mo |
| Gemini 3.6 Flash | Google (Gemini) | $0.75 | $0.075 | $3.75 | $0.23 | $34.96/mo |
| Gemini 4 Hydrogen | Google (Gemini) | $1.50 | $0.075 | $7.50 | $0.38 | $56.56/mo |
| Gemini 4 Carbon | Google (Gemini) | $2.00 | $0.10 | $10.00 | $0.50 | $75.42/mo |
| Gemini 4 Argon | Google (Gemini) | $2.00 | $0.10 | $10.00 | $0.50 | $75.42/mo |
| Gemini 3.1 Pro Preview | Google (Gemini) | $2.00 | $0.20 | $12.00 | $0.65 | $96.84/mo |
| Gemini Pro (latest) | Google (Gemini) | $2.00 | $0.20 | $12.00 | $0.65 | $96.84/mo |
| Gemini 4 Neon | Google (Gemini) | $3.00 | $0.15 | $15.00 | $0.75 | $113/mo |
| Genie 4 * | Google (Gemini) | $1.50 | — | $9.00 | $2.09 | $313/mo |
* No cached-input price in our data, so all input is billed at the full rate. The other 10% of input is billed at the model's cache-write price where it has one (Claude, and OpenAI models that charge for cache writes; 1.25x input), else at the normal input price. Thinking tokens are billed as output: raise output per call if your model thinks a lot. A tool's own fees are not included. Estimates from published per-token rates; check official pricing before budgeting. Data synced from the LiteLLM price list 2026-11-24 01:00 UTC.
How it is calculated
Call i sends starting context + i × tokens added, so total input per task is calls × start + added × calls × (calls − 1) / 2. The cache-hit share is billed at the cached-input price; with caching on, the rest of the input is billed at the model's cache-write price where our data has one (shown on each model page), else at the normal input price. 30 days per month.
FAQ
Why do agents cost more than chatbots?
Each step resends the whole growing context: instructions, tool definitions and every previous tool result. Input tokens therefore grow roughly with the square of the number of steps.
How do I make agents cheaper?
Enable prompt caching for the stable prefix, trim or summarize old tool results, cap the number of steps, and route easy steps to a smaller model.