AI token cost calculator
Price one workload across all 17 Claude and GPT models on sale, side by side: each row shows the provider's list price and the price through Kunavo, read live from the catalog, with cache hits, cache writes and reasoning tokens billed by each vendor's own rules. Below the calculator is what real coding-agent runs were billed. Free and without signup; paste a prompt to count its tokens first.
Your workload
Estimate for Claude Sonnet 5: Anthropic does not publish Claude's tokenizer, so this is OpenAI's o200k_base count. Anthropic's free count_tokens endpoint returns Claude's own number.Counted in your browser — nothing you paste leaves this page.
Rate: $1,40 in / $7,00 out · cache hit $0,1400 · cache write $1,75 — all per 1M tokens, read live from the Kunavo catalog.
Estimated cost
You save vs Anthropic list
$150/ month · ~30%
Pay as you go from $10, failed calls not billed. The dashboard opens with this model in a ready-to-run request.
Estimate only. Reasoning models bill hidden reasoning tokens at the output rate, so a reasoning workload costs more than the output box suggests. Cache writes are billed separately at $1,75 per 1M and are not in this figure — they are a one-off per cache entry, not per request. Failed requests are never billed.
Measured: one coding task, start to finish
Our own test on 10 paź 2026, not a customer's: the same small repo task — make a six-test unit suite pass, five of them failing at the start — run headless in two coding agents against Kunavo. "Cost" is the run at Kunavo's rates, read from our usage log; one OpenCode call was missing from that log and went uncharged, and it is counted here at the same rates.
| Client | Model | Model calls | Time | Input (cache read / write) | Output | Cost |
|---|---|---|---|---|---|---|
| OpenCode 1.18.35 | Claude Sonnet 5 | 5 | 3:03 | 53 077 (26 999 / 24 212) | 3976 | $0,0766 |
| Cline CLI 3.0.70 | Claude Sonnet 5 | 4 | 1:58 | 45 171 (30 855 / 14 181) | 5301 | $0,0664 |
| Cline CLI 3.0.70 | GPT-5.6 Terra | 6 | 1:01 | 49 835 (35 328 / 0) | 2298 | $0,0223 |
At these sizes, $10 pays for about 130–448 runs of this task.
Cache rules: Anthropic vs OpenAI
The same cached prefix is billed differently on the two protocols. Each row is read from the rates billing uses, and each ratio is a multiple of that model's own input rate on Kunavo.
| Vendor | Models | Cache hit | Cache write |
|---|---|---|---|
| Anthropic | Claude Fable 5, Claude Opus 5, Claude Opus 4.8, Claude Opus 4.7, Claude Opus 4.6, Claude Sonnet 5, Claude Sonnet 4.6, Claude Haiku 4.5 | ×0,1 | ×1,25 |
| Anthropic | Claude Fable 5.2, Claude Fable 5.1 | ×0,025 | ×1,25 |
| Anthropic | Claude Opus 5.5 | ×0,05 | ×1,25 |
| OpenAI | GPT-6 Astra, GPT-6 Sol, GPT-6 Luna, GPT-5.6 Sol, GPT-5.6 Terra | ×0,1 | ×1,25 |
| OpenAI | GPT-5.5 | ×0,1 | ×1 |
On both, reasoning tokens are billed at the output rate, including the ones the response does not show, so the output field wants billed output tokens rather than the length of the answer you see.
How caching works on each protocolEmbed this calculator on your site
Free to embed in a blog post or your docs. Prices follow Kunavo's live catalog, and links open kunavo.com in a new tab.
<iframe src="https://kunavo.com/pl/embed/llm-cost-calculator" title="AI token cost calculator" width="100%" height="760" style="border:0;border-radius:16px;max-width:720px" loading="lazy"></iframe>Pricing guides for each model family
Count a prompt, then price it
Cache hits at a tenth of input
Cached input and reasoning tokens
Haiku / Sonnet / Opus rates
GPT rates by model
One API for every model
Per-image pricing
Every model, vs official
More free tools
- Token counter
Paste text, get its token count, and see what it costs as input or output on every Claude and GPT model — counted in your browser.
- Claude token cost calculator
Claude rates with the cache maths the others leave out — cache hits at a tenth of input and cache writes at 1.25×, each at the model's own discount.
- AI video cost calculator
Per-clip and per-second video models priced as the different things they are — resolution, clip length and volume, each next to the provider's list price.
- AI image cost calculator
Every image model on the key, priced per image and per tier — one is flat across resolutions and the rest are not, so the cheapest model changes with the size you ship.
- OpenAI API pricing calculator
GPT rates including cached input at a tenth of the input rate, and what reasoning tokens do to an output-heavy bill.
How do you calculate the cost of LLM tokens?
LLM API cost is priced per million tokens, with input and output billed at different rates, so the cost of one request is (input tokens ÷ 1,000,000 × input rate) + (output tokens ÷ 1,000,000 × output rate). Output is typically several times more expensive than input, which is why a short prompt with a long answer can cost more than a long prompt with a short one. Monthly cost is that per-request figure multiplied by request volume, and cached input adds a third term at a fraction of the input rate.
Does this token cost calculator count tokens from text?
Yes. Paste a prompt or a document into the box above the inputs and it is counted in your browser with o200k_base, the tokenizer of OpenAI's GPT-4o and GPT-5 models; one click moves the count into the input or the output field. It is exact for the GPT models that tokenizer is confirmed for and an estimate for Claude and Gemini, and the note under the box says which applies to the model you picked. For traffic you already send, the usage field of your API responses is still the number you are billed for.
Is this token cost calculator free?
Yes. The token cost calculator is free, runs in the browser, and requires no signup or API key. Rates are read live from the Kunavo model catalog, and each model is shown next to its provider's published list price so the comparison is checkable against the provider's own pricing page.
Which LLM API is cheapest for my workload?
It depends on the input-to-output ratio, and that is the reason to compare rather than assume. A workload that ships long context and returns short answers is dominated by the input rate; a workload that generates long text is dominated by output, where the spread between tiers is widest. Set your own token counts above and read the monthly column — the cheapest model on a summarisation job is often not the cheapest on a chat job.
Why is my real API bill higher than the calculator says?
Three things a per-request estimate leaves out. Reasoning tokens are billed as output even though they never appear in the response. Cache writes are billed once per cache entry and sit outside the per-request figure. And retries are billed: a failed request that consumed tokens still counts. Agentic tools are the widest gap, because one user-visible task is many billed round trips.