Skip to content
Technologyai

LLM Context Window Calculator

How much conversation fits in a context window after overhead. Retrieved documents and the system prompt consume the window before any conversation starts, and reserving space for the response is required rather than optional.

Also called: context window calculator, token limit calculator.

tokens
Conversation turns available
436

436 turns fit in a 2,00,000 token window after 25,500 tokens of system prompt, documents and reserved output. That leaves 1,74,500 tokens for conversation, roughly 1,39,600 words or 279.2 pages of text. Overhead is a modest share of the window, leaving most of it for conversation.

Fixed overhead
25,500
Available for conversation
1,74,500
Overhead as a share of the window
12.75%
Approximate words
1,39,600
Approximate pages
279.2
Approximate characters
6,98,000
On the overhead
Overhead is a modest share of the window, leaving most of it for conversation.
Method and background

How this is calculated

The window holds everything: system prompt, retrieved documents, conversation history and the response being generated. Reserving space for the output is not optional, because a request that leaves no room fails or truncates. Retrieval is usually the largest and most variable component, and a system that retrieves twenty thousand tokens of documents has committed a tenth of a two hundred thousand token window before the user says anything. The word and page estimates use roughly four characters per token, which holds for English and overstates for other scripts.

the usable window is what remains after the fixed overhead, which grows with retrieval
W
Context window
o
Reserved output

Worked examples

Each of these is asserted on every build. If a change to the engine ever moved one of these answers, the build would fail before the page could print it.

a 200k window with retrieval

Context window
2,00,000 tokens
System prompt
1,500
Retrieved documents
20,000
Tokens per conversation turn
400
Reserved for the response
4,000
Characters per token
4

Conversation turns available436

1500 + 20000 + 4000; 174,500 / 400

Open this example

no overhead leaves the whole window

Context window
2,00,000 tokens
System prompt
0
Retrieved documents
0
Tokens per conversation turn
400
Reserved for the response
0
Characters per token
4

Conversation turns available500

boundary

Open this example

Method and limits

What it assumes

  • Roughly four characters per token, which is an English approximation.

What it deliberately does not model

  • Tokenisation varies by model and is much less efficient for non-Latin scripts.
  • Attention quality can degrade well before the nominal window limit.
  • Images and other modalities consume tokens at their own rates.

Formula version 1.0.0 · definition 1.0.0 · India · Report a problem with this calculator

Frequently asked questions

Do I need to reserve space for the output?
Yes. The response is generated into the same window, so a request that fills it entirely either fails or truncates the answer.
How many words is a token?
Roughly three quarters of a word in English, or about four characters. Other scripts tokenise far less efficiently, sometimes at one token per character.