What a token is
A language model reads text as tokens. OpenAI calls them “the units that OpenAI models use to process text” and adds: “A token can represent a character, part of a word, a whole word, or punctuation.” Anthropic's glossary goes one level lower: tokens “can correspond to words, subwords, characters, or even bytes (in the case of Unicode).”
Google's Gemini documentation gives two examples. Tokens “can be single characters like z or whole words like cat. Long words are broken up into several tokens.” Hugging Face shows what that looks like: the word annoyingly can end up as “annoying” and “ly”, or as “annoy”, “ing” and “ly”, depending on the vocabulary the tokenizer was built with.
Spaces and capital letters matter as well. OpenAI's example is red, Red and “ red” with a leading space: three different pieces of text, and “An encoding can represent them differently.” Each token is stored as a number, its token ID, and the numbers are not shared across models: “Do not assume that an example token ID applies to every model.”
Text is not the only input that becomes tokens. For the Gemini API, “All input to the Gemini API is tokenized, including images, video, and audio”; an image of up to 384 pixels in both dimensions counts as 258 tokens, according to the same page. Inside a Transformer-based model, each token is then turned into a list of numbers, an embedding. How a large language model uses those tokens to predict its answer is covered in its own entry.
One word, two vocabularies
Input wordannoyingly
Vocabulary Atwo tokens
annoyinglyVocabulary Bthree tokens
annoyinglyEach piece then becomes a number, the token ID. The values differ from model to model.
How text is split: tokenizer and BPE
The program that cuts text into tokens is called a tokenizer. Google's documentation names the two related terms: the set of all tokens a model uses “is called the vocabulary, and the process of splitting text into tokens is called tokenization.”
Hugging Face's Transformers library supports three methods for splitting text into word pieces: Byte pair encoding (BPE), Unigram and WordPiece. It describes the idea behind them in one sentence: “Common words stay intact as single tokens, and rare or unknown words decompose into subwords.” Anthropic describes the trade-off: “Larger tokens improve data efficiency during inference and pretraining (and are used when possible), whereas smaller tokens allow a model to handle uncommon or never-before-seen words.”
BPE started out as something else. According to the Hugging Face course, it “was initially developed as an algorithm to compress texts, and then used by OpenAI for tokenization when pretraining the GPT model.” In 2015, Rico Sennrich, Barry Haddow and Alexandra Birch proposed subword units for machine translation, among them “a segmentation based on the byte pair encoding compression algorithm”, so that a model could handle rare words it had never seen as a whole. OpenAI publishes its own tokenizer as open source: “tiktoken is a fast BPE tokeniser for use with OpenAI's models.”
How big a token is
OpenAI, Google and Anthropic each publish a rule of thumb for English text. The numbers differ:
| Provider | Rule of thumb |
|---|---|
| OpenAI | 1 token ≈ 4 characters ≈ ¾ of a word; 100 tokens ≈ 75 words |
| Google (Gemini) | 1 token ≈ 4 characters; 100 tokens ≈ 60 to 80 words |
| Anthropic (Claude) | Earlier models: 1 token ≈ 3.5 characters. Claude 4.7 and later: about 30% more tokens for the same text |
Sources: OpenAI Help Center, “Understanding and counting tokens”; Gemini API, “Understand and count tokens”; Claude documentation, glossary entry “Tokens”. All retrieved 4 December 2026.
All three present these figures as approximations. OpenAI writes: “These are estimates, not exact counts.” Other languages, it adds, “can have different relationships between characters, words, and tokens.” Anthropic: “For Claude, the number of characters a token represents depends on the model and the language.”
Converted to a round number (our arithmetic, not a provider figure): by OpenAI's rule, 1,000 tokens are about 750 English words; by Google's, about 600 to 800.
Why token counts differ
The same text does not produce the same count everywhere. OpenAI: “The same text can produce different token counts depending on the model, its encoding, and the language.” A new model can shift the count noticeably. Anthropic writes that Claude 4.7 and later models use a newer tokenizer that “produces approximately 30 percent more tokens for the same text than earlier models”, and that “The exact increase depends on the content and workload shape.” Its advice: “Recount prompts against the model you plan to use rather than reusing counts measured against earlier models.”
This also affects price comparisons. OpenAI points out that “A lower price per million tokens does not necessarily produce a lower total cost: models can tokenize the same text differently and generate different amounts of output or reasoning.”
Input, output and billing
API usage is counted and billed in tokens. Google writes that the cost of a call to the Gemini API “is determined in part by the number of input and output tokens”. Anthropic lists its prices per “MTok”, a million tokens. OpenAI says the rate “depends on the model and token category” and that “Input, cached input, and output tokens can have different prices.” The current figures are on each provider's pricing page.
OpenAI's help page separates four kinds of tokens:
| Token type | OpenAI's description |
|---|---|
| Input (prompt) tokens | “Tokens supplied to the model in a request. These are also called prompt tokens.” |
| Output (completion) tokens | “Tokens generated by the model.” |
| Cached input tokens | “Input tokens reused through prompt caching.” |
| Reasoning tokens | “Tokens a reasoning model uses internally before producing its visible answer.” |
Reasoning tokens explain why a short answer can use more tokens than it seems to. They “count toward output usage and are billed as output tokens”, OpenAI writes, and “A short visible answer can therefore use more tokens than its displayed text suggests.” Google reports similar categories under its own field names: total_input_tokens, total_output_tokens, total_thought_tokens and total_cached_tokens.
Tokens and the context window
Model limits are measured in tokens as well. OpenAI: “The context window limits the tokens a model can work with in a request. Models also have an output limit.” For reasoning models it advises to “allow space for reasoning tokens as well as the visible answer.” What happens to answer quality as the window fills up is covered in context window.
How to count tokens
Each of the three providers offers its own way to count:
- OpenAI: a Tokenizer page and the open-source library tiktoken for plain text. OpenAI warns that “A plain-text token count does not necessarily include all tokens in an API request”, because message structure, tools, images and files add to it. For complete requests it offers a separate input-token counting API.
- Anthropic: a token counting endpoint. “Token counting is free to use but subject to requests per minute rate limits based on your usage tier.” Anthropic notes that “The token count is an estimate”.
- Google: the Gemini API's
count_tokenscall, which counts the input only, and the usage data returned with each response, which lists input, output, thinking and cached tokens.
Other meanings of “token”
The word has other meanings on the web. In crypto, “AI token” is also used for coins of AI-related projects; that is a different meaning of the word. In robots.txt, a token such as Google-Extended tells crawlers what a publisher allows (see robots.txt for AI crawlers). In agentic commerce, a payment provider passes a token that is valid for a single purchase.
Source
- OpenAI Help Center, “Understanding and counting tokens”. Source for the definition, the English rule of thumb, token IDs, token types, billing, limits and counting tools (retrieved 2026-12-04): https://help.openai.com/en/articles/4936856-understanding-and-counting-tokens
- Google, Gemini API, “Understand and count tokens”. Source for the Gemini rule of thumb, vocabulary, tokenization, multimodal tokens, billing and count_tokens (retrieved 2026-12-04): https://aistudio.google.com/docs/tokens
- Anthropic, Claude documentation, glossary entry “Tokens”. Source for the definition, the Claude rule of thumb, the newer tokenizer and token size (retrieved 2026-12-04): https://platform.claude.com/docs/en/about-claude/glossary
- Anthropic, Claude documentation, “Token counting”. Source for recounting, free token counting and the estimate (retrieved 2026-12-04): https://platform.claude.com/docs/en/build-with-claude/token-counting
- Anthropic, Claude documentation, “Pricing”. Source for the unit MTok (retrieved 2026-12-04): https://platform.claude.com/docs/en/about-claude/pricing
- Hugging Face, Transformers documentation, “Tokenization algorithms”. Source for BPE, Unigram, WordPiece and the subword example (retrieved 2026-12-04): https://huggingface.co/docs/transformers/tokenizer_summary
- Hugging Face LLM Course, “Byte-Pair Encoding tokenization”. Source for the origin of BPE (retrieved 2026-12-04): https://huggingface.co/learn/llm-course/chapter6/5
- Sennrich, Haddow and Birch, “Neural Machine Translation of Rare Words with Subword Units” (arXiv 1508.07909, submitted 31 August 2015). Source for subword units and BPE segmentation (retrieved 2026-12-04): https://arxiv.org/abs/1508.07909
- OpenAI, tiktoken (GitHub). Source for OpenAI's BPE tokenizer (retrieved 2026-12-04): https://github.com/openai/tiktoken
Frequently asked questions
What is a token in AI?
A token is the unit in which a language model reads and writes text: a whole word, part of a word, a single character or a punctuation mark. OpenAI, Google and Anthropic describe it this way, and all three bill API usage by the number of tokens.
How many words is 1,000 tokens?
For English text, roughly 600 to 800 words, by our arithmetic from the providers' rules of thumb: OpenAI puts 100 tokens at about 75 words, Google at 60 to 80. Anthropic gives about 3.5 English characters per token for earlier Claude models and about 30% more tokens for the same text from Claude 4.7 on. Other languages can differ.
Is an AI token the same as a crypto token?
No. An AI token is a unit of text in a language model. In crypto, “AI token” is also used for coins of AI-related projects, which is a different meaning of the word.
How much do AI tokens cost?
Providers bill API usage per token. According to OpenAI, the rate depends on the model and the token category, and input, cached input and output tokens can have different prices. Reasoning tokens are billed as output. The current figures are on each provider's pricing page.
What is the difference between input and output tokens?
Input tokens are what you send to the model in a request; OpenAI also calls them prompt tokens. Output tokens are what the model generates. At OpenAI, the reasoning tokens a reasoning model uses internally count as output, even though they do not appear in the answer.