Free · Private · No signup

AI Token & API Cost Calculator

Turn tokens into an operating budget. Compare input, cache, output, volume, and context usage across leading models—or enter your own rates.

Pricing checked

August 9, 2026

Against official provider documentation. Prices change; verify before procurement.

The formula

Simple math. Messy reality.

The calculator keeps the arithmetic inspectable and calls out costs that do not fit a basic token formula.

((input × input rate) + (cached × cache rate) + (output × output rate)) ÷ 1,000,000 × requests
~4

characters per estimated token

3

separate billing lanes

0

text sent to our server

Provider tokenizers differ. System instructions, conversation history, schemas, retrieved documents, reasoning, long-context tiers, caching storage, batch discounts, tools, media, and taxes can change the final invoice.

Official pricing sources

What the comparison uses

Claude Sonnet 5: Introductory price through August 31, 2026; verify before budgeting beyond that date.

Questions people ask

Token cost FAQ

How many tokens are in a word?

For typical English prose, one token is often about three-quarters of a word, but code, punctuation, languages, and each provider's tokenizer change the result. This calculator uses characters only for a clearly labeled estimate; enter API-reported usage for exact billing.

How is LLM API cost calculated?

Multiply uncached input, cached input, and output token counts by their respective per-million-token prices, add the three costs, then multiply by request volume.

Do reasoning tokens count toward API cost?

They can. Providers may bill hidden or visible reasoning tokens as output tokens. Use the total billed output reported by your provider rather than only the words visible to the user.

Does this include tool calls, images, audio, or web search?

No. Those can use separate token rates or per-call charges. The calculator focuses on standard text token costs and explicitly excludes add-on charges.