Document to Context Capacity Calculator
How much text can you give a model at once? Enter the context window and the space you want to keep for instructions and the answer, and this calculator converts the rest into words, pages, characters and whole documents. Because the conversion from tokens to words depends on the language and the tokenizer, it shows a conservative, a typical and an optimistic figure, and every assumption is editable.
Result
Estimate
Enter a context window and your assumptions to see what fits.
- Tokens available for the text
| Measure | Conservative | Typical | Optimistic |
|---|
Examples
Worked examples (pages of 500 words, no tokenizer adjustment):
| Window (tokens) | Text | Reserved (tokens) | Pages (conservative to optimistic) | Words (typical) |
|---|---|---|---|---|
| 8,192 | English prose | 1,000 | 9 – 12 | 5,407 |
| 32,768 | English prose | 2,000 | 38 – 51 | 23,133 |
| 128,000 | English prose | 8,000 | 150 – 200 | 90,225 |
| 128,000 | Spanish prose | 8,000 | 126 – 185 | 80,000 |
| 128,000 | Arabic prose | 8,000 | 57 – 133 | 48,000 |
| 1,000,000 | English prose | 16,000 | 1230 – 1640 | 739,849 |
Formula & Methodology
The arithmetic is exact; the tokens-per-word values are assumptions:
available tokens = context window − reserved tokenswords = available tokens ÷ (tokens per word × tokenizer adjustment), rounded downpages = words ÷ words per pagecharacters = words × characters per wordwhole documents = pages ÷ pages per document, rounded downGood to know
- Tokens per word were measured on ToolQuarter’s own pages with OpenAI’s tokenizers (English about 1.2, Spanish 1.35 to 1.6, Arabic 1.8 to 4.2) and widened into ranges. Other providers differ.
- Code, tables, numbers and unusual vocabulary use more tokens per word. For them, enter higher values or use the conservative column.
- Anthropic documents that its newer tokenizers produce about 30% more tokens for the same text. Set the tokenizer adjustment to about 1.3 for those models.
- Images, scanned pages and PDFs that need OCR are counted differently. This calculator is for plain text.
- Keep room for your instructions and for the answer: that is what the reserved tokens are for.
Method and references
These primary sources support the methods this tool relies on. Having read them does not verify every result the calculator produces, and figures listed as assumptions are ToolQuarter’s own.
Tokens, not file size or page count, fill a context window. Converting words to tokens depends on the language, the content and the tokenizer.
- OpenAI API: Key concepts: OpenAI’s rule of thumb for English, about 0.75 words or 4 characters per token, is the basis of the default 1.33 tokens per word. ()
- Gemini API: Understand and count tokens: Google gives a similar rule for Gemini: 100 tokens are about 60 to 80 English words, close to the 1.2 to 1.6 tokens per word used for English. ()
- Anthropic: Token counting: Says newer Claude tokenizers produce about 30% more tokens for the same text and advises recounting against the model you plan to use, which is the reason for the tokenizer adjustment. ()
- Anthropic: PDF support: For PDFs, Anthropic says a page typically uses 1,500 to 3,000 text tokens plus image tokens depending on content. Page count or file size alone does not give a token count, and this tool is for plain text. ()
ToolQuarter assumptions (no primary source):
- Spanish and Arabic tokens per word (typical 1.5 and 2.5) and the characters per word come from ToolQuarter’s measurements with OpenAI’s tokenizers on its own pages. They are not provider figures.
- 500 words per page for single-spaced text and 250 for double-spaced are common conventions assumed by ToolQuarter, with no primary source: edit them for your document. The conservative and optimistic columns are ranges chosen by ToolQuarter.
How to Use
- Enter your model’s context window and the tokens to reserve for instructions and the reply.
- Choose the type of text, or edit the tokens-per-word, characters-per-word and words-per-page assumptions.
- Optionally enter the size of one document in pages.
- Read the conservative, typical and optimistic capacity and plan with the conservative one.
Frequently Asked Questions
How many pages fit in a 128,000-token context window?
With 8,000 tokens reserved and ordinary English prose at 500 words a page, roughly 150 to 200 pages: about 180 in the typical case. Spanish fits fewer pages and Arabic fewer still, because their words use more tokens.
Why does the calculator show three numbers?
The number of tokens per word depends on the language, the vocabulary and the tokenizer, so any single figure would be false precision. The conservative value is the safe one for planning; the optimistic one is what you might get with plain, common English.
Why do Spanish and Arabic fit less text than English?
Tokenizers split words in other languages into more pieces than common English words, so the same number of words costs more tokens. The language presets reflect measurements on real pages.
Can I fill the whole window with documents?
No. You also need room for your instructions, your question and the answer, which is what the reserved tokens represent. The calculator subtracts them before working out how much text fits.
How accurate is this?
The arithmetic is exact, but the result is only as good as the tokens-per-word assumption. For a closer figure on your own text, count it with the token counter, then enter the ratio you measure.
Last updated: