Tools
LLM cost calculator
A token cost calculator built for agents. Pick a model, describe one step of the workload, and see what a run costs — and what it costs every month when the agent runs all day. Cache-read and batch pricing included.
in $3 / out $15 per MTok · cached $0.3 · 1M ctx
Fresh prompt tokens sent each step
Tokens the model generates each step
Prompt tokens read from cache
LLM calls in one agent run
Agent runs across a day
- Above 200,000 tokens of context this model charges $6 input / $22.5 output per MTok; the estimate uses the base tier.
Prices synced Oct 28, 2026 from pydantic/genai-prices (MIT). Estimates only — your provider invoice is the source of truth.
The math behind the estimate
Every model has a published price per million tokens (MTok): one for input, one for output, and usually a cheaper one for prompt tokens read from cache. A run costs:
(input × in-price + cached × cache-price + output × out-price) ÷ 1M × steps
Multiply by runs per day for the daily cost, and by 30 for the monthly cost. The calculator applies cache-read prices automatically and supports approximate batch discounts where providers publish them.
Frequently asked questions
How does this LLM cost calculator work?
Pick a model and describe one step of your workload: input tokens, output tokens, and cached prompt tokens. Multiply the per-step price by your steps per run, then by runs per day. The calculator shows cost per run, per day, and per month (30 days), using each model's published USD price per million tokens.
What are cached tokens, and why do they matter for agents?
Agents resend large parts of their prompt every step. Providers such as Anthropic, OpenAI, and Google charge far less for prompt tokens read from a cache than for fresh input. Enter your cached token count per step and the calculator applies the model's cache-read price where one is published.
Does the calculator include batch API discounts?
Yes, as an optional toggle. Where the dataset publishes exact batch prices (about a hundred models from OpenAI, Google, Anthropic, Mistral, Grok, and xAI), the calculator uses them. For other models from OpenAI, Anthropic, and Google it applies an approximate 50 percent discount, and the toggle is hidden for providers without a known batch program.
How current are the prices?
Prices sync weekly from pydantic/genai-prices, an MIT-licensed dataset that aggregates LiteLLM, OpenRouter, and Helicone price lists. The page always shows the date of the last sync. Model prices change often, so treat every number as an estimate.
Why does my actual bill differ from the estimate?
Providers bill exact token counts, which differ from your estimates. Some models use tiered pricing above a context threshold, gateways add their own markup, and taxes or free credits can change the total. Use this calculator for planning, and your provider invoice for the truth.
Price data from pydantic/genai-prices (MIT), which aggregates LiteLLM, OpenRouter, and Helicone price lists. Built for agent workloads — for more on taming agent costs, see the writing on this site.