AI Context Window Calculator
Pick a model — GPT, Claude, Gemini, Llama or DeepSeek — enter your text in words, pages, code lines or tokens, and instantly see whether it fits the context window, what percentage it uses, and how many tokens are left for the reply. No signup, sources cited.
How it works
A model's context windowis the maximum number of tokens it can hold at once — your prompt, any documents or conversation history, and the reply all share that budget. This calculator answers one question: does your input fit the model you picked, and how much room is left? It does this in five steps, using the vendors' own documented averages.
- Estimate your input in tokens.OpenAI's guidance is that one token is about four characters, or roughly three-quarters of an English word (100 tokens ≈ 75 words). So words convert with
tokens = words ÷ 0.75, characters withtokens = characters ÷ 4(3.5 for Claude, 3.3 for code), an A4 page at ~500 words (≈ 667 tokens), and a line of code at about 10 tokens. - Read the model's window.Each window — GPT-4o's 128K, Claude's 200K, Gemini 2.5 Pro's 1M — is a vendor-published figure stored in this tool with a verification date.
- Compute usage. The percentage used is
input ÷ window. The verdict is Fits when input plus your reserved reply stay inside the window, Tight when the input fits but leaves no room for the reserved reply, and Too large when the input alone overflows the window. - Show the remaining budget.
remaining = window − input − reserved, converted back to words (× 0.75) and A4 pages (÷ 667) so the number means something. - Estimate conversation length. Given a system prompt and an average tokens-per-turn, the tool reports
floor((window − system) ÷ avgTurn)— how many back-and-forth turns fit before the oldest messages must be dropped.
Every ratio is an average: real tokenisation depends on the model, the language and the exact text. When you need an exact count of specific text rather than a capacity estimate, use the AI Token Counter. For a plain words-to-tokens conversion, see the Tokens to Words converter, and for pricing and specs across models, the AI Model Comparison.
Worked examples
Frequently asked questions
Sources & references
- OpenAI Help Center — What are tokens and how to count them (1 token ≈ 4 chars ≈ 0.75 words)
- OpenAI — Models & context length
- Anthropic — Models overview (Claude 200K context window)
- Anthropic — Glossary & token counting (~3.5 chars per token)
- Google — Gemini long context (1M+ token windows)
- Google — Gemini models & context lengths
The model windows and token ratios on this page were last cross-checked against these sources on 2026-06-09. Vendor-published windows and ratios are averages; exact token counts depend on each model's tokeniser. Open-model windows (Llama, DeepSeek, Mistral) change per release and are stated as the value verified on that date.
Related tools
Comments & feedback
Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.
Found a bug, edge case, or want a model added?
Email me at [email protected] — most fixes ship within 24 hours.