By Tim King · Updated
Context Window Calculator
Token Count to Words, and How Many Pages Fit in 128k Tokens
OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.
How the Context Window Calculator works
This context window calculator checks whether a prompt fits a language model. Enter the window size, your system prompt, the content you send and the tokens you reserve for the reply, and see the share of the window used, what is left in words and pages, or how much to cut.
How the context window calculator works
A model's context window is the most tokens it can handle in one request, counting both what you send and what it writes back. Everything shares the same budget: system instructions, tool definitions, earlier turns of a chat, pasted documents, your question and the reply. If the total is over the window the API rejects the request or cuts the reply short, so the space for output has to be reserved up front.
The formula is tokens used = system + content + output, and tokens left = window − used. Words are estimated at 0.75 per token and a page at 500 words.
First example. A 200,000-token window with a 2,000-token system prompt, 50,000 tokens of content and 4,000 reserved for output uses 56,000 tokens, 28.0 percent, leaving 144,000: room for about 108,000 more words, or 216 pages.
Second example. A 128,000-token window with 3,000 system, 150,000 content and 8,000 output tokens needs 161,000, 125.8 percent. It is over by 33,000 tokens, so the content must be cut to 117,000 tokens, about 87,750 words.
How many pages fit in a context window? Roughly window × 0.75 ÷ 500, so 128,000 tokens holds about 192 pages.
What common context window sizes hold, at about 0.75 words per token and 500 words per page
| Window (tokens) | Words | Pages | Novels (90,000 words) | Left after 4,000-token reply |
|---|---|---|---|---|
| 2,048 | 1,536 | 3 | 0.02 | -1,952 |
| 4,096 | 3,072 | 6 | 0.03 | 96 |
| 8,192 | 6,144 | 12 | 0.07 | 4,192 |
| 16,384 | 12,288 | 25 | 0.14 | 12,384 |
| 32,768 | 24,576 | 49 | 0.27 | 28,768 |
| 65,536 | 49,152 | 98 | 0.55 | 61,536 |
| 100,000 | 75,000 | 150 | 0.83 | 96,000 |
| 128,000 | 96,000 | 192 | 1.07 | 124,000 |
| 131,072 | 98,304 | 197 | 1.09 | 127,072 |
| 200,000 | 150,000 | 300 | 1.67 | 196,000 |
| 256,000 | 192,000 | 384 | 2.13 | 252,000 |
| 272,000 | 204,000 | 408 | 2.27 | 268,000 |
| 400,000 | 300,000 | 600 | 3.33 | 396,000 |
| 500,000 | 375,000 | 750 | 4.17 | 496,000 |
| 1,000,000 | 750,000 | 1,500 | 8.33 | 996,000 |
| 1,048,576 | 786,432 | 1,573 | 8.74 | 1,044,576 |
| 2,000,000 | 1,500,000 | 3,000 | 16.67 | 1,996,000 |
| 2,097,152 | 1,572,864 | 3,146 | 17.48 | 2,093,152 |
| 4,000,000 | 3,000,000 | 6,000 | 33.33 | 3,996,000 |
| 10,000,000 | 7,500,000 | 15,000 | 83.33 | 9,996,000 |
Tips and pitfalls
Fitting is not the same as working well: accuracy on facts buried in the middle of a long context drops on most models, so retrieval of the relevant passages often beats pasting everything. Long inputs also cost more per request. Measure the real token count with a token counter rather than relying on the 0.75 words estimate for code or non-English text.
FAQ
What is a context window?
It is the maximum number of tokens a model can process in a single request, input and output together. Current models range from about 128,000 tokens to over 1,000,000, and the figure is listed on each provider's model page.
Does the reply count against the context window?
Yes. Output tokens share the same window as the input, and reasoning models also spend hidden thinking tokens from it. Reserve space for the longest reply you expect, or set the maximum output tokens explicitly.
How many words is 200,000 tokens?
About 150,000 words of English prose, or roughly 300 pages at 500 words a page. Code, tables, numbers and other languages take more tokens per word, so the real figure is often lower.
What happens if I go over the limit?
Most APIs return an error before running the request. Chat apps usually drop or summarise the oldest messages instead, which is why a long conversation can forget details given near the start.
Where do I find a model's window size?
Each provider lists it in the model documentation, and it can differ between the API and the consumer app. Some models offer a larger window in beta or at a higher price for long prompts.
See also: all AI tools, Dev Utilities, Formatters & Validators, Data & Encoding, Security & Identifiers, SEO, Accessibility.
Related tools
AI Token Counter
Count GPT tokens in a prompt or document with o200k_base, in your browser.
LLM Cost Calculator
Price LLM API calls per request and per month, with caching.
RAG Chunk Calculator
Plan chunk size and overlap for retrieval-augmented generation.
Reading Time Calculator
Reading and speaking time for any article or script.
Word Counter
Words, six readability scores, keyword density and platform limits.