Skip to content
Calc.

Context Window Calculator

See how many words, pages or lines of code fit in a model’s context window, and what share of it a document of a given length uses, for Claude, GPT-6, Gemini and Llama.

Last updated: October 2026

Share of the available context the document uses

9.19 %

Formula below · 4 sources (platform.claude.com, developers.openai.com, ai.google.dev, arxiv.org) · Updated Oct 2026

Compare with similar

About this calculator

A context window is the most tokens a model can take in one request. Everything counts against it: the system prompt, instructions, the conversation so far, any documents, and on most models the reply as well. The calculator subtracts a reserve for those from the window, converts words to tokens with each provider’s rule of thumb, and reports how much of the rest a document takes:

document tokens = words ÷ words per token share used = document tokens ÷ (window − reserve)

Words per token for English: Claude 0.555 (Anthropic: 1M tokens ≈ 555,000 words on the current tokenizer), OpenAI 0.75, Gemini 0.7 (60–80 words per 100 tokens), Llama 3 about 0.74. Lines of code use characters per token (Claude 2.5, OpenAI and Gemini 4, Llama 3.94) and the average line length you enter; code usually tokenizes less efficiently than prose, so treat that tile as an upper bound. Pages assume 500 words per single-spaced page.

Window sizes (as of October 2026): current Claude models 1M tokens with up to 128K of output; GPT-6 Astra, 6.1 Sol and 6 Luna 1,050,000 tokens in total, of which at most 922,000 are input and 128,000 output; Gemini 4 Argon and 3.8 Flash 1,048,576 tokens; Llama 3.1 128K. Fitting is not the same as using well: long-context recall varies by model and task, and every token in the window is billed on every request.

How to use

Choose the model, enter the document’s word count, the tokens to keep free for instructions and the answer, and (for the code tile) a typical line length. Example (the defaults): a 50,000-word document in Claude’s 1M-token window with 20,000 tokens reserved. 50,000 ÷ 0.555 = 90,090 tokens; 90,090 ÷ 980,000 = 9.19% of the available context. The 980,000 tokens would hold about 543,900 words (1,088 pages) or 980,000 × 2.5 ÷ 40 = 61,250 lines of code. Example 2: the same document on Llama 3.1 (128K): 50,000 ÷ 0.73875 = 67,682 tokens of 108,000 available, 62.67%. Example 3: GPT-6 models: 50,000 ÷ 0.75 = 66,667 tokens of 902,000, 7.39%.

Frequently asked questions

How many words fit in 1 million tokens?

Anthropic says about 555,000 words (2.5 million characters) on Claude’s current tokenizer, and about 750,000 words on its models before Claude Opus 4.7. By OpenAI’s ¾-word rule it is about 750,000 words, and by Google’s 60–80 words per 100 tokens, 600,000–800,000.

Does the reply count against the context window?

On Claude, Gemini and Llama the window is shared by input and output, so leave room for the answer. OpenAI lists GPT-6 models with a 1,050,000-token window split into at most 922,000 input and 128,000 output tokens.

Should I fill the whole context window?

Only if the task needs it. Each request is billed for every input token, and recall of details buried in very long contexts varies by model and task. Retrieval (sending only the relevant passages) is often cheaper and as accurate.

Related calculators

Sources & references

Think a result is wrong? Report a problem with this calculator.