Context limits and token arithmetic

How to estimate a token count from something you can see, what fits in each common window, and how the window behaves as it fills.

Tokens per unit of text

English proseabout 1.3 tokens per word · about 4 characters per tokenSo 750 words is roughly 1,000 tokens. Accurate to within about 10% across ordinary English for every widely used tokenizer.
Codeabout 2-3 characters per tokenDenser than prose because identifiers, punctuation and indentation all split. A line of code is roughly 8-15 tokens; a 1,000-line file is 10,000-15,000.
Languages other than English1.5× to 3× more tokens for the same meaningWorst for non-Latin scripts and for languages with rich morphology. The same message can cost three times as much in Hindi as in English, which is a real product and pricing issue.
JSON and structured dataroughly 2× the token count of the same content as proseKeys repeat on every record and punctuation tokenises separately. For bulk extraction, a tabular format costs materially fewer tokens than nested JSON.
Numbersoften one token per one to three digitsWhich is part of why models are unreliable at arithmetic on long numbers: the digits are not individually addressable in the way the task requires.

Estimating without a tokenizer

Englishcharacters ÷ 4Or words × 1.33. Either is close enough for budgeting; use the real tokenizer when you are near a hard limit.
Codecharacters ÷ 2Conservative, which is the right direction to be wrong in when you are checking whether something fits.
A page of proseabout 500 words · about 650 tokensA4 or US Letter, single spaced, ordinary margins.
1 MB of plain textabout 250,000 tokensUseful for sizing a corpus before you start: a 40 MB document set is roughly 10 million tokens to embed.
An hour of speechabout 9,000 words · about 12,000 tokensAt roughly 150 words per minute of natural speech. A meeting transcript is smaller than people expect.

What fits in a window

8k tokensabout 6,000 words · roughly 12 pagesEnough for a long document or a short conversation, not both.
32k tokensabout 24,000 words · roughly 50 pagesA long report, or a RAG prompt with generous retrieved context and a working conversation.
128k tokensabout 96,000 words · roughly 200 pagesA short novel, or a medium codebase. Common ceiling across current models.
200k tokensabout 150,000 wordsRoughly two full-length books, or a codebase of a few hundred files.
1M tokensabout 750,000 wordsAvailable on some models. Cost and latency scale with what you actually send, so a large window is a capability, not an instruction to fill it.
Output limits are separatetypically a few thousand to tens of thousands of tokens, well below the input windowAnd on most APIs input and output both count against the context limit, so the reserved output budget reduces what you can send.

How the window behaves as it fills

Lost in the middlerecall is best at the start and end of a long context, worst in the middleMeasured repeatedly across models. Put the most important material at the top or the bottom, and do not assume a large window means uniform attention.
Prefill costattention work grows with the square of sequence lengthSo doubling the prompt more than doubles time to first token. The linear term is the weight loading; the quadratic term takes over at long context.
KV cache costgrows linearly with context, and it is per concurrent sequenceThis is what caps concurrency on a self-hosted service. Long contexts and high concurrency compete for the same memory.
Cache-friendly orderingstable content first, varying content lastPrefix caching only matches from the beginning. One changed token near the top invalidates everything after it, so a timestamp in the system prompt can cost you the whole cache.
Effective versus advertised contextusable quality often falls well short of the stated limitEspecially for models where long context was extended after pretraining. Test on your own longest realistic inputs rather than trusting the number on the model card.

Figures last checked 2026-09-13. Several of these age; check anything you are about to rely on.

Where these numbers come from