Context Window Calculator
See how much conversation, document, or code fits in a model's context window.
Pricing dataset updated Oct 12, 2026
1M total window · max output 66K tokens
Usable prompt tokens
996,000
- Approx. words
- 747,000
- Approx. pages
- 1,494
- Approx. lines of code
- 99,600
- Cost to fill once
- $0.299
Assumes ~0.75 words per token and ~10 tokens per line of code.
How it works
Reserve space for the response before filling a context window. Your input budget must cover instructions, message history, retrieved text, and tool results. The output reservation should also respect the selected model’s maximum output limit.
The word, page, and code-line figures are rough planning conversions, not file-size limits. This calculator subtracts the reservation from the listed window; it does not validate separate input limits or provider-specific context rules.
Worked example
Budgeting a document-review request
For an illustrative 128,000-token window with 8,000 reserved for output, the calculator leaves 120,000 input tokens. If instructions and conversation history use 6,000, only 114,000 remain for documents. At the tool’s 0.75 words per token and 500 words per page assumptions, that is roughly 171 pages. Count the assembled request with the provider’s tokenizer before sending it.
