Home / Methods / AI cost / Context window fit
Context window fit
When you hand a model a large text or a long dialogue history and need to know whether it fits — and how much room is left for the answer.
Or ask in your own words (needs an AI key)
What you need
- words in the text you are sending
- tokens per word: ~1.35 for English, ~2.5–3 for Ukrainian (default 1.35)
- the model's context window, in tokens
- tokens in the standing instruction (default 0)
- past turns carried in the context (default 0)
- average length of one turn, in tokens (default 0)
- tokens to leave for the answer (default 0)
What it calculates
- tokens needed in total, tokens
- tokens left free (negative — does not fit), tokens
- whether it fits the window (1 — yes, 0 — no)
- by how many tokens it overflows, tokens
- how many past turns can still be carried, turns
- share of the window taken (%), %
Examples
60,000 words into a 200,000-token window
| tokens needed in total | 95,000 tokens |
| tokens left free (negative — does not fit) | 105,000 tokens |
| whether it fits the window (1 — yes, 0 — no) | 1 |
| by how many tokens it overflows | 0 tokens |
90,000 words of Ukrainian (2.7 tokens a word) into a 200,000-token window
| tokens needed in total | 278,000 tokens |
| tokens left free (negative — does not fit) | -78,000 tokens |
| whether it fits the window (1 — yes, 0 — no) | 0 |
| by how many tokens it overflows | 78,000 tokens |
| share of the window taken (%) | 139 % |
Example numbers are checked against an independent calculation. The AI in Numo does not compute: it only parses your question; a deterministic engine does the maths.
Careful
The tokens-per-word factor is an estimate, not a fact: it depends on language, markup, numbers and code. For an exact figure you need the model's own tokenizer. Also, fitting and answering well are different things: in a crammed window the model finds what matters less reliably.
Typical mistakes
- Counting 1 token per word — for Ukrainian it is 1.3–2.
- Forgetting room for the answer.