AI Token Counter & Cost Calculator

Paste any prompt or document and instantly compare token counts, context window usage, and per-run cost across GPT, Claude, Gemini, Llama, and DeepSeek. Runs entirely in your browser — nothing is uploaded.

Loading calculator…

Frequently asked questions

What is a token in AI pricing?

A token is the unit every major provider actually bills by — roughly 3-4 characters of English text, or about three-quarters of a word. Pricing is split into input tokens (what you send) and output tokens (what the model generates back), and output is almost always priced several times higher than input.

How accurate are AI token counters?

GPT-4o, GPT-4.1 and GPT-4o mini use OpenAI's real o200k_base tokenizer, loaded directly in your browser, so those counts are exact. Claude, Gemini, Llama and DeepSeek don't publish a free client-side tokenizer, so their counts are estimated from a characters-per-token ratio tuned per provider, typically within a few percent of the real count.

Why is Claude or Gemini's token count different from GPT's for the same text?

Each provider trains its own tokenizer on its own data, so identical text splits into a different number of tokens depending on the model. That's also why a prompt that comfortably fits one model's context window can fail in another's.

Why does output always cost more than input?

Generating text is more computationally expensive than reading it, so every provider prices output tokens higher than input, typically 3-5x.

What is the "context window," and what happens if my prompt exceeds it?

The context window is the maximum number of tokens a model can hold in a single request — your prompt plus its reply. Go over it and the request fails outright or gets truncated, rather than just costing more.

How does the multi-turn / chatbot cost modeling work?

Real chatbots resend the entire conversation history on every turn, so cost compounds as a conversation gets longer — a single per-run number badly understates this. Modeling this turn-by-turn and summing it gives a true cost-per-conversation figure, optionally accounting for prompt caching.

Does this tool send my prompt or document anywhere?

No. Tokenizing and cost calculation both run entirely in your browser using JavaScript — nothing you paste is uploaded, stored, or transmitted anywhere, including to us.

Is the pricing always up to date?

Pricing is entered manually from each provider's published rate card and reviewed periodically. Providers change prices without much notice, so confirm current rates on the provider's own site before relying on this for budgeting a production workload.