Context window calculator
Paste the document, transcript or codebase excerpt you plan to send. Each model’s bar shows how much of its context window it would take.
Paste text to see how it fits.
| Model | Context used | Input cost |
|---|
Leave room for the answer
The context window holds the prompt and the reply together. A prompt that fills 95% of the window leaves almost nothing for the answer, and long answers get cut off.
As a working rule, keep input under about 75% of the window when you expect a long response.
Bigger is not always better
Models with million-token windows can read whole books, but recall of details in the middle of a very long context is weaker than near the start and end.
Long prompts also cost more on every call. Retrieving only the relevant passages is often cheaper and more accurate than sending everything.
| Window | Models | About this much English |
|---|---|---|
| 128K | GPT-4o | ~250 pages |
| 400K | GPT-5, GPT-5 mini | ~800 pages |
| 1M | Claude 5.5 (Haiku, Sonnet, Opus), Gemini 3.8 Flash and 3.1 Pro, DeepSeek Flash and Pro | ~2,000 pages |
| 1.05M | GPT-4.1, GPT-4.1 mini | ~2,100 pages |
Other AI setups
- OpenAI API cost calculator5 models
- Claude API cost calculatorHaiku · Sonnet · Opus
- Gemini API cost calculatorFlash · Pro
- DeepSeek API cost calculatorOff-peak rates
- Prompt caching savings calculatorCached vs uncached
- AI agent cost calculator20 turns
- Context window calculator
- Private token counter
Related
Questions
What is a context window?
The maximum number of tokens a model can consider in one request, counting both your input and its reply.
How many pages fit in 200K tokens?
Roughly 400 pages of plain English text, at about 500 tokens per page. Tables, code and non-English text fit fewer pages.
What happens if I exceed the context window?
The API rejects the request with an error. Shorten the input, split it, or switch to a model with a larger window.
Does output count toward the context window?
Yes. Input plus the generated reply must fit together, so leave headroom for the answer.