Token

Also: tokenization, LLM token, tokenizace

A token is the basic unit of text a language model works with: a whole word, part of a word, a punctuation mark or a space. The model splits text into tokens (tokenization) and generates its answer token by token. In English one token is roughly four characters, while many other languages split into more tokens. Both pricing and the context window limit are measured in tokens.

What it means for a company

Tokens are the unit of cost: APIs charge for input and output tokens, which have different rates. Everything the model processes counts, including the system prompt, attached documents, conversation history and, for reasoning models, reasoning tokens. Budgets should therefore be estimated by measuring real data, not by counting words. Be careful when switching models too: the same text can produce a different token count, and Anthropic, for example, states that its newer tokenizer produces roughly 30% more tokens. A lower price per token does not by itself mean lower total cost.

In practice

Token vs. word: an English text of 75 words is about 100 tokens. The same content in Czech usually needs more, because tokenizers are tuned mainly for English and Czech is highly inflected. A 2023 study measured roughly twice as many tokens for Czech with the tokenizer used by GPT-4 at the time. Anyone processing thousands of non-English documents a month via API should measure usage on a sample first.

Frequently asked questions

How many tokens are in a page of text?

It depends on the model and the text. A standard page of 1,800 characters is roughly 450 tokens in English, and usually more in other languages. Only measuring with the provider's tool, such as OpenAI's Tokenizer or a token-counting API, gives a reliable number.

Why care about tokens on a flat monthly subscription?

Subscriptions also have limits driven by tokens: how much text you can paste at once, the size of the context window and the number of messages over a period. If a document is longer than the context window, the model cannot see part of it.

Sources

  1. OpenAI Help Center: What are tokens and how to count them?
  2. Anthropic: Token counting
  3. Petrov et al.: Language Model Tokenizers Introduce Unfairness Between Languages (2023), arXiv

Updated · Full AI glossary

Bringing AI into your company?

We help with employee training, an AI usage policy, safe deployment and compliance with the EU AI Act.

How we adopt AI

Cookie settings

Necessary cookies keep the website working. With your consent we also use analytics cookies (Google Analytics) that help us improve the website.

Necessary

Always active

Website language, spam protection of the contact form (Google reCAPTCHA) and storing your cookie choice.

Website visitor statistics using Google Analytics.