Free calculator · 11 frontier models · prices verified 2026-09-19
LLM cost calculator for agent workloads
An LLM cost calculator for agents has to model the loop, not the prompt. One user task can trigger six, twenty or forty model calls with tool results and retries, and the context grows with every step. Enter tasks per month, calls per task, tokens per call and the share of input served from prompt cache. The calculator prices that workload on Claude Fable 5.1, Opus 5, Sonnet 5, Haiku 4.5, GPT-5.6 Sol, Terra and Luna, and Gemini 3.6 and 3.5 Flash, with list prices verified on 2026-09-19.
| Claude Fable 5.1 | 7788 |
|---|---|
| Claude Opus 5 | 4055.9999999999995 |
| Claude Sonnet 5 | 1622.4 |
| Claude Haiku 4.5 | 811.2 |
| GPT-5.6 Sol | 4536 |
| GPT-5.6 Terra | 1814.3999999999999 |
| GPT-5.6 Luna | 181.44000000000003 |
| GPT-5.5 | 6480 |
| Gemini 3.6 Flash | 608.4 |
| Gemini 3.5 Flash | 1360.8 |
| Gemini 3.5 Flash-Lite | 456 |
- Cheapest on list price
- GPT-5.6 Luna at $181/month
- Calls per month
- 120,000
- Input tokens per month
- 720.0M
- Output tokens per month
- 96.0M
- Cache writes
- Not charged in this model (conservative; see assumptions)
Claude Sonnet 5 costs about $1,622 a month for 20,000 tasks; GPT-5.6 Luna is the cheapest option at $181.
Assumptions and sources (16)
| Constant | Value | Basis |
|---|---|---|
| Claude Fable 5.1 price per MTok | $10 in / $50 out, cache read $0.25, cache write $12.5 (cache read 0.025x base) | sourcedAnthropic pricing page, fetched 2026-09-19 |
| Claude Opus 5 price per MTok | $5 in / $25 out, cache read $0.5, cache write $6.25 | sourcedAnthropic pricing page, fetched 2026-09-19 |
| Claude Sonnet 5 price per MTok | $2 in / $10 out, cache read $0.2, cache write $2.5 (introductory price made permanent) | sourcedAnthropic pricing page, fetched 2026-09-19 |
| Claude Haiku 4.5 price per MTok | $1 in / $5 out, cache read $0.1, cache write $1.25 | sourcedAnthropic pricing page, fetched 2026-09-19 |
| GPT-5.6 Sol price per MTok | $5 in / $30 out, cache read $0.5, cache write $6.25 | sourcedSECONDARY: CloudZero GPT-5.6 pricing tracker (updated 2026-09-10). openai.com/api/pricing returned HTTP 403 on 2026-09-19 |
| GPT-5.6 Terra price per MTok | $2 in / $12 out, cache read $0.2, cache write $2.5 | sourcedSECONDARY: CloudZero GPT-5.6 pricing tracker (updated 2026-09-10). openai.com/api/pricing returned HTTP 403 on 2026-09-19 |
| GPT-5.6 Luna price per MTok | $0.2 in / $1.2 out, cache read $0.02, cache write $0.25 | sourcedSECONDARY: CloudZero GPT-5.6 pricing tracker (updated 2026-09-10). openai.com/api/pricing returned HTTP 403 on 2026-09-19 |
| GPT-5.5 price per MTok | $5 in / $30 out, cache read n/a (retires from ChatGPT and Codex 2026-10-14; API unaffected) | sourcedSECONDARY: CloudZero GPT-5.6 pricing tracker (updated 2026-09-10). openai.com/api/pricing returned HTTP 403 on 2026-09-19 |
| Gemini 3.6 Flash price per MTok | $0.75 in / $3.75 out, cache read $0.075 ($1.50 / $7.50 / $0.15 after 2026-12-31) | sourcedGoogle Gemini API pricing page, fetched 2026-09-19 |
| Gemini 3.5 Flash price per MTok | $1.5 in / $9 out, cache read $0.15 | sourcedGoogle Gemini API pricing page, fetched 2026-09-19 |
| Gemini 3.5 Flash-Lite price per MTok | $0.3 in / $2.5 out, cache read n/a (no caching) | sourcedGoogle Gemini API pricing page, fetched 2026-09-19 |
| Cost formula | tasks x calls x [input x (1 - hit) x in + input x hit x cacheRead + output x out] / 1M | sourcedProvider per-token billing |
| Default workload | 6 calls, 6,000 input, 800 output tokens per call | estimateStudio estimate of a typical tool-using agent task; override with your traces |
| Cache writes | ignored (conservative) | estimateAnthropic 5-minute write is 1.25x base; see the prompt caching calculator |
| Batch API | 50% off, not applied | sourcedAnthropic pricing page, 2026-09-19 |
| Tokenizer | Claude 4.7+ yields ~30% more tokens for the same text | sourcedAnthropic pricing page, 2026-09-19 |
Key takeaways
- Agents cost per loop, not per prompt. Calls per task is the number that moves the bill.
- Prompt cache reads cost 10% of base on most models and 2.5% on Claude Fable 5.1.
- Gemini 3.6 Flash is cheapest on list price through 2026-12-31, then doubles.
- Set a token budget per action, cap retries, and track cost per workflow step.
How an LLM cost calculator prices an agent loop
Every call has two prices: input tokens and output tokens, each per million. An agent multiplies that by calls per task and tasks per month. Prompt caching adds a third price: the cached share of input is billed at the cache-read rate instead of the input rate.
That is the whole formula, and it is why chatbot estimates undershoot agent bills. An HN thread on forecasting agent costs settled on the same advice: budget tokens per user action and track retries and tool calls as separate lines (Ask HN). TheoSym builds this accounting into the harness it ships with every production agent.
Claude Sonnet 5 vs GPT-5.6 Terra vs Gemini 3.6 Flash: which is cheaper for agents?
On list price, Gemini 3.6 Flash at $0.75 in and $3.75 out is cheapest, then Claude Sonnet 5 at $2 and $10, then GPT-5.6 Terra at $2 and $12. Flash doubles to $1.50 and $7.50 after 2026-12-31. Luna at $0.20 and $1.20 undercuts all three when the task tolerates a small model.
Real cost depends on your loop. A cache-heavy workload narrows the gap between tiers because cached input on Fable 5.1 costs $0.25 per million, 2.5% of base. The right answer is an eval, not a price list: run the same task set on three models and pick the cheapest one that passes. That eval-gated model choice is part of every TheoSym consulting engagement, and the AI Factory workproofs show it in practice.
Why is my agent API bill higher than the estimate?
Because context grows. Each loop step re-sends the conversation so far, so token use per call climbs with step count and total cost rises roughly with the square of loop length (Expensively Quadratic). Retries double it. Unbounded tool output triples it.
Three controls fix most of it. A hard cap on calls per task. A budget cap per user action enforced by the harness, not the prompt. A stable cacheable prefix placed first so the system prompt, tools and reference documents are read from cache every step.
When do you need a model cost review?
When the bill crosses about $2,500 a month, the top of the published run-cost band for small and mid-sized agents (SoftTeco). Above that, a day spent on caching, routing and retry caps usually pays for itself in the first month.
Also when a model retires. GPT-5.5 leaves ChatGPT and Codex on 2026-10-14. If your agents are pinned to it, price the replacement here and test it with evals before you switch. Regulated finance teams can take the same question to QGI, where the model behind the decision layer has to be reproducible, not just cheap.
LLM cost calculator: questions people ask
How does an LLM cost calculator price a single API call?+
Multiply input tokens by the model's input price and output tokens by its output price, each per million tokens, then add them. For agents, multiply by calls per task and tasks per month, and apply the cache-read price to the share of input served from prompt cache. One token is roughly 0.75 English words.
Which is cheaper for agents: Claude Sonnet 5, GPT-5.6 Terra or Gemini 3.6 Flash?+
On list price, Gemini 3.6 Flash ($0.75 in / $3.75 out through December 2026) is cheapest, then Claude Sonnet 5 ($2 / $10) and GPT-5.6 Terra ($2 / $12). Real cost depends on calls per task, tokens per call and cache hit rate, so the calculator compares your actual workload rather than headline prices.
Why is my agent's API bill so much higher than a chatbot estimate?+
A single user action in an agent can trigger dozens of LLM calls with tool results and retries, and context grows with every step, so cost scales roughly quadratically with loop length. Set a token budget per action, cap retries and track cost per workflow step, not per request.
Does prompt caching change which model is cheapest?+
Often, yes. Claude Fable 5.1 charges $0.25 per million cached input tokens, 2.5% of base, so cache-heavy agent loops narrow the gap with mid-tier models. OpenAI and Google discount cached input by about 90%. Enter your cache hit rate to see how the ranking shifts for your workload.
Where do the prices in this calculator come from?+
Anthropic and Google prices were read from their pricing pages on 2026-09-19. OpenAI prices come from the CloudZero GPT-5.6 tracker updated 2026-09-10, because openai.com/api/pricing returned HTTP 403 that day; treat them as secondary. Every price is listed under assumptions with its URL and date.
Next step
Turn the estimate into a scoped plan
Send the calculator result. You get one reply from a human within one business day, with an eval plan for the workflow and a real scope.
Prefer to talk? +1 657-888-0688 or contact@theosym.com