Category leaders

Guide

AI Tokens Explained

A plain-English guide to tokens in AI: what a token is, how many words a token is, how tokenisers split text, what a context window is, and why tokens cost money, with worked examples.

November 3, 2026 · The AI Rankings

Quick answer: A token is the small chunk of text an AI language model actually reads and writes: usually a whole common word, part of a longer word, a number or a punctuation mark. In English, one token is about four characters or three-quarters of a word, so 1,000 tokens is roughly 750 words, according to OpenAI. Tokens matter because everything is measured in them: the context window (how much a model can hold at once), the maximum answer length, rate limits and the API bill, which charges separately for input and output tokens. The one caveat: every company uses its own tokeniser, so the same text is a different number of tokens on different models, and Anthropic says its newer Claude models produce about 30% more tokens for the same text than its older ones.

This page is the explainer for tokens, context windows and token pricing. It does not rank models. For how language models work end to end, see what is an LLM. For the current API price comparison, see best LLM APIs, and for which model is strongest, see best AI models. For one-line definitions of the rest of the vocabulary, see the AI glossary.


What is a token in AI?

A token is the basic unit of text a language model processes. Before a model sees your prompt, a tokeniser splits it into tokens from a fixed vocabulary and turns each one into a number, called a token ID. The model reads token IDs, predicts the next token ID, and the app turns those IDs back into text.

A token is not the same as a word. Short, common words are usually one token each. Longer or rarer words are split into several pieces, so a word such as “unbelievable” might become “un”, “believ” and “able”. Spaces, punctuation, numbers and emojis are tokens too, and a leading space is often folded into the token that follows it.

Models work in tokens rather than words or letters because tokens are a compromise between the two. A vocabulary of whole words could never cover every name, typo and new coinage. Working letter by letter would make every sentence several times longer, which makes models slower and more expensive to run. Sub-word tokens keep text short while still being able to spell out anything.

Tokens vs words vs characters

The vendors publish slightly different rules of thumb for English, because each uses its own tokeniser.

SourceRule of thumb for English1,000 tokens is roughly
OpenAI1 token is about 4 characters or three-quarters of a word; 100 tokens is about 75 words750 words
Google Gemini1 token is about 4 characters; 100 tokens is about 60 to 80 English words600 to 800 words
AnthropicClaude Opus 4.7 and later models produce about 30% more tokens for the same text than earlier Claude modelsFewer words than on older Claude models

The working conversion most people use is 1,000 tokens to about 750 English words, or 1 word to about 1.33 tokens.

How many tokens is that? Quick reference

TextApproximate tokensSource
”You miss 100% of the shots you don’t take”11OpenAI
A sentence or two30OpenAI
A paragraph100OpenAI
1,500 words2,048OpenAI
The US Declaration of Independence1,695OpenAI
A 100,000-word novelabout 133,000OpenAI’s 0.75-words-per-token rule
1 million tokensabout 750,000 wordsOpenAI’s rule

Treat these as estimates. The exact count depends on the model, the language and the kind of text: code, tables, URLs and numbers usually take more tokens per character than ordinary prose.


How tokenisation works

Tokenisation is the step that converts text into tokens. Most modern language models use a method based on byte pair encoding (BPE).

Byte pair encoding

BPE started life as a data-compression technique. Rico Sennrich, Barry Haddow and Alexandra Birch at the University of Edinburgh adapted it for language models in “Neural Machine Translation of Rare Words with Subword Units”, handling rare words “by encoding rare and unknown words as sequences of subword units”.

The idea is simple:

  1. Start with every individual character (or byte) as its own token.
  2. Look through a huge amount of training text and find the pair of tokens that appears next to each other most often, such as “t” and “h”.
  3. Merge that pair into a new token, “th”, and add it to the vocabulary.
  4. Repeat, merging the next most common pair, until the vocabulary reaches the size the designers chose.

After enough merges, common words such as “the” and “and” become single tokens, common word pieces such as “ing” and “tion” become tokens, and anything unusual can still be spelled out from smaller pieces. Modern tokenisers work on raw bytes, so any text in any language, including emojis and code, can be encoded without an “unknown word” gap.

Why the same text gives different counts on different models

Each model family trains its own tokeniser on its own data, with its own vocabulary size. That means:

Tokens in other languages

Tokenisers are trained mostly on English, so other languages often need more tokens to say the same thing. OpenAI notes that the Spanish phrase “Cómo estás” is 5 tokens for 10 characters. A study by Aleksandar Petrov and colleagues found that the same content can take up to 15 times more tokens in some languages than in English. The study’s authors point out three knock-on effects: higher cost on per-token APIs, slower responses, and less text fitting into the context window.

Why tokens cause odd failures

A model sees token IDs, not letters, so tasks that depend on individual characters are harder for it than they look. Counting the letters in a word, reversing a string, rhyming and some arithmetic on long numbers are classic weak spots, because a word or number may arrive as one or two opaque chunks. A model that handles hard reasoning well can still miscount letters in a single word. Giving the model a code tool to do the counting fixes most of these cases.


Do images, audio and video use tokens?

Yes. Multimodal models convert images, audio and video into tokens too, and those tokens count towards the context window and the bill in the same way as text.

InputHow it is countedSource
Image on ClaudeAbout (width in pixels × height in pixels) ÷ 750, so a 1,000 × 1,000 image is about 1,334 tokens; larger images are scaled down firstAnthropic vision docs
Image on Gemini258 tokens for an image up to 384 pixels on both sides; larger images are cut into 768 × 768 tiles of 258 tokens eachGoogle
Audio on Gemini32 tokens per second, so an hour of audio is about 115,200 tokensGoogle
Video on Gemini263 tokens per second for static processing, so an hour of video is close to 950,000 tokensGoogle

At Claude Opus 5.5’s input price of $4 per million tokens, a 1,000 × 1,000 image costs about half a cent. Video is the big one: an hour of footage on Gemini fills most of a 1-million-token context window on its own.


What is a context window?

A context window is the maximum number of tokens a model can work with in a single request, covering everything it reads and everything it writes. Anthropic’s context-window documentation describes it as the model’s “working memory”, as distinct from the data the model was trained on.

What counts towards the context window

Caching does not free up space. Anthropic notes that cached content still occupies the window: caching “changes what you pay for those tokens, not whether they count”.

How big are context windows?

ModelContext windowMaximum outputSource
Claude Opus 5.5, Claude Sonnet 5.5, Claude Haiku 5.51,000,000 tokens128,000 tokensAnthropic
GPT-6.1 Sol1,050,000 tokens128,000 tokensOpenAI
Gemini 4 Argon1,048,576 tokens, shared across input, thinking and outputWithin the same 1,048,576Google
Gemini 3.8 Flash1,048,576 input tokens65,536 tokensGoogle
Llama 4 Scout10,000,000 tokensDepends on the hostMeta

A 1-million-token window holds roughly 750,000 words by OpenAI’s rule of thumb, which is several long novels or a mid-sized codebase. Maximum output is a separate and much smaller limit, so a model can read a whole book in one go but cannot rewrite all of it in one reply.

What happens when you hit the limit

What happens depends on the app or API.

Bigger is not always better: context rot

A large context window is a capacity, not a guarantee that the model uses all of it equally well. Anthropic’s own documentation says that “as token count grows, accuracy and recall degrade, a phenomenon known as context rot” (Anthropic). Chroma’s study of 18 models found the same pattern across vendors. In practice, the most relevant few thousand tokens usually beat the whole archive: trimming what goes in, or retrieving only the passages that matter (see what is RAG), tends to give more accurate answers and cheaper requests.


Why tokens cost money

API access to a language model is priced per million tokens, with separate rates for input tokens (everything you send) and output tokens (everything the model writes). Chat subscriptions hide this behind a monthly fee and usage limits, but the same token maths sits underneath.

Why output costs more than input

Output tokens cost more because they are more work to produce. A model reads all your input tokens in one parallel pass, but it writes output one token at a time, with a full pass through the model for each new token. Every current model on the price table below charges five times as much per output token as per input token. The what is an LLM guide explains the prefill and decode phases behind this in more detail.

What tokens cost on current models

Standard API prices per million tokens, from each provider’s own pricing page.

ModelInputOutputCached inputNotes
GPT-6 Luna (GPT-6 Sol family)$0.10$0.50$0.01OpenAI
Claude Haiku 5.5$0.10$0.50$0.01Prompts up to 100,000 tokens; $0.50 / $2.50 above (Anthropic)
Gemini 3.8 Flash$0.75$3.75$0.075Until 31 December 2026, then $1.50 / $7.50; output includes thinking tokens (Google)
GPT-6.1 Sol$2.00$10.00$0.10Prompts over 272,000 tokens cost more (OpenAI)
Claude Sonnet 5.5$2.00$10.00$0.10Anthropic
Gemini 4 Argon$2.00$10.00$0.10Until 30 November 2026, then $4 / $20 (Google)
Claude Opus 5.5$4.00$20.00$0.20Anthropic
GPT-6 Astra$10.00$50.00$1.00OpenAI
Claude Fable 5.1$10.00$50.00$0.25Anthropic

For the full provider comparison, including gateways, open-weight hosts and free tiers, see best LLM APIs.

Worked example: summarising a report

Summarising a 15,000-word report (about 20,000 input tokens) into a 1,100-word summary (about 1,500 output tokens), using the prices above (the introductory prices for the two Gemini models) and assuming the same token count on every model:

ModelInput costOutput costCost per reportCost for 10,000 reports
GPT-6 Luna or Claude Haiku 5.5$0.002$0.00075about $0.003$27.50
Gemini 3.8 Flash$0.015$0.0056about $0.021$206.25
GPT-6.1 Sol, Claude Sonnet 5.5 or Gemini 4 Argon$0.04$0.015$0.055$550
Claude Opus 5.5$0.08$0.03$0.11$1,100
GPT-6 Astra or Claude Fable 5.1$0.20$0.075$0.275$2,750

Two things change the real number. First, token counts differ between tokenisers, so the same report will not be exactly 20,000 tokens on every model. Second, reasoning models add thinking tokens to the output side, covered next.

Reasoning tokens: the hidden output

Reasoning models write a chain of intermediate “thinking” before their visible answer, and that thinking is made of tokens you pay for. OpenAI’s reasoning guide says reasoning tokens are not visible through the API but “are billed as output tokens” and take up space in the context window. Google labels its output price “including thinking tokens” (Google), and Anthropic says Claude’s thinking tokens are billed as output (Anthropic).

In the report example, if GPT-6.1 Sol thinks for 8,000 tokens before writing its 1,500-token summary, output becomes 9,500 tokens and the cost per report rises from $0.055 to $0.135, about two and a half times as much. That is why cost per completed task is the fairer way to compare reasoning models than price per token. OpenAI recommends reserving at least 25,000 tokens for reasoning and output when starting out with its reasoning models.

Caching and batch discounts

Two discounts cut token bills more than switching models usually does.

A caching example: asking 100 questions about the same 50,000-token contract on Claude Opus 5.5 costs $20.00 in contract input tokens without caching (100 × 50,000 tokens at $4 per million). With caching, it costs $0.25 to write the contract to the cache once and $0.99 to read it 99 more times, $1.24 in total, as long as each question arrives within five minutes of the last.

Rate limits are counted in tokens too

API providers cap how fast you can send tokens as well as how much they cost. OpenAI’s rate limits include tokens per minute (TPM) and tokens per day alongside request limits, and the limit counts the larger of your max_tokens setting and the estimated tokens in the request, so setting max_tokens far higher than you need uses up headroom.


How to count tokens

You do not need to guess. Each major provider offers a way to count tokens before you send a request.

ProviderToolNotes
OpenAIThe Tokenizer tool on its help page, and its open-source tiktoken libraryShows how a piece of text splits into tokens
AnthropicThe free count_tokens endpoint in the Claude APICounts under the tokeniser of the model you name; Anthropic says the result “is an estimate” that can differ slightly from the final bill (Anthropic)
GoogleThe countTokens method in the Gemini APIAlso reports image, audio and video tokens (Google)

After a request, every API response reports the input, output and (where relevant) reasoning tokens actually used, which is the number you are billed on.


How to use fewer tokens


Frequently asked questions

What are tokens in AI?

Tokens are the small chunks of text an AI language model reads and writes, usually a common word, part of a longer word, a number or a punctuation mark. A tokeniser splits your prompt into tokens before the model sees it. Context windows, answer length limits, rate limits and API prices are all measured in tokens, not words.

How many words is 1,000 tokens?

1,000 tokens is about 750 English words by OpenAI’s rule of thumb, and 600 to 800 words by Google’s. The figure varies by model and language: Anthropic says its Claude Opus 4.7 and later models produce about 30% more tokens for the same text than earlier Claude models, and many non-English languages need more tokens per word than English.

How much text fits in 1 million tokens?

One million tokens is roughly 750,000 English words by OpenAI’s rule of thumb, which is several long novels or a mid-sized codebase. On a tokeniser that produces more tokens per word, such as the one in newer Claude models, the same window holds less text. One hour of video on Google’s Gemini uses close to 950,000 tokens.

What is a context window?

A context window is the maximum number of tokens an AI model can handle in one request, including the system prompt, the conversation so far, attached files, tool results and the model’s own answer. Current frontier models from Anthropic, OpenAI and Google have context windows of about 1 million tokens. The maximum length of a single answer is a separate, smaller limit, such as 128,000 tokens on Claude Opus 5.5 and GPT-6.1 Sol.

What happens when you exceed the context window?

An API rejects a prompt that is larger than the model’s context window, or stops the answer early if the output runs out of room. Chat apps usually keep long conversations going by summarising or dropping older messages, which is why a chatbot can lose track of something said much earlier in a long chat.

Is a bigger context window always better?

A bigger context window lets a model take in more at once, but accuracy can fall as the input grows, an effect called context rot. Anthropic’s documentation says accuracy and recall degrade as token count grows. Sending the most relevant material, rather than everything, usually gives better and cheaper answers.

Why are output tokens more expensive than input tokens?

Output tokens cost more because a model reads all input tokens together in one parallel pass but has to generate output one token at a time, with a full pass through the model for each. On every model in this guide’s price table, output tokens cost five times as much as input tokens.

Do reasoning tokens cost money?

Reasoning tokens cost money and are billed as output tokens, even when the thinking is hidden from you. OpenAI, Google and Anthropic all bill thinking as output. A reasoning model that thinks for thousands of tokens before answering can cost several times as much per task as its price per token suggests.

How much does 1 million tokens cost?

One million tokens costs anywhere from $0.10 to $10 for input and from $0.50 to $50 for output on current models from the major providers. GPT-6 Luna and Claude Haiku 5.5 sit at the cheap end at $0.10 input and $0.50 output, Claude Opus 5.5 charges $4 and $20, and GPT-6 Astra and Claude Fable 5.1 charge $10 and $50. Cached input and batch processing cost less.

Why do different AI models count tokens differently?

Each AI company trains its own tokeniser with its own vocabulary, so the same sentence splits into a different number of tokens on different models. Counts can even change between versions from one company: Anthropic’s tokeniser for Claude Opus 4.7 and later produces about 30% more tokens for the same text than the one before it. Compare the cost of a real request, not just the price per token.

Do images use tokens?

Images use tokens and count towards both the context window and the bill. On Claude, an image costs about its width times its height in pixels divided by 750, so a 1,000 by 1,000 image is about 1,334 tokens. On Gemini, a small image is 258 tokens and larger images are split into 258-token tiles; audio is 32 tokens per second.

How do I count tokens?

You can count tokens with OpenAI’s Tokenizer tool or its tiktoken library, Anthropic’s free count_tokens endpoint, or the countTokens method in Google’s Gemini API. Each counts with its own company’s tokeniser, so use the tool that matches the model you plan to use. Every API response also reports the exact tokens used, which is what you are billed on.

← All guides