← All toolsTools

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.

Quick presets

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

Per request$0,00350
Per month (Kunavo)$350
Per month at Anthropic list$500

You save vs Anthropic list

$150/ month · ~30%

Run this workload on Kunavo

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.

ClientModelModel callsTimeInput (cache read / write)OutputCost
OpenCode 1.18.35Claude Sonnet 553:0353 077 (26 999 / 24 212)3976$0,0766
Cline CLI 3.0.70Claude Sonnet 541:5845 171 (30 855 / 14 181)5301$0,0664
Cline CLI 3.0.70GPT-5.6 Terra61:0149 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.

VendorModelsCache hitCache write
AnthropicClaude 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
AnthropicClaude Fable 5.2, Claude Fable 5.1×0,025×1,25
AnthropicClaude Opus 5.5×0,05×1,25
OpenAIGPT-6 Astra, GPT-6 Sol, GPT-6 Luna, GPT-5.6 Sol, GPT-5.6 Terra×0,1×1,25
OpenAIGPT-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 protocol
Embed 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>
Go deeper

Pricing guides for each model family

Frequently asked questions

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.