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 prose | about 1.3 tokens per word · about 4 characters per token | So 750 words is roughly 1,000 tokens. Accurate to within about 10% across ordinary English for every widely used tokenizer. |
|---|---|---|
| Code | about 2-3 characters per token | Denser 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 English | 1.5× to 3× more tokens for the same meaning | Worst 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 data | roughly 2× the token count of the same content as prose | Keys repeat on every record and punctuation tokenises separately. For bulk extraction, a tabular format costs materially fewer tokens than nested JSON. |
| Numbers | often one token per one to three digits | Which 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
| English | characters ÷ 4 | Or words × 1.33. Either is close enough for budgeting; use the real tokenizer when you are near a hard limit. |
|---|---|---|
| Code | characters ÷ 2 | Conservative, which is the right direction to be wrong in when you are checking whether something fits. |
| A page of prose | about 500 words · about 650 tokens | A4 or US Letter, single spaced, ordinary margins. |
| 1 MB of plain text | about 250,000 tokens | Useful for sizing a corpus before you start: a 40 MB document set is roughly 10 million tokens to embed. |
| An hour of speech | about 9,000 words · about 12,000 tokens | At roughly 150 words per minute of natural speech. A meeting transcript is smaller than people expect. |
What fits in a window
| 8k tokens | about 6,000 words · roughly 12 pages | Enough for a long document or a short conversation, not both. |
|---|---|---|
| 32k tokens | about 24,000 words · roughly 50 pages | A long report, or a RAG prompt with generous retrieved context and a working conversation. |
| 128k tokens | about 96,000 words · roughly 200 pages | A short novel, or a medium codebase. Common ceiling across current models. |
| 200k tokens | about 150,000 words | Roughly two full-length books, or a codebase of a few hundred files. |
| 1M tokens | about 750,000 words | Available 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 separate | typically a few thousand to tens of thousands of tokens, well below the input window | And 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 middle | recall is best at the start and end of a long context, worst in the middle | Measured 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 cost | attention work grows with the square of sequence length | So 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 cost | grows linearly with context, and it is per concurrent sequence | This is what caps concurrency on a self-hosted service. Long contexts and high concurrency compete for the same memory. |
| Cache-friendly ordering | stable content first, varying content last | Prefix 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 context | usable quality often falls well short of the stated limit | Especially 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