Tokens and context windows, explained simply
Why AI tools count tokens instead of words, what a context window is, and how both affect cost, speed and the quality of answers.
On this page
Every AI tool talks about tokens: token limits, price per million tokens, tokens per second. And every model has a context window. This post explains both in simple words, with examples you can picture.
What is a token?
A language model does not read words or letters. It reads tokens: small chunks of text.
- A common short word is often one token:
cat,the,run. - A longer or rare word is split into a few tokens:
unbelievablemight becomeun+believ+able. - Spaces, punctuation and numbers are tokens too.
Everyday comparison: LEGO bricks. The model builds and reads every sentence out of a fixed set of bricks. Common words get their own brick; rare words are built from smaller ones.
A rough rule for English: one token is about three quarters of a word, so 100 words is roughly 130 tokens. Other languages, including Hindi, usually need more tokens for the same meaning, because the model's "bricks" were designed mostly from English text.
Why not just use words?
There are too many words. New names, typos, slang and code appear every day. With a fixed set of chunks, the model can read any text, even words it has never seen, by breaking them into familiar pieces. It is a neat trick that keeps the model's vocabulary small and flexible.
Why tokens matter to you
Tokens are the unit for three practical things:
| What | How tokens affect it |
|---|---|
| Cost | Paid AI APIs charge per token, for both what you send and what you get back. |
| Speed | The model writes one token at a time, so longer answers take longer. |
| Limits | Each model can only handle a certain number of tokens at once. |
If you build an app on an AI API, a long prompt sent thousands of times a day adds up quickly. Learn the basics of calling an API in our plain-English API guide.
What is a context window?
The context window is the maximum number of tokens a model can look at in one go. It includes everything:
- the instructions (system prompt),
- the whole chat history so far,
- any documents you pasted,
- and the answer the model is writing.
Everyday comparison: a desk. Only what fits on the desk can be looked at right now. When the desk is full, older papers have to be removed to make space.
Context windows range from a few thousand tokens in small models to hundreds of thousands, or more, in large ones.
What happens when the window is full?
Each tool handles this differently, but common results are:
- the oldest messages in a long chat are dropped or summarised, so the model "forgets" what you said at the start;
- a very long document is cut off, so the model never sees the end;
- you get an error saying the input is too long.
This is why a chatbot can lose track in a very long conversation. Starting a fresh chat with a short summary often works better than continuing forever.
Bigger is not always better
A huge context window sounds great, but filling it has costs:
- More money, because you pay for every token you send.
- Slower answers, because the model has more to read.
- Missed details, because models can overlook facts buried in the middle of a very long input.
A better approach is often to send only the relevant parts. That is the whole idea behind RAG: find the right few paragraphs first, then send just those.
Quick recap
- A token is a small chunk of text; models read and write tokens, not words.
- About 100 English words is roughly 130 tokens.
- Tokens decide cost, speed and limits.
- The context window is everything the model can see at once, including its own answer.
- Send what is relevant, not everything you have.