Every time you type a message into an AI chatbot, something happens before the model reads your words. The text gets broken into smaller pieces called tokens. These tokens are the actual units that an LLM processes, generates, and charges you for.
Understanding tokens matters because they control two things most users care about: cost and capability. Among the core concepts in LLM basics, tokens are one of the most practical to learn early. The number of tokens in your conversation determines how much you pay and how much text the model can handle.
Whether you are writing a single prompt or processing a 50-page document, tokens shape the experience. Getting familiar with how they work helps you manage costs, write better prompts, and avoid running into limits mid-conversation. The concept connects directly to how large language models process every piece of text you send them.
Key Takeaways
What Tokens Are and How Tokenization Works
A token is the smallest unit of text that a language model processes. It is not a word, a letter, or a sentence. Instead, a token is a text fragment the tokenizer has learned to recognize as a meaningful chunk.
Token: The smallest unit of text an LLM processes. A token can be a whole word, part of a word, a number, or a punctuation mark. Most English words equal 1 to 2 tokens.
When you send text to a model, a program called a tokenizer splits your input into pieces. The tokenizer assigns each piece a numeric ID from a fixed vocabulary. The model then works entirely with these numbers, not with readable text.
Think of it like a translator converting your message into a code the model understands. The model never sees the word “hello.” It sees the number 9906, or whatever ID its vocabulary assigns to that token.
How Tokenizers Split Text
Most modern tokenizers use a method called Byte Pair Encoding (BPE) or a close variant. BPE works by analyzing a large body of text during training. It starts with individual characters and repeatedly merges the most common pairs into single tokens.
The result is a vocabulary of tens of thousands to about 200,000 tokens that balances efficiency and coverage. Common English words like “the” or “hello” become single tokens. Less common words get split into smaller pieces.
The word “tokenization,” for example, might become three tokens: “token,” “ization,” and the space before it. The word “cat” stays whole because it appears often enough to earn its own token.
Numbers, punctuation, and whitespace also become tokens. A period is one token. A comma is one token.
Even spaces sometimes merge with the following word into a combined token. That is why you might see tokens like ” world” with a leading space.
Different model providers build their own tokenizer vocabularies. OpenAI publishes its encodings in the open-source tiktoken library, which maps GPT-4o and GPT-5 models to o200k_base, a vocabulary of about 200,000 tokens. OpenAI has not published which encoding its GPT-6 models use.
Google’s SentencePiece approach produces a different-sized vocabulary with different merge patterns. This is why the same text creates a different number of tokens across models.
Why Not Just Use Words?
Languages are messy. English alone has hundreds of thousands of words, plus slang, abbreviations, technical terms, and typos.
A word-level system would need an enormous vocabulary. It would also fail on any word it had not seen before.
Token-based systems handle this gracefully. An unfamiliar word simply gets split into smaller known pieces.
The word “cryptocurrency” might split into “crypt” and “ocurrency.” A common word like “cat” stays whole. This flexibility is part of how LLMs work under the hood.
The subword approach also helps with new terminology. When a brand-new product name appears for the first time, the model does not crash. It tokenizes the name into known fragments and processes them normally.
The 0.75 Rule for Estimating Token Counts
A useful rule of thumb from OpenAI’s help center: one token is about 4 characters of English, or about three quarters of a word. So 100 tokens is roughly 75 words, and one word is about 1.3 tokens. Google gives the same 4-character figure for Gemini.
Claude is the exception. Anthropic says the tokenizer in Claude Opus 4.7 and later, including Opus 5.5 and Haiku 5.5, makes about 30% more tokens for the same text. By Anthropic’s own figures, one token there covers about 0.55 words, or about 1.8 tokens per word.
So a 1,000-word document is about 1,300 tokens on OpenAI and Gemini models, and about 1,800 on current Claude models.
This ratio shifts depending on what you are writing. Conversational English stays close to the averages above. Technical text with long compound words pushes the count higher.
Code is especially token-heavy. Programming syntax, variable names, and special characters all produce additional tokens. A 100-line Python script might use twice as many tokens as 100 lines of plain English.
Non-English languages often need more tokens for the same meaning. In OpenAI’s own example, the Spanish greeting “Cómo estás” uses 5 tokens for 10 characters. That makes the same request more expensive in many languages other than English.
How to Count Tokens
You don’t have to guess. For a quick check, paste your text into a free counter and see exactly where it splits.
OpenAI offers a free Tokenizer tool that shows exactly how your text splits into tokens. Paste any text and watch it highlight each token boundary.
In Python, OpenAI’s tiktoken library counts tokens on your own machine. It has no entry for GPT-6 models yet, so treat its counts for them as an estimate. For counts from the provider itself, before you send a request, each one has an API endpoint:
- OpenAI:
POST /v1/responses/input_tokens, described in OpenAI’s token counting guide. - Anthropic:
POST /v1/messages/count_tokens, which is free to use and returns an estimate, per Anthropic’s token counting docs. - Google: the
countTokensmethod in the Gemini API, covered in Google’s tokens guide.
Count with the model you plan to use. Anthropic warns that counts measured on Claude models before Opus 4.7 don’t carry over to newer ones.
How Tokens Affect Your Day-to-Day LLM Use
Tokens and Pricing
API providers charge per token for both input (your prompt) and output (the model’s response). A 500-word prompt and a 1,000-word response come to roughly 650 input and 1,300 output tokens on OpenAI and Gemini models. On current Claude models, the same text is closer to 900 and 1,800 tokens.
These costs vary widely between models. As of November 1, 2026, OpenAI charges $2.00 per million input tokens and $10.00 per million output tokens for GPT-6.1 Sol, per OpenAI’s API pricing. Claude Sonnet 5.5 costs the same $2.00 and $10.00, per Anthropic’s pricing page.
These are API prices for developers. In ChatGPT chats, paid plans run GPT-6 Sol, and you pay a monthly fee instead of a per-token bill.
Output tokens almost always cost more than input tokens. The difference is often 3 to 8 times higher for output. This means the model’s response is the bigger cost driver, not your prompt.
Shorter, focused prompts that produce concise answers save money at scale. A chatbot handling 10,000 conversations daily will notice significant cost differences between average reply lengths. Reducing average output from 500 tokens to 200 tokens per response cuts output costs by 60%.
To put these numbers in perspective, consider processing a 10,000-word report. On GPT-6.1 Sol it is about 13,000 input tokens, costing about $0.026. Claude’s newer tokenizer turns it into about 18,000 tokens, so sending it to Claude Opus 5.5 costs about $0.072.
On Gemini 3.8 Flash, about 13,000 tokens cost about $0.01 at its price through December 31, 2026. The output cost for a 1,000-word summary adds more on top. These per-document differences seem small, but they multiply quickly for businesses processing hundreds of documents daily.
Cached Input and Reasoning Tokens
Two more token types show up on API bills. Cached input tokens are parts of a prompt the provider processed recently, such as a long system prompt you resend with every request. They cost far less: GPT-6.1 Sol charges $0.10 per million cached input tokens, against $2.00 for fresh input.
Reasoning tokens are the model’s hidden thinking before it answers. OpenAI says they are not visible through the API but still take up context window space and are billed as output tokens. Google likewise prices Gemini output including thinking tokens.
That is why a short answer can cost more than it looks. A 50-word reply that took 2,000 reasoning tokens to work out is billed for about 2,070 output tokens, not 70.
Tokens and Context Windows
Every model has a maximum number of tokens it can handle in a single conversation. This limit is called the context window. It includes your input and the model’s output combined.
Current models from all three providers offer about 1 million tokens of context. OpenAI’s GPT-6 models list 1,050,000 on OpenAI’s model pages, and Google’s Gemini 4 Argon and 3.8 Flash list 1,048,576. Current Claude models have 1,000,000, per Anthropic’s model overview, while older ones such as Claude Haiku 4.5 stop at 200,000.
How many words fit depends on the tokenizer. Anthropic puts 1 million tokens at about 555,000 words on Claude’s current tokenizer, against about 750,000 on Claude models before Opus 4.7. Either way, that is several novels’ worth of text, enough for multi-document analysis and long conversations.
When a conversation outgrows the context window, the model can no longer see all of it word for word. Long documents, extended conversations, and detailed instructions all consume tokens from this shared pool. Users often hit this limit without realizing it during long chat sessions.
Tokens and Response Quality
Token limits shape output quality in ways that are less obvious. When the model has room to process more tokens, it can maintain coherence over longer responses. Cramming too much into a single prompt leaves fewer tokens for the reply.
This creates a practical trade-off. A detailed 2,000-token prompt gives the model more context but less room to reply. A minimal 200-token prompt provides plenty of output space but less guidance.
Experienced users balance this through prompt design that provides enough context without wasting tokens on unnecessary detail. Including only the most relevant information often produces better results than pasting entire documents.
Tokens and Conversation Memory
In a multi-turn conversation, every previous message stays in the context window. Your first message, the model’s first reply, your second message, and so on. All of these accumulate tokens.
After enough back-and-forth exchanges, the total exceeds the limit. What happens next depends on the app, and most apps do not document it. Claude on paid plans with code execution enabled summarizes earlier messages to make room, according to Anthropic’s help center.
This explains why long chats sometimes feel like the model “forgot” what you discussed. It did not forget in a human sense. Earlier messages were trimmed or condensed to make room for newer ones, and details got lost along the way.
For users who rely on long conversations, this creates a practical concern. Instructions, personas and style preferences you typed early in a chat can fade once the token total grows too large. Repeating key instructions, or starting a fresh chat with a short summary, keeps them in view.
Token Characteristics Across Major Models
Each provider uses its own tokenizer, which means the same text produces different token counts depending on the model. The table below compares current models, with API prices as of November 1, 2026.
| Model | Provider | Context Window | Input Cost (per 1M) | Output Cost (per 1M) | Words per 1M Tokens (provider estimate) |
|---|---|---|---|---|---|
| GPT-6.1 Sol | OpenAI | 1,050,000 | $2.00 | $10.00 | About 750,000 |
| GPT-6 Luna | OpenAI | 1,050,000 | $0.10 | $0.50 | About 750,000 |
| Claude Opus 5.5 | Anthropic | 1,000,000 | $4.00 | $20.00 | About 555,000 |
| Claude Haiku 5.5 | Anthropic | 1,000,000 | $0.10 for prompts up to 100K tokens, $0.50 above | $0.50 up to 100K, $2.50 above | About 555,000 |
| Gemini 4 Argon | 1,048,576 | $2.00 until Nov 30, 2026, then $4.00 | $10.00 until Nov 30, 2026, then $20.00 | 600,000 to 800,000 | |
| Gemini 3.8 Flash | 1,048,576 | $0.75 until Dec 31, 2026, then $1.50 | $3.75 until Dec 31, 2026, then $7.50 | 600,000 to 800,000 |
Prices and context windows checked November 1, 2026, on OpenAI’s pricing page, Anthropic’s pricing page and Google’s Gemini API pricing page. Words per million tokens come from each provider’s own rule of thumb, so treat them as estimates.
The price spread is dramatic. One million input tokens cost $0.10 on GPT-6 Luna, or on Claude Haiku 5.5 for prompts up to 100,000 tokens. The same volume costs $10.00 on GPT-6 Astra or Claude Fable 5.1, the top models from OpenAI and Anthropic.
That is a 100x cost difference for the same amount of text, though the models differ greatly in capability.
Different tokenizers also produce different token counts for identical text. A paragraph tokenized by OpenAI’s o200k_base encoding might produce 85 tokens.
Google’s SentencePiece tokenizer might return 91 for the same paragraph. These small differences compound over thousands of API calls.
What we measured: across our October 2026 Lab tests, GPT-6 Sol used 1.32 tokens per word, Gemini 1.38 and Claude Opus 5.5 2.14. On one prompt in our instruction following test, each model wrote exactly 75 words. That came to 92 tokens for GPT-6 Sol, 94 for Gemini 4 Argon and 174 for Claude Opus 5.5.
Each model wrote its own answers (15 each, 14 for Gemini), so this is not the same text run through three tokenizers. The counts cover published answers only, with no hidden thinking tokens, and ChatGPT’s counts use o200k_base because tiktoken has no entry for GPT-6 Sol. Gemini’s figure mixes 3.8 Flash in our writing quality test with 4 Argon, and Claude’s sits above Anthropic’s own estimate of about 1.8.
The practical takeaway is that comparing “price per token” across providers requires caution. A model with cheaper tokens that produces more tokens for the same text may not actually cost less. Calculating total cost for a sample workload gives a more accurate picture than raw per-token rates.
When Tokens Work For and Against You
Strengths
- Flexible handling of any text. The subword approach means models process misspelled words, new slang, and mixed-language text without breaking. No input is truly “unknown” to a tokenizer, because unfamiliar words always fall back to smaller known pieces.
- Predictable pricing structure. Token-based billing makes costs transparent and calculable ahead of time. You can estimate expenses before running a task by counting tokens in your planned input and expected output length.
- Efficient compression of common patterns. Frequent words compress into single tokens. Common phrases like “the” or “and” take up minimal space, leaving more of the context window available for meaningful, unique content.
Limitations
- Non-English text costs more. Many languages need more tokens than English to say the same thing. This means non-English users pay more and get shorter effective context windows for the same amount of readable text.
- Counting tokens is unintuitive. Users cannot reliably predict token counts by looking at their text. A 10-word sentence might produce 12 tokens or 18, depending on which words appear and how the tokenizer splits them.
- Hidden overhead eats into your limit. System prompts, conversation history, and formatting instructions all consume tokens invisibly. A chatbot with a 500-token system prompt starts every conversation with less available context than the stated limit suggests.
- Multimodal inputs add up quickly. Images, PDFs, and audio files get converted into token equivalents before processing. On Claude, a 1092 × 1092 pixel image costs about 1,521 tokens, per Anthropic’s vision guide, which leaves less space for text.
System prompts and conversation history consume tokens from your context window before you type a single word. A chatbot with a detailed system prompt might use 2,000 or more tokens before the conversation starts, reducing the space available for your actual content.
Common Misunderstandings About Tokens
“Tokens are the same as words.” This is the most widespread misconception. Tokens and words overlap often, but they are not the same unit.
Short, common words map to one token. Longer or rarer words split into multiple tokens.
Punctuation usually counts as its own token, while spaces usually merge with the next word. This distinction trips up most beginners when they start exploring how language models actually process text.
“All models count tokens the same way.” Providers use different tokenizers with different vocabularies. The same 500-word email produces a different token count in ChatGPT, Claude, and Gemini. This matters when comparing what LLMs actually cost, because a “cheaper per token” model might tokenize your text into more pieces.
“Only my prompt uses tokens.” Both sides of the conversation count toward your total. Your input tokens and the model’s output tokens draw from the same context window and both appear on your bill. People often underestimate usage because they only consider what they typed.
“A bigger context window automatically means better results.” More space does not guarantee better output. Models can struggle with accuracy over very long inputs, even within their stated limits. One widely cited 2023 study, Lost in the Middle, found that models recall information buried mid-input less reliably than content near the start or end.
“Tokens only matter if you use the API.” Users on subscription plans like ChatGPT Plus, Claude Pro, or Google AI Pro never see per-token charges. But tokens still limit their context windows, and early details can be trimmed or summarized in long chats. The practical limits of language models apply regardless of how you pay for access.
Why Token Awareness Matters Before You Start
Tokens are the currency of every LLM interaction. They determine what you pay, how much the model remembers, and whether your document fits in a single conversation. Ignoring them leads to unexpected costs, truncated responses, and conversations where the model loses track of your instructions.
The good news is that token awareness does not require deep technical knowledge. Knowing your model’s ratio gives you a quick estimator. Checking your model’s context window tells you how much content fits.
Understanding that output costs more than input helps you budget effectively. These three basics cover most practical situations.
Once you have a feel for how tokens work, decisions about AI tools become clearer. Picking a model with a larger context window makes sense for document analysis.
A cheaper per-token model works better for high-volume, simple tasks. Choosing the right model becomes a more informed decision when token economics are part of the equation.