Will your prompt fit in Claude's context window?

Paste a prompt, document, or transcript to estimate its token count and see how much of the context window it uses — with headroom left for Claude's reply.

0 tokens
0Characters
0Words
0Usable budget
0Tokens left

How the estimate works

Large language models don't read characters or words — they read tokens, sub-word chunks produced by a tokenizer. Claude's context window is the hard ceiling on tokens in a single request: it counts everything you send (system prompt, conversation history, documents, tool definitions) plus the tokens Claude generates in reply. If the total exceeds the window, the request is rejected, so you have to leave room for the answer.

This checker estimates tokens with a blended heuristic instead of a single fixed ratio. For English prose roughly one token spans about four characters, while denser inputs (code, JSON, non-English text) pack more tokens per character. The tool computes two independent estimates and takes the larger so it errs toward caution:

estimate = max( characters / 3.8 , words / 0.75 )

The character term (÷3.8) captures dense, punctuation-heavy text; the word term (words ÷ 0.75, i.e. ×1.33) reflects that an average English word is a little over one token. Whichever yields more tokens wins, then the value is rounded up. Usable budget is the selected window minus the tokens you reserve for Claude's response, and the bar fills against that usable budget — not the raw window — so "100%" means you've run out of room for both prompt and reply.

This is an approximation, typically within 10–15% of reality. For an exact, billable count, use Anthropic's count_tokens endpoint, which runs the real tokenizer for the specific model you're calling. Note that token counts differ slightly between model families: a 1M-token window on Opus 4.8 is far more forgiving than a 200K window on Haiku 4.5, and the same text can tokenize differently across versions. Use the model selector above to check against the window you'll actually deploy on.

Related Tools