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.

Processed locally in your browser. Your data is not uploaded to our servers.

Check your model’s documentation for its context window. Input and output usually share it.

Tokens kept back for your prompt, questions and the model’s answer.

Enter a page count to see how many whole documents fit.

Fills in the tokens-per-word and characters-per-word assumptions below. You can still edit them.

Assumptions (editable)

Tokens per word: conservative uses the most tokens, so fewer words fit; optimistic uses the fewest.

About 500 for single-spaced text, about 250 for double-spaced.

1 leaves the values unchanged. Use about 1.3 for a tokenizer that produces roughly 30% more tokens.

Result

Estimate

Enter a context window and your assumptions to see what fits.

Examples

Worked examples (pages of 500 words, no tokenizer adjustment):

Window (tokens)TextReserved (tokens)Pages (conservative to optimistic)Words (typical)
8,192English prose1,0009 – 125,407
32,768English prose2,00038 – 5123,133
128,000English prose8,000150 – 20090,225
128,000Spanish prose8,000126 – 18580,000
128,000Arabic prose8,00057 – 13348,000
1,000,000English prose16,0001230 – 1640739,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 down

Good 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

  1. Enter your model’s context window and the tokens to reserve for instructions and the reply.
  2. Choose the type of text, or edit the tokens-per-word, characters-per-word and words-per-page assumptions.
  3. Optionally enter the size of one document in pages.
  4. 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: