BasicsOpen
What is a token, and why it decides what AI costs
Language models do not read words; they read tokens. That one design choice sets the price of every request, the size of every context window and why the same text costs more in some languages than in others.
A language model never sees letters or words. Before any text reaches it, a program called a tokenizer cuts the text into pieces from a fixed list, and each piece becomes a number. Those pieces are tokens. A common word may be one token, a rare word several, and a space or a comma often rides along with the piece next to it.

For English, OpenAI's rule of thumb is that one token is about four characters, or three quarters of a word1. That ratio sounds like trivia. It is actually the unit in which the whole industry measures input, output, memory and money.
Where tokens come from
Most tokenizers today descend from byte-pair encoding, a data compression trick published by Philip Gage in 19943. In 2015, Rico Sennrich and colleagues used it to split rare words into smaller units for machine translation4, and the idea spread to language models.
The method is simple. Start with single characters. Count which two neighbours appear together most often, glue them into a new token, and repeat until the vocabulary is as large as you want. Frequent words end up as one token; rare words fall apart into familiar pieces.
Here is that loop run four times on six short words: lower, lowest, newer, newest, wider and widest.
| Step | Pair glued together | Times the pair appeared |
|---|---|---|
| 1 | w + e → we | 4 |
| 2 | s + t → st | 3 |
| 3 | l + o → lo | 2 |
| 4 | lo + we → lowe | 2 |
After these four steps the words split as lowe·r, lowe·st, n·e·we·r, n·e·we·st, w·i·d·e·r and w·i·d·e·st.
"st" and "lowe" are already reusable pieces. Real tokenizers run tens of thousands of merges over trillions of characters.
How big the vocabulary is
The list of tokens is fixed when the model is built. A larger list means common text needs fewer tokens, at the cost of a bigger model.
Meta says the move from Llama 2 to Llama 3 raised English compression from 3.17 to 3.94 characters per token7: the same sentence now costs about a fifth fewer tokens.
A vocabulary can also be extended for a single subject. Google's CellGemma, a biology model released in December 2026, adds 19,881 tokens to its base vocabulary so that every human protein-coding gene is one indivisible token rather than a string of fragments.
The same text, a different bill
Tokenizers learn from their training text, and that text is mostly English. In 2023, researchers at Oxford translated the same 2,000 sentences into many languages and counted the tokens each needed8. With the tokenizer used by ChatGPT and GPT-4, Spanish, French and Italian needed around 1.6 times as many tokens as English, Turkish and Chinese almost twice as many, and some languages of South and Southeast Asia more than ten times as many.
Because models are priced per token, the authors point out, the same request costs more in these languages and fits less of the text into the context window8. Newer tokenizers narrow the gap but do not close it. The same study shows how much the GPT-4 tokenizer improved on GPT-2's for a few common languages:
- GPT-2 tokenizer
- GPT-4 tokenizer
Tokens are the price list
Every major API charges per million tokens, usually with output tokens costing several times more than input tokens; OpenAI's pricing page, for example, states its prices per one million tokens9. The ticker on our front page shows current list prices in exactly that unit.
To make those prices concrete: by OpenAI's rule of thumb, a 100,000-word English book is roughly 133,000 tokens. Here is what sending it once as input would cost at today's list prices.
The same book in Bulgarian would need about 2.6 times the tokens with the GPT-4 tokenizer8, and the bill would grow with it.
What to remember
- Tokens, not words, are the unit. Limits such as the context window, speed and prices are all counted in them.
- About four characters per token is a fair guess for English; most other languages need more.
- The tokenizer is part of the model. A better one makes the same model cheaper and lets it read more, especially outside English.
- Odd behaviour can start here. Rare tokens such as " SolidGoldMagikarp" showed that a model can hold a token it never learned to use.
- The next token is drawn, not looked up. Temperature decides how much chance goes into the draw.
The unit changes with the input. Mistral's Crashtral represents parts of a vehicle mesh, including patches and connectors, as tokens for its transformer.
Frequently asked questions
What is a token in AI?
A token is the unit of text a language model reads and writes: a whole word, part of a word or a punctuation mark, turned into a number by a program called a tokenizer before the model sees it.
How many words are 10,000 tokens?
About 7,500 words of English, using OpenAI's rule of thumb that one token is roughly three quarters of a word1. Most other languages fit fewer words into the same number of tokens.
Is a token the same as a word?
No. A common English word is often one token, but rare words split into several pieces, and spaces and punctuation ride along with neighbouring pieces. On average an English token is about four characters1.
What is tokenization?
Tokenization is the step that cuts text into tokens from a fixed vocabulary and gives each one a number. Most modern tokenizers use byte-pair encoding, which repeatedly glues the most frequent pair of neighbouring pieces into a new token4.
Why does the same text cost more in some languages?
Tokenizers learn mostly from English, so other languages split into more tokens. With the GPT-4 tokenizer, Turkish and Chinese need almost twice as many tokens as English for the same sentences8, and APIs bill per token.
How are AI models priced per token?
APIs charge per million tokens, with separate prices for input and output, and output usually costs several times more9. Our flagship comparison lists current rates.
References
- OpenAI, API documentation, "Key concepts: Tokens", accessed 20 November 2026. https://developers.openai.com/api/docs/concepts
- Rumbelow, J. and Watkins, M., "SolidGoldMagikarp (plus, prompt generation)", LessWrong, 5 February 2023. https://www.lesswrong.com/posts/aPeJE8bSo6rAFoLqg/solidgoldmagikarp-plus-prompt-generation
- Gage, P., "A New Algorithm for Data Compression", The C Users Journal, February 1994. https://jacobfilipp.com/DrDobbs/articles/CUJ/1994/9402/gage/gage.htm
- Sennrich, R., Haddow, B. and Birch, A., "Neural Machine Translation of Rare Words with Subword Units", ACL 2016, arXiv:1508.07909. https://arxiv.org/abs/1508.07909
- Radford, A., Wu, J., Child, R., Luan, D., Amodei, D. and Sutskever, I., "Language Models are Unsupervised Multitask Learners", OpenAI, 2019. https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf
- Touvron, H. et al., "Llama 2: Open Foundation and Fine-Tuned Chat Models", arXiv:2307.09288, July 2023. https://arxiv.org/abs/2307.09288
- Llama Team, Meta, "The Llama 3 Herd of Models", arXiv:2407.21783, July 2024. https://arxiv.org/abs/2407.21783
- Petrov, A., La Malfa, E., Torr, P. H. S. and Bibi, A., "Language Model Tokenizers Introduce Unfairness Between Languages", NeurIPS 2023, arXiv:2305.15425. Table 1 and the extended table in Appendix C. https://arxiv.org/abs/2305.15425
- OpenAI, API pricing, accessed 20 November 2026. https://developers.openai.com/api/docs/pricing
- Anthropic, "Pricing", Claude documentation, accessed 20 November 2026. https://platform.claude.com/docs/en/about-claude/pricing
- Google, Gemini API pricing, accessed 20 November 2026. https://aistudio.google.com/docs/pricing
- Z.ai, "Pricing", accessed 20 November 2026. https://docs.z.ai/guides/overview/pricing
- DeepSeek, "Models & Pricing", API documentation, accessed 20 November 2026. https://api-docs.deepseek.com/quick_start/pricing


