Token Counter and Context Budget

Paste text to see roughly how many tokens it is, how much of each model's context window it fills, what one call costs, and how many more turns of that size still fit. The text never leaves your browser.

Context budget

Model Context This text Turns that still fit One call
Claude Opus 5 Anthropic 1000k
0%
Claude Sonnet 5 Anthropic 1000k
0%
Claude Haiku 4.5 Anthropic 200k
0%
DeepSeek V4 Pro DeepSeek 1000k
0%
DeepSeek V4 Flash DeepSeek 1000k
0%
Gemini 3.7 Flash Google 1049k
0%
Gemini 3.5 Flash Lite Google 1049k
0%
GPT-5.6 Sol OpenAI 1050k
0%

"Turns that still fit" = remaining context ÷ this length, holding back 4k tokens for the answer.

Per-call cost assumes this text as input plus an 800-token answer, at uncached input rates.

For an exact count use the vendor tokenizer endpoint; this is a range, meant for budgeting rather than reconciliation.

Why not run a real tokenizer

A real BPE tokenizer is 1–2 MB of vocabulary per model family, and all of it has to arrive before the first number can appear — for a few percent of accuracy. So this estimates by script, which is where the variance actually lives:

  • Latin text: BPE merges common English down to about 4 characters per token.
  • CJK text: no whitespace to merge on. Common characters are usually one token; rarer ones fall back to 2–3 UTF-8 bytes. This uses 1.3 tokens per character, with a 1.0–1.7 range.
  • Whitespace and punctuation mostly merge into neighbouring tokens and are not counted separately.

That is why the figure above is a range rather than a single number. It is accurate enough to budget with and to answer "will this fit"; when you need the exact count — reconciling an invoice, or sitting right at a hard context limit — use the vendor's tokenizer endpoint. An estimate that is honest about its error bars is worth more than a precise-looking wrong one.

The "turns that still fit" column holds back 4k tokens for the model's answer. Filling a context window to 100% is a common production failure: nothing errors, the model just starts losing the earliest content.

Related reading