"Tokens" is the unit AI runs on. Every price list for Claude, GPT, Gemini, or any other LLM is quoted per million tokens. Every context window is measured in tokens — 200K tokens for Claude Opus, 1M for Gemini. Every API error about hitting a limit refers to tokens. You cannot use a modern AI product for long without the word coming up, and most people learn to work around it without really knowing what a token is.
This post fixes that. What tokens actually are, why AI systems chose this unit over words or characters, how tokenization works under the hood, why the same text has different token counts across different models, and how to estimate or count tokens for your own prompts. By the end you'll understand the thing every AI invoice is denominated in.
What a token actually is
A token is a chunk of text — roughly a word, part of a word, a punctuation mark, or sometimes a single character. When an LLM reads your prompt, the first thing that happens is the text gets broken into tokens. When the model generates a response, it generates one token at a time. All the model's internal processing works at the token level, not at the character or word level.
Some common examples of how English text tokenizes (approximate, varies by model):
- "Hello" → 1 token
- "Hello, world" → 3 tokens (Hello, comma, world)
- "unbelievable" → 2–3 tokens (un + believable, or un + believ + able, depending on the tokenizer)
- "Anthropic" → 2–4 tokens depending on tokenizer
- A typical English sentence → roughly 15–25 tokens
- A page of English text → roughly 400–600 tokens
- A 10-page document → roughly 4,000–6,000 tokens
The rough rule for English: 1 token is about 0.75 words, or about 4 characters. 1,000 tokens is about 750 words. These ratios shift for other languages, code, or specialized content, but they're a reasonable mental model for English prose.
The important thing: a token is NOT the same as a word. Some tokens are whole words. Many are pieces of words. Some are just punctuation. Some are special markers the model uses internally. "Word count" and "token count" are related but different.
Why tokens exist (and not characters or words)
AI systems chose tokens as the unit for specific reasons. The alternatives all have problems:
Why not characters? Too small. Each character carries very little meaning on its own. A model that had to figure out language letter-by-letter would need to process far more units for the same content, making it slower and more expensive. It would also struggle to learn linguistic patterns efficiently — the model has to see enough context to understand meaning.
Why not whole words? Too big and too many. English has hundreds of thousands of words, plus proper nouns, plus made-up words, plus typos. Covering them all would require a huge vocabulary, and you'd still fail on anything not in it. "Supercalifragilisticexpialidocious" doesn't fit a word-based system well. Neither does "SpaceX" or "cctk" or last week's new technical term.
Why tokens (subword units)? Just right. A token can be a common word ("the," "and") in one token, or split a rare word into meaningful pieces ("un" + "believable"). This lets the vocabulary stay manageable (typically 50K–200K tokens) while still handling any input — unknown words just break into subword pieces.
The specific algorithm most models use is called Byte-Pair Encoding (BPE) or a variant. It learns a vocabulary from training data — starting from individual characters and progressively merging the most common pairs into tokens. Common words become single tokens; rare ones get split into pieces. The result is efficient and handles anything you throw at it.
Why the same text has different token counts in different models
If you paste the same paragraph into Claude and GPT token counters, you'll get different numbers. This surprises people. The reason: each model has its own tokenizer, trained on its own data, with its own vocabulary.
Different tokenizers make different choices:
- Some have larger vocabularies, so common text uses fewer tokens
- Some are optimized for different languages (a tokenizer trained heavily on English will tokenize English efficiently and Chinese inefficiently, or vice versa)
- Some handle code specifically, with tokens for common programming constructs
- Some handle whitespace differently
For English prose, the difference between modern tokenizers is usually small — maybe 10-20% variation. For code or non-English text, it can be much larger. A Python snippet might be 30% fewer tokens in one tokenizer than another because of how it handles indentation and common syntax.
Practical consequence: you can't assume a "1000-token prompt" costs the same on all models. The same text might be 850 tokens on one and 1100 on another, and the pricing is per-token. For most purposes this is a minor detail; for very cost-sensitive or very long-context workloads, it can matter.
Why AI is priced per token
Tokens are the natural unit because they match what the model actually computes. Each generated token requires one forward pass through the neural network. More tokens, more compute. The cost to serve an LLM query scales almost linearly with the tokens processed (input) and generated (output).
Charging per token therefore reflects the actual cost structure. Flat-rate pricing would mean cheap short queries subsidize expensive long ones. Per-query pricing would mean short queries cost the same as long ones, hiding the real driver of cost. Per-token is the honest unit.
The split between input tokens and output tokens matters too. Modern pricing usually charges less for input tokens than output tokens. Rough reason: input tokens can be processed in parallel (the whole prompt gets analyzed at once); output tokens have to be generated one at a time (each depends on the previous ones). Output is more expensive to produce per token, so it's priced higher.
Typical 2026 pricing ratios: output tokens cost 2-5x input tokens for a given model. Specifics vary by provider and model tier, but the pattern is consistent across the industry.
For English, 1,000 tokens ≈ 750 words ≈ 4,000 characters ≈ roughly half a typed page. Memorize this rough conversion and you can estimate token costs for most things you work with without looking at a counter.
How to count tokens for your text
Three ways to get an accurate token count:
1. Use an official tokenizer tool. OpenAI and Anthropic both publish tokenizer libraries and web tools where you paste text and see the exact token count. These are the ground truth. Links from the provider's docs. Use these when the count really matters.
2. Use the API's usage reports. Every modern LLM API returns usage info with each response — input tokens, output tokens, cached tokens if caching is used. Log these to understand actual usage. Much more reliable than estimating.
3. Estimate with the rough rules. 1 token ≈ 4 characters for English, or ≈ 0.75 words. Multiply character count by 0.25, or multiply word count by 1.3. Good enough for most planning and budgeting purposes.
For most day-to-day use, the estimate is fine. For designing a system where token counts matter precisely, use the official tokenizer.
What inflates your token count unexpectedly
Several things make token counts higher than intuition suggests:
Code. Code is dense with symbols, indentation, and special characters. Programming languages often tokenize to more tokens per character than English prose. A 100-line Python file could be 2000-3000 tokens depending on complexity.
JSON and structured data. Brackets, quotes, commas, and whitespace all count. A JSON object with a dozen keys might be 200-400 tokens. Nested structures balloon fast.
Non-English text. Tokenizers trained mostly on English use more tokens per character for languages like Chinese, Japanese, Arabic. The same message in English and Chinese may have very different token counts.
Repetitive content. Each repetition costs more tokens, even if it compresses well in your head. Pasting the same table structure five times costs five times the tokens.
Markdown and formatting. Asterisks, pound signs, bullet markers all tokenize. Heavily formatted text uses more tokens than the same content in plain prose.
URLs and long identifiers. A long URL or UUID often breaks into many tokens. A single URL can be 20-40 tokens by itself.
For most prose, estimating works fine. For code-heavy or format-heavy content, count more carefully — the estimates can be off by 50% or more.
Context windows explained in token terms
A model's context window is the maximum number of tokens it can process in a single request. All current frontier models measure this in tokens.
Rough 2026 context window sizes:
- Claude Opus and Sonnet: 200K tokens (standard) or 1M+ (extended)
- GPT-5: 200K+ tokens
- Gemini 3: 1M+ tokens
- Most open-weights models: 32K to 128K tokens, growing
In rough English terms, 200K tokens is about 150,000 words — roughly 300 pages of text. 1M tokens is about 750,000 words — multiple full books. These are large contexts; most individual prompts don't come close to filling them.
Context windows include both input and output. If you have a 200K-token context window and your input prompt is 180K tokens, you have only 20K tokens of space left for the model's response. If you need a longer response, you need a smaller input.
Also worth knowing: large context windows don't mean the model attends to all content equally. Performance tends to be best for content near the start and end of a long context, weaker for content in the middle. "Lost in the middle" is a well-documented effect. Loading 190K tokens isn't functionally equivalent to loading 50K tokens of the most relevant content.
Token-aware budgeting
Tokens being the pricing unit means thinking in token terms is central to AI cost management. Three practical habits:
1. Know what one task costs you in tokens. Instrument your API calls so you can see input and output token counts per task. Multiply by your per-token pricing to get cost per task. Track over time.
2. Reduce input tokens by being specific. Most prompts include more context than strictly needed. Trimming to just what matters cuts tokens and often improves output quality (less dilution of attention). See the context-window post for the broader discipline.
3. Watch for output-token runaway. If a task requests a long response and the model goes on, you can rack up tokens fast. For long-response tasks, specify length limits or structure the output in ways that cap length.
For most individual users, tokens are negligible. For teams or applications making thousands of calls daily, tokens are the cost center. Managing them deliberately rather than reactively is one of the biggest cost-control levers available.
Common misconceptions about tokens
Three things people often get wrong:
"Tokens are words." Close but not quite. Some words are one token; some split into multiple. "The" is one token; "Unbelievable" is two or three. Treating them as equivalent leads to underestimating token counts, usually by 25-50%.
"Tokens are consistent across models." Nope. Each model has its own tokenizer. A 1000-token prompt in Claude might be 850 or 1100 tokens in GPT. For rough estimates it doesn't matter; for precise cost planning it does.
"Input and output cost the same." Output usually costs more — typically 2-5x. Workloads that generate a lot of text have different cost dynamics than workloads that process a lot of input and produce short responses.
Understanding these three things puts you ahead of most AI users on cost awareness.
Tokens are the actual unit AI processes. Not words. Not characters. Learning to think in tokens is how you start understanding AI costs, context limits, and performance, not just paying for them.
How tokens relate to other AI concepts
A quick map of how tokens connect to other things you'll encounter:
Tokenization is the process of splitting text into tokens. Every model has a tokenizer that does this.
Embeddings are vector representations of tokens (or chunks of tokens) used for similarity search and retrieval. When you build RAG systems, you're embedding token sequences.
Context window is the token budget for a single request.
Prompt caching is a mechanism to pay less for input tokens that repeat across requests.
Thinking tokens (in reasoning models) are the tokens the model generates while "thinking" before producing its final output. They count toward your bill even though you don't see them.
Rate limits are usually measured in tokens per minute (TPM) and requests per minute (RPM). Hitting your TPM limit means you're processing text too fast.
All of these are facets of the same underlying thing: tokens as the fundamental unit AI operates on. Internalizing the token concept unlocks understanding of many downstream AI concepts.
A worked example
Let's calculate the cost of a typical interaction to make this concrete:
Suppose you paste a 3-page document (about 1,800 words) into an AI chat and ask for a one-page summary (about 300 words).
- Input: 1,800 words × 1.3 = ~2,340 tokens (plus a bit for your question and the system prompt, call it 2,500 total)
- Output: 300 words × 1.3 = ~390 tokens
At typical 2026 pricing for a mid-tier model (something like $3 per million input tokens and $15 per million output tokens):
- Input cost: 2,500 / 1,000,000 × $3 = $0.0075
- Output cost: 390 / 1,000,000 × $15 = $0.0058
- Total: ~$0.013, or about 1.3 cents
For a single summary, trivial. For 10,000 such summaries in a batch job, it adds up to ~$130. For a chatbot handling millions of similar requests a month, serious money.
Running this kind of math is how you plan AI usage. The per-request cost is small; the aggregate cost at scale can be the whole budget. Tokens are the lens that lets you see this clearly.
The takeaway
Tokens are the fundamental unit AI runs on — not words, not characters, but subword chunks that balance vocabulary size against expressive flexibility. They're what every pricing calculation, context window, and rate limit is denominated in. Internalizing the concept — and the rough rule that 1 token is about 0.75 words in English — is the key to understanding AI costs, limits, and performance in any practical sense.
For casual use, knowing the rough conversion is enough. For serious AI work — building products, running batch jobs, managing team budgets — thinking in tokens becomes essential. The tooling helps (official tokenizers, API usage reports), but the habit of thinking in tokens is what separates fluent AI users from those perpetually surprised by their bills.
Tokens aren't going away. Future models may change tokenization details, pricing may fluctuate, but the token-as-unit framing is here to stay. Learn it once; benefit forever.