What Is a Token in AI? Tokens Explained

How Tokens Work

Before an AI model can read or write anything, it breaks text into small pieces called tokens. Think of it like how a spell-checker processes one word at a time — except tokenizers often split words into smaller chunks. With OpenAI's current tokenizer, "understanding" becomes two tokens: "under" and "standing" (see thereal examples below).

This process is called tokenization. Every piece of text you send to an AI — your prompt, instructions, and any context — gets split into tokens before the model processes it. The model's response gets generated one token at a time, too.

Different AI models use different tokenizers, so the exact same text can produce slightly different token counts depending on the model. GPT, Claude, and Gemini each have their own tokenizer. However, the ratio of roughly 0.75 words per token (or 1.33 tokens per word) holds well across all of them for typical English text.

Numbers, code, and non-English text tend to use more tokens per word. A line of code averages about 10 tokens, and the same sentence can take noticeably more tokens in Hindi or Japanese than in English.

Real Examples: How Text Splits Into Tokens

These splits come from running OpenAI's o200k_base tokenizer (used by GPT-4o through GPT-5.x) on each example. Common words stay whole; rare words, numbers and code break into pieces.

1 tokencat
2 tokenshello·world
2 tokensunderstanding
2 tokenstokenization
3 tokensunbelievable
2 tokensChatGPT
4 tokensZylphora
2 tokens2026
5 tokens1,234,567
10 tokensdef·add(a,·b):·return·a·+·b

A · marks a space — tokenizers usually attach the space to the start of the next word.

The same question in five languages

Tokenizers split some languages into more pieces than others, so the same meaning can cost more to process in one language than another. One question, counted with the same tokenizer:

LanguageSentenceTokensvs English
EnglishHow many tokens are in this sentence?81×
Spanish¿Cuántos tokens hay en esta frase?91.1×
Hebrewכמה טוקנים יש במשפט הזה?91.1×
Hindiइस वाक्य में कितने टोकन हैं?121.5×
Japaneseこの文にはトークンがいくつありますか?131.6×

One sentence is only an illustration — ratios vary with the text. Count your own with thetoken counter.

What Does 1 Million Tokens Look Like?

A million tokens is the standard billing unit for AI APIs. Here's what that actually looks like in terms you can picture:

Every estimate shows its assumption. See all 16 comparisons on the main page →

How Much Do Tokens Cost?

AI companies charge separately for input tokens(what you send) and output tokens (what the model writes back). Output always costs more — typically 3–6× more — because generating text requires far more computation than reading it.

Here's what a few popular models charge per million tokens:

ModelInput / 1M tokensOutput / 1M tokens
Claude Sonnet 5$2$10
GPT-6 Sol$2$10
Claude Haiku 4.5$1$5
Gemini 3.8 Flash$0.75$3.75

Prices range from $0.10 to $50 per million tokens — a huge spread. See all model prices →

Token Calculator

Want to estimate how much your specific use case will cost? Use our calculator to pick a model, set a budget, and see exactly how many words, pages, or lines of code that buys.

Open the token calculator →

To see how many tokens a specific piece of text uses, paste it into the token counter. It counts GPT tokens exactly and estimates Claude and Gemini, with the cost on every model.

Frequently Asked Questions

How many tokens is 1 word?
On average, one English word is about 1.33 tokens. This varies by word length and the specific tokenizer — short common words like "the" or "is" are usually one token, while longer or rarer words get split into multiple tokens.
How many tokens is 1 page?
A single-spaced page of text (about 500 words) is roughly 670 tokens. A double-spaced page (~250 words) is about 335 tokens.
Why do AI companies charge per token?
Tokens provide granular, usage-based billing. Instead of charging flat fees, per-token pricing means you only pay for what you actually use — whether that's a single sentence or an entire novel. It also reflects the real computational cost: processing more text requires more compute.
Are tokens the same across different AI models?
Similar, but not identical. Each model family (GPT, Claude, Gemini) uses its own tokenizer, so the same text produces different counts. Tokenizers also change between generations: Anthropic says the tokenizer for Claude 4.7 and later models produces about 30% more tokens for the same text than its previous one. The 1 token ≈ 0.75 English words rule of thumb is still a good planning estimate.
What's the difference between input and output tokens?
Input tokens are what you send to the model — your prompt, instructions, and any context. Output tokens are what the model writes back — its response. Output tokens cost 5–8× more than input tokens on current models because generating text is far more computationally expensive than reading it.