Free tool · no sign-up

LLM Context Window Calculator: how much of the window you can actually use

A 300-page English report is about 199,500 tokens. It does not fit a 200K-token model once you reserve 8K for the answer, 2K for the system prompt and 2K for a safety margin — usable input is 188,000. It fits a 1M-token model with roughly 837,000 tokens to spare.

Your document

See plans

Reserved output is the max_tokens you set, not the model's maximum output. Token counts are estimates unless you use the provider's own tokenizer.

Result Estimated

A 300-page report is about 199,500 tokens after 8,000 output, 2,000 system, 0 tool and 2,000 margin tokens. It fits 6 of 10 listed models; the cheapest that fits is DeepSeek V4 Flash at $0.03 to send once.

List prices in USD per 1M tokens, retrieved 19 Nov 2026 from models.dev. Context limits and prices change; verify current values with each provider before committing budget.

Page equivalents assume 500 words per page and the token-per-word rate you selected.

Fit by model

Default scenario: 300 pages, 500 words/page, 1.33 tokens/word, 8K output reserve, 2K system, 0 tools, 2K margin. Limits and list prices 19 Nov 2026.
ModelContextUsable inputFitSpare / overCost once
GPT-5.61,050,0001,038,000Fits838,500 spare$0.80
Claude Sonnet 4.5200,000188,000Does not fit11,500 over$0.60
Gemini 3 Flash1,048,5761,036,576Fits837,076 spare$0.10
DeepSeek V4 Flash1,048,5761,036,576Fits837,076 spare$0.03
Llama 3.3 70B (Groq)131,072119,072Does not fit80,428 over$0.12
Mistral Large 4.0.81,048,5761,036,576Fits837,076 spare$0.14

“Usable input” subtracts the output reserve, system prompt, tool schemas and safety margin from the total context window. The cheapest row is not automatically the right row: a model that fails your evaluation is not cheap at any price.

The number on the spec sheet is not the number you can use

A model's context window is the total token budget for one request: system prompt, tool definitions, retrieved documents, conversation history, the user message and the generated answer. It is not an input allowance. If a model advertises 200,000 tokens and you send 199,000 tokens of input, the request fails or the answer is truncated, because there is almost no room left to generate anything.

The usable input is therefore:

usable input = context window − reserved output − system prompt − tool schemas − safety margin

This page computes that number per model, then compares it with your document. It is the calculation practitioners get wrong most often, and it is the reason a 300-page report “fits” a 200K model on a token-count page and then fails in production.

Why the reserve matters more than the window

The reserve is the max_tokens you set, not the model's maximum output. A model that can generate 64,000 tokens does not require you to reserve 64,000 on every call. If your answers average 800 tokens, reserving 8,000 gives you a 10× cushion without giving up 56,000 tokens of input capacity.

Reserve too little and the answer truncates mid-sentence. Reserve the full model maximum and you waste most of the window. The right reserve is the p95 completion length plus headroom, and it should be a configuration value, not a guess.

Three other budgets come out of the window before your document does:

On a 200K model with an 8K output reserve, a 2K system prompt and a 2K margin, usable input is 188,000 tokens. That is a 6% haircut. On a 32K model, the same reserve and prompt leave 20,000 — a 37.5% haircut. Small windows lose proportionally more, which is why “it fits in 32K” is usually false once the scaffolding is counted.

How many tokens is a page?

For English prose, the working approximation is one token per four characters, or about 0.75 words per token. That gives 1.33 tokens per word and roughly 665 tokens for a 500-word page.

Document size to token estimate, at 500 words per page and 1.33 tokens per word.
DocumentWordsEstimated tokensFits 188K usable?Fits 1.03M usable?
1 page500665YesYes
10 pages5,0006,650YesYes
50 pages25,00033,250YesYes
150 pages75,00099,750YesYes
300 pages150,000199,500No — 11,500 overYes
500 pages250,000332,500No — 144,500 overYes
1,000 pages500,000665,000NoYes, with 371,000 to spare

Assumes 500 words per page and 1.33 tokens per word. Tables, code, footnotes, headers and page numbers all add tokens that a word count misses.

The estimate is good for planning and bad for billing. Prose varies by ±10–15% depending on vocabulary, punctuation and formatting. Code is denser: JSON, YAML and source code often run closer to three characters per token, so a 100 KB JSON file is nearer 33,000 tokens than 25,000. Chinese, Japanese and Korean text can exceed one token per character on some tokenizers. Do not apply the English ratio to a multilingual corpus. The calculator exposes the tokens-per-word rate so you can switch to a code or mixed-text assumption.

Estimate versus exact: use the right tokenizer

There are three levels of accuracy, and the page labels which one produced the number:

Level 1 — character heuristic. tokens ≈ characters ÷ 4. Fast, works offline, error ±10–20% on English prose, worse on code and non-Latin scripts. Use it for a first pass only.

Level 2 — family tokenizer. OpenAI publishes tiktoken with the o200k_base and cl100k_base encodings; running the right encoding locally gives an exact count for OpenAI models. For open-weight models, the Hugging Face tokenizer that ships with the model is exact. Encodings and model mappings change, so confirm the mapping against the provider's current documentation.

Level 3 — provider endpoint. Anthropic exposes a token-counting endpoint, and Google exposes countTokens for Gemini. These are the only counts that reflect the provider's current tokenizer, including any special tokens. Endpoint names, versions and rate limits change, so check the provider's API reference before wiring one into a production check.

This calculator is Level 1: it shows an estimate and says so. Never treat an estimate as an exact count when the cost of being wrong is a failed request.

Worked example: the 300-page report

Take a 150,000-word report, 500 words per page, English prose. At 1.33 tokens per word it is 199,500 tokens.

One-pass fit and input cost for a 199,500-token document, before caching or batch.
ModelContextUsable after 8K output, 2K system, 2K marginFits?Spare / overInput cost once
GPT-5.61,050,0001,038,000Yes838,500 spare$0.80
Claude Sonnet 4.5200,000188,000No11,500 over$0.60
Gemini 3 Flash1,048,5761,036,576Yes837,076 spare$0.10
DeepSeek V4 Flash1,048,5761,036,576Yes837,076 spare$0.03
Llama 3.3 70B (Groq)131,072119,072No80,428 over$0.12
Mistral Large 4.0.81,048,5761,036,576Yes837,076 spare$0.14

Input prices are list values retrieved 19 Nov 2026. Cost is one pass over the document at the standard input rate, before caching or batch.

The Claude row is the useful one. 199,500 tokens looks like it fits a 200K window. After reserving output and prompt overhead it does not, and the overage is only 11,500 tokens — about 17 pages. The fix is not necessarily a bigger model. Summarise the first 20 pages, or split the report into two calls and merge the summaries, and the same model works.

The Llama row shows the other failure mode: the window is genuinely too small, and no amount of prompt trimming closes an 80K gap. Route that document to a long-context model.

Long context is not free, and it is not uniformly good

Three costs hide behind a large window.

Price tiers. Some providers charge a higher per-token rate above a context threshold. GPT-5.6's catalogue entry, for example, lists a higher tier above 272,000 tokens, with input priced at twice the base rate. A prompt at 280K tokens can therefore cost twice as much for input as the same prompt at 260K. Check the provider's current price sheet and show the tier boundary on the result, not just the total.

Attention quality. Longer context does not mean equally reliable recall. The “Lost in the Middle” study found that language models use information at the beginning and end of a long context more reliably than information in the middle, with performance sometimes falling below a closed-book baseline when the relevant passage sits in the centre (Liu et al., arXiv:2307.03172). The practical implication: putting a document in a 1M window is not the same as putting the relevant section in the prompt. Retrieve the right 20 pages before you send 300.

Latency. Time to first token generally rises with input length, which matters for interactive products even when the price is acceptable.

Output reservation, truncation and the “it fits but the answer is cut off” bug

The most common production failure is not a context overflow. It is a finish reason of length: the model hit max_tokens and stopped mid-answer. That happens when the input fits but the output reserve is too small.

The check is simple:

input_tokens + max_tokens ≤ context window

Not input_tokens ≤ context window. If your prompt is 195,000 tokens on a 200K model and max_tokens is 8,000, the request is invalid before it starts. Some APIs reject it; others silently truncate the input or the output. Neither behaviour is obvious from the response body, which is why this belongs on a calculator page rather than in a docs footnote. The fit table flags any reserve that exceeds the model's published maximum output rather than pretending the request is valid.

RAG: chunking changes the arithmetic

For retrieval-augmented generation, the question is not “does the document fit?” but “how many chunks fit alongside the answer?”

usable_context = context − output_reserve − system − tools − margin
chunks_per_query = floor(usable_context / (chunk_size + chunk_overlap))

A 200K model with 188K usable, 800-token chunks and 120-token overlap fits 204 chunks per query. That is far more than any retriever should send. The binding constraint is usually relevance, not space: 10–20 chunks is a common working range, and adding more raises cost and the chance of middle-of-context loss.

Use the RAG chunk size calculator for the chunk-size decision, then this page for the fit check. They answer different questions. If the document does not fit, the calculator also reports how many usable chunks you would need — a quick signal that summarisation or retrieval is cheaper than a bigger model.

Which window do you actually need?

Typical input size and the context window to target, with a 20% margin.
WorkloadTypical inputWindow to targetWhy
Chat with short history2K–8K32KRoom for 20 turns plus a system prompt
Support bot with RAG8K–20K64KRetrieved chunks plus conversation
Single-document Q&A50K–150K200KOne report, one answer
Whole-repository code review200K–800K1MMany files plus diffs
Multi-document analysis300K–900K1MSeveral reports in one pass
Batch summarisation5K–30K per item32K–128KThroughput matters more than window

Buy the smallest window that fits your p95 workload with a 20% margin. A larger window costs more per token on some providers, adds latency and encourages prompts that should have been retrieval.

Download the dataset

The context and price rows behind this page are available as CSV and JSON, with source and verification dates. CC BY 4.0. Limits change; the date is part of the data.

Download CSV · Download JSON

Methodology and data notes

Context limits, maximum output and list prices were retrieved from the models.dev catalogue on 19 November 2026. Token estimates use 1.33 tokens per word for English prose, the standard 0.75-words-per-token approximation; switch the rate for code, mixed text or CJK. Exact counts require a native tokenizer, and the page labels the estimate rather than presenting it as exact.

The calculator subtracts output reservation, system prompt, tool schemas and safety margin from each model's context window. It does not assume the advertised window is usable input. Cost is one pass at the standard input rate and excludes output, caching, batch discounts, retries, reasoning tokens, long-context tiers, storage, egress and gateway fees.

Related: LLM API cost calculator · token calculator · tokens-to-pages converter · embedding model comparison · all models · plans and caps.

FAQ

Does a 200K context window hold 200K tokens of input?

No. The window is shared with the output. With an 8K max_tokens, a 2K system prompt and a 2K safety margin, usable input on a 200K model is 188,000 tokens. Reserve output before you assume a document fits.

How many pages fit in a 200K context window?

About 282 pages of 500-word English prose fit once an 8K output reserve, 2K system prompt and 2K margin leave 188,000 usable tokens. The raw 200K window is about 300 pages, so the advertised number overstates capacity by roughly 18 pages.

Why did my request fail when the token count was under the limit?

Two common reasons: the output reserve was too small, so input + max_tokens exceeded the window; or the token count came from a different tokenizer than the provider's. Both are visible in the fit table. A third reason is a long-context price tier or a per-request input cap that is lower than the model's advertised window.

Does a bigger context window mean better recall?

No. Long-context models can lose accuracy for information in the middle of a long prompt. The “Lost in the Middle” study found performance is highest when relevant information sits at the start or end of the context. Retrieve the relevant section rather than sending the whole document when accuracy matters.

Want one API and a fixed bill for long-document work?

Plugsky routes to long-context models through an OpenAI-compatible API. Plans start at $8/month; Builder is $60/month with unlimited fair use and a 7-day money-back guarantee. Check the caps against your document size first.

See plans and caps → Start free