Context window calculator
How it adds up
| Item | Tokens for input | Words | Pages |
|---|---|---|---|
| 8,000 window | - | - | - |
| 32,000 window | 22,000 | 15,400 | 31 |
| 128,000 window | 118,000 | 82,600 | 165 |
| 200,000 window | 190,000 | 133,000 | 266 |
| 1,000,000 window | 990,000 | 693,000 | 1,386 |
An estimate: each model splits text into tokens differently, and code, tables and languages other than English usually take more tokens per word. Filling a window to the limit also leaves less room for the model to work with what it has read; leaving a margin is safer.
Worked out from the numbers you enter. Calculated in this browser; nothing you enter is sent anywhere or stored.
How to use it · free, no signup
How to use the Context Window Calculator
Enter a model’s context window, the tokens to keep for the answer and the instructions to see how many words and pages of material fit. Calculated in your browser.
01
Enter the window
The model’s context window in tokens, from its documentation.
02
Keep back room
Tokens for the answer and for the instructions.
03
Read the result
The tokens, words and pages left for your material.
What a context window holds
A model’s context window is the most it can handle in one request, measured in tokens. Everything counts towards it: the system prompt and instructions, the material you paste, any earlier messages in the conversation, and the answer the model writes. The room left for your material is the window minus everything else.
| Item | Tokens |
|---|---|
| Context window | 200,000 |
| Kept for the answer | 8,000 |
| System prompt and instructions | 2,000 |
| Left for your material | 190,000 |
| In words, at 0.7 a token | About 133,000 |
| In pages of 500 words | About 266 |
From tokens to words and pages
Google’s documentation for Gemini puts 100 tokens at about 60 to 80 English words, and the calculator uses the middle of that range, 0.7 words a token, which you can change. Code, tables, numbers and languages other than English usually take more tokens per word, so for that kind of material lower the figure. For a specific text, the token counter gives an estimate from the text itself.
Why not fill it to the limit
A window filled to the last token leaves no room if the answer runs long, and the request fails or the answer is cut off. There is also a quality reason: the more material a model is given at once, the easier it is for a detail in the middle to be overlooked. Leaving a margin, and putting the most important instructions where they are easy to find, is the safer habit.
When the material does not fit
There are three usual approaches: split the material and work through it in parts, summarise it first and work from the summaries, or store it in chunks and retrieve only the passages relevant to each question. The chunk size calculator works out how many chunks a document makes and how much each question adds to the prompt, and the AI API cost calculator shows what long inputs cost.
Published by Koit Academy. Who runs it, how it is paid and how its tools are checked.
Questions
What people ask about the Context Window Calculator
What is a context window?
How many words are in 200,000 tokens?
Why keep tokens back for the answer?
Should I fill the window to the limit?
What if my material does not fit?
Related tools
Token Counter
An estimate of the tokens in any text
Open itAI API Cost Calculator
What an AI workload costs per request and per month
Open itAI Prompt Generator
One clear prompt from its parts
Open itChunk Size Calculator
Chunks, overlap and cost for retrieval
Open itLLM VRAM Calculator
GPU memory for a language model and its context
Open itTokens per Second Calculator
How long an AI answer takes to generate
Open it