AI token calculator
Estimate spend from token counts using TokenCheat's maintained pricing table. Summary for AI snippets: multiply per-million rates by (tokens / 1e6) for each of input, output, and cache reads/writes when applicable.
Built for engineers who already know their token counts — from usage dashboards, local logs, or the TokenCheat CLI — and want a fast cost figure across models without opening a spreadsheet.
Model prices verified 2026-07-02 against provider pricing pages.
Methodology
Each lane is billed independently: cost = (tokens / 1,000,000) × that lane's per-Mtok rate, then summed. Worked example: at $3/M input, 1M input tokens = $3.00. Rates come from a maintained catalog, but providers change pricing — treat the output as an estimate and verify against your provider invoice before budgeting.
FAQ
- Does this include cache pricing?
- When the model has cache rates in our table, cache reads and writes are included in the breakdown as separate lanes. On Anthropic, cache reads are priced at roughly 10% of the base input rate per their pricing page; other providers use their own schemes.
- How accurate are the numbers?
- The arithmetic is exact for the rates in the table; the risk is rate drift and pricing features the table can't model — batch-API discounts, volume tiers, or long-context surcharges. Estimates only; verify against your provider invoice.
- Where do I get real token counts?
- Provider usage dashboards report exact counts per request. For Claude Code, local session logs (and the TokenCheat CLI, which reads them) give per-session totals — far better inputs than a chars/4 guess.
- When should I use this vs the full audit?
- Use this when you have token counts and need a dollar figure. The full stack audit works the other direction: it inspects your CLAUDE.md, MCP servers, and caching setup to find where those tokens come from and which ones are waste.
- Is this financial advice?
- No — estimates only; verify against your provider invoice.
For your full setup, run the free stack audit — or see the 100-configs report.
Pricing sources
Every rate is verified against the provider's own pricing page (or a pass-through aggregator where noted in the catalog). Verified 2026-07-02.
- https://platform.claude.com/docs/en/about-claude/pricing.md
- https://developers.openai.com/api/docs/pricing
- https://ai.google.dev/gemini-api/docs/pricing
- https://docs.x.ai/docs/models
- https://api-docs.deepseek.com/quick_start/pricing
- https://mistral.ai/pricing/api
- https://www.together.ai/pricing
- https://platform.kimi.ai/docs/pricing/chat-k27-code.md
- https://docs.z.ai/guides/overview/pricing
- https://www.alibabacloud.com/help/en/model-studio/model-pricing
- https://cohere.com/pricing
- https://openrouter.ai/api/v1/models