On this page
- What are tokens in AI?
- How does tokenization work?
- How many words is a token?
- Do other languages use more tokens?
- Images, audio and video are tokens too
- Why do tokens decide what you pay?
- Why do output tokens cost more?
- The tokens you don't see
- Current API prices per million tokens
- What does a typical request cost?
- Do tokens matter on ChatGPT Plus or Claude Pro?
- How do you count tokens?
- How to spend fewer tokens
- Frequently asked questions
Tokens are the small chunks an AI model reads and writes: whole words, pieces of words, punctuation marks, and even patches of an image or slices of audio. In English, one token averages about four characters, or roughly three quarters of a word, by OpenAI's rule of thumb, so 1,000 tokens is about 750 words.
They matter because every API bill is counted in them. Providers quote a price per million tokens, charge separately for what you send and what the model writes back, and on the top models from OpenAI, Anthropic and Google an output token costs five times as much as an input token. This guide covers how tokenization works, how many tokens your text, images and audio use, the hidden tokens that pad a bill, current prices, and how to count and cut your usage.
What are tokens in AI?
A language model doesn't see letters. Before your prompt reaches it, a program called a tokenizer cuts the text into tokens and swaps each one for a number from a fixed list, the model's vocabulary. The model works with those numbers, predicts the next one, and the tokenizer turns its output back into text you can read.
A token can be a whole word, part of a word, a single character or a punctuation mark, and Anthropic's glossary adds that it can even be a raw byte. Common words usually get a token of their own. Rarer ones get split: OpenAI's tiktoken documentation uses "encoding" as its example, which becomes "encod" plus "ing".
Small details change the result. OpenAI's help center points out that "red", "Red" and " red" (with a leading space) can each be tokenized differently.
Why not just use whole words? Anthropic's glossary explains the trade-off. Bigger tokens make a model more efficient, while smaller ones let it handle rare or brand-new words it never saw in training. Subword tokens give you both: a vocabulary of manageable size that can still spell out anything.
How does tokenization work?
Many tokenizers, including OpenAI's tiktoken, are built with a method called byte pair encoding (BPE). Hugging Face's LLM course describes how a BPE tokenizer is trained:
- Start with a base vocabulary of every individual symbol in a large body of training text.
- Find the pair of neighboring symbols that appears most often and merge it into a new token.
- Repeat, building longer chunks each round, until the vocabulary reaches its target size.
BPE began as a text-compression method, and it still behaves like one. OpenAI's tiktoken README says a token corresponds to about 4 bytes of text on average, and that the process is lossless, so tokens always decode back to the exact original. GPT-2 and RoBERTa use a byte-level version whose base vocabulary is just 256 byte values, which means any character in any language can be represented, even one the tokenizer never saw.
The big AI companies each train their own tokenizer on their own data, so the vocabularies differ. That's why the same paragraph produces a different count on ChatGPT, Claude and Gemini, and sometimes on two models from the same company. Anthropic says Claude Opus 4.7 and later models use a newer tokenizer that produces approximately 30% more tokens for the same text than earlier Claude models, with the exact increase depending on the content.
How many words is a token?
Each provider publishes its own rule of thumb for English:
| Provider | Rule of thumb | What 1,000 tokens is |
|---|---|---|
| OpenAI | About 4 characters, or three quarters of a word | About 750 words |
| Google (Gemini) | About 4 characters; 100 tokens is 60 to 80 words | About 600 to 800 words |
| Anthropic (Claude) | About 3.5 characters on models before Claude Opus 4.7; newer models make about 30% more tokens from the same text | About 555 words on current models, about 750 on older ones |
Turn it around and 1,000 English words is roughly 1,330 tokens by OpenAI's rule. Anthropic's models overview puts 1 million tokens at roughly 555,000 words on Claude's current tokenizer, against about 750,000 on the models before it. Its pricing docs add a few more reference points: an average 10 kB web page is about 2,500 tokens, a large 100 kB documentation page about 25,000, and a 500 kB research paper PDF about 125,000.
These are estimates for ordinary English text. For anything that matters, count the real thing (see the counting section below).
Do other languages use more tokens?
Often, yes, and it costs real money. A NeurIPS 2023 paper by University of Oxford researchers found that the same text translated into different languages can differ in token length by up to 15 times, and the gap showed up in all 17 tokenizers they tested, including ones built for multilingual use. A separate 2023 study by Orevaoghene Ahia and colleagues looked at 22 languages on OpenAI's API and concluded that speakers of many of them were overcharged while getting worse results.
Both studies tested the tokenizers of 2023, and tokenizers have changed since, so neither tells you the exact gap on today's models. If you work in another language, count a sample of your own text before you estimate costs.
Images, audio and video are tokens too
Models that accept other media turn it into tokens as well, and those tokens are billed as input.
- Images on Claude. Anthropic splits an image into 28 by 28 pixel patches, one token each, so a 1000 by 1000 pixel image is 1,296 tokens. Claude 4.7 and later models take images up to 2,576 pixels on the long edge, capped at 4,784 tokens, and larger images are scaled down. Anthropic's own example puts 1,000 of those 1000 by 1000 images at about $5.18 on Claude Opus 5.5.
- Images on Gemini. An image 384 pixels or smaller on both sides counts as 258 tokens. Larger images are cut into 768 by 768 pixel tiles of 258 tokens each.
- Audio on Gemini. 32 tokens per second, so an hour of audio comes to about 115,200 tokens.
- Video on Gemini. Google's token guide gives about 100 tokens per second at default resolution and about 300 at high resolution, so a one-minute clip is roughly 6,000 or 18,000 tokens. The same page also quotes 263 tokens per second in another section, so treat these as approximate.
Anthropic says a high-resolution image can use up to roughly three times as many tokens as the same image on its older models, and advises downsampling when you don't need the extra detail.
Why do tokens decide what you pay?
Almost every AI API charges per token, quoted per million tokens (often written MTok). For a single request, the bill is:
(input tokens × input price) + (output tokens × output price)
Cached input gets a discount, and some models add a surcharge for very long prompts.
Input is everything you send: the system prompt, the conversation so far, attached documents, tool definitions and your question. Output is everything the model generates in reply.
Why do output tokens cost more?
On the top models from all three big providers, an output token costs five times as much as an input token: $8 versus $40 per million on Claude Fable 5.2 and on GPT-6.2 Astra, and $2 versus $10 on Gemini 4 Carbon, rising to $4 versus $20 on 1 December 2026. The same ratio holds one step down, on Claude Opus 5.5 and Gemini 4 Argon.
The providers don't publish their reasoning, but the usual technical explanation is how models run. NVIDIA's engineers describe two phases. In the prefill phase, the model processes your whole prompt at once, a parallel job that keeps the GPU fully busy. In the decode phase, it writes one token at a time, each depending on the ones before, and spends much of that time waiting for data to move through memory. Writing is the slower, less efficient part, so it's priced higher.
The tokens you don't see
Several kinds of tokens land on your bill without showing up as text in the chat:
- Reasoning tokens. Models that think before they answer generate reasoning tokens. OpenAI says these are billed as output even though they aren't shown as answer text. Anthropic says the same of Claude's thinking, and adds that you pay for the full thinking even when the API returns only a summary of it. Google lists Gemini's output price as including thinking tokens.
- Conversation history. Earlier turns generally count again as input on each new turn, so the same question costs more deep into a long chat. Google's token guide says a follow-up turn's usage includes the tokens from the earlier turn, and Anthropic notes that web search results keep counting as input in later turns.
- Tool definitions and results. When a model can call tools, their names, descriptions and schemas are input tokens, and so is every result fed back to the model. Claude also adds a hidden tool-use system prompt of 286 tokens on Claude Opus 5.5, on top of your own definitions.
Current API prices per million tokens
| Model | Input | Cached input | Output | Notes |
|---|---|---|---|---|
| Claude Fable 5.2 | $8 | $0.20 | $40 | |
| Claude Opus 5.5 | $4 | $0.20 | $20 | |
| Claude Sonnet 5.5 | $2 | $0.10 | $10 | |
| Claude Haiku 5.5 | $0.10 | $0.01 | $0.50 | Prompts up to 100,000 tokens; $0.50 and $2.50 above that |
| GPT-6.2 Astra | $8 | $0.40 | $40 | Prompts up to 272K tokens; $16 and $60 above that |
| GPT-6.2 Sol | $2 | $0.10 | $10 | Prompts up to 272K tokens; $4 and $15 above that |
| Gemini 4 Carbon | $2 | $0.10 | $10 | Through 30 November 2026; $4, $0.20 and $20 from 1 December 2026 |
| Gemini 4 Argon | $2 | $0.10 | $10 | Through 30 November 2026; $4, $0.20 and $20 from 1 December 2026 |
| Gemini 3.5 Flash-Lite | $0.30 | $0.03 | $2.50 |
For Claude, the cached price is what a cache hit costs; writing to the cache costs 1.25 times the normal input price for a five-minute cache, or twice the price for a one-hour cache. OpenAI charges for cache writes too: on GPT-6.2 Astra, $10 per million tokens for a 30-minute cache and $20 for a 12-hour one. For Gemini, the cached column is Google's context caching rate, and Gemini 3.5 Flash-Lite adds a storage fee of $1 per million tokens per hour. OpenAI released GPT-6.2 Astra and Sol on 17 November 2026, with Astra's prices 20% below GPT-6 Astra's.
All three companies also sell batch processing at half the standard rate for jobs that don't need an instant answer.
What does a typical request cost?
Say a customer-support bot sends 2,000 input tokens per request (a system prompt, some history and the question, around 1,500 words) and gets back a 500-token answer (around 375 words). At standard rates, before caching or batch discounts:
| Model | Input cost | Output cost | Per request | Per 100,000 requests |
|---|---|---|---|---|
| Claude Haiku 5.5 | $0.0002 | $0.00025 | $0.00045 | $45 |
| Claude Sonnet 5.5 | $0.004 | $0.005 | $0.009 | $900 |
| GPT-6.2 Sol | $0.004 | $0.005 | $0.009 | $900 |
| Gemini 4 Argon (through 30 November) | $0.004 | $0.005 | $0.009 | $900 |
| Claude Opus 5.5 | $0.008 | $0.010 | $0.018 | $1,800 |
| Gemini 4 Argon (from 1 December) | $0.008 | $0.010 | $0.018 | $1,800 |
| GPT-6.2 Astra | $0.016 | $0.020 | $0.036 | $3,600 |
Two caveats keep this table honest. The same text won't come to exactly 2,000 tokens on every model, because their tokenizers differ. And as OpenAI's own help page warns, a lower price per token doesn't guarantee a lower total, since a model that writes longer answers or reasons more can cost more per task. OpenAI pitches GPT-6.2 Astra on exactly that point, saying it used 22% fewer output tokens than GPT-6 Astra on its GDPval v2 benchmark. The fair test is cost per finished task on your own prompts.
Do tokens matter on ChatGPT Plus or Claude Pro?
Not on your bill. Consumer plans charge a flat monthly fee, and our guide to ChatGPT plans and what each tier includes covers the details. Tokens still decide how quickly you run into your limits, though. Anthropic's help center lists message length, attachment size, the length of the current conversation, tool use such as research and web search, the model, the effort level, artifacts and multi-step tasks as the things that use up Claude's limits faster. Most of those come down to how many tokens each message carries.
Two habits help: start a fresh chat when you change topic, so you're not dragging a long history along, and attach only the pages you need.
AI agents go through tokens fastest, because every step reads files, calls tools and feeds the results back in as input. Our explainer on what an AI agent is and how its loop works shows why a single request can turn into dozens of model calls.
Running a model on your own computer removes the per-token fee entirely, and you pay in hardware and electricity instead. Token counts still limit how much text the model can take in at once. Our guide to running an LLM locally covers the setup.
How do you count tokens?
Before you send a request:
- OpenAI. Paste text into the Tokenizer at platform.openai.com/tokenizer to see how it splits, or use the open-source tiktoken library in Python. For a full request with images, files and tools, the
POST /v1/responses/input_tokensendpoint takes the same payload as a normal Responses API call and returns the input count. - Anthropic. The
POST /v1/messages/count_tokensendpoint takes the same input as a normal request, including base64 images, PDFs and your own tools (server tools such as web search aren't supported). It's free, with a limit of 5,000 requests a minute on the entry-level Start tier, and the count is an estimate that can differ slightly from the real request. In Anthropic's own example, the system prompt "You are a scientist" plus the message "Hello, Claude" comes to 14 tokens. - Google.
count_tokens(countTokensin JavaScript) returns the input total for a Gemini request.
A quick local check with tiktoken looks like this. Pick the encoding that matches your OpenAI model; this example uses o200k_base:
import tiktoken
enc = tiktoken.get_encoding("o200k_base")
print(len(enc.encode("What are tokens in AI?")))
After you send a request, the response itself reports what you used. Gemini's usage data, for example, separates input, output, thinking, cached and tool-use tokens.
Use each provider's own counter for its own models. A count from OpenAI's tokenizer won't match Claude or Gemini, and Anthropic tells developers to recount prompts on the exact model they plan to use rather than reuse counts from an older one.
How to spend fewer tokens
- Use the smallest model that does the job. Anthropic's own advice is Haiku for simple tasks, Sonnet for most production work and Opus for the hardest reasoning. Claude Haiku 5.5's input price is one fortieth of Claude Opus 5.5's.
- Cache what repeats. Put fixed content, such as a long system prompt or a reference document, at the start of the prompt so it can be cached. On Claude Opus 5.5 and Sonnet 5.5 a cache hit costs 5% of the normal input price, and on GPT-6.2 Astra cached input is $0.40 instead of $8. Anthropic says a five-minute cache pays for itself after one read and a one-hour cache after two, and OpenAI's GPT-6.2 announcement advises keeping prompt prefixes unchanged and appending new instructions to the conversation.
- Batch what can wait. Overnight reports, bulk tagging and other jobs that don't need an instant reply cost half as much through the batch APIs.
- Limit output. Set a maximum output length, ask for short answers when that's all you need, and use a lower reasoning or effort setting for simple tasks so the model spends fewer thinking tokens.
- Trim the input. Send only the pages you need, drop old conversation turns and downsample images.
- Watch long-prompt surcharges. GPT-6.2 Astra's price rises above 272K input tokens and Claude Haiku 5.5's above 100,000, while Anthropic says Claude 4.6 and later models other than Haiku 5.5 charge the same rate across their full 1 million token context window.
Frequently asked questions
How many words is 1,000 tokens?
About 750 English words, using OpenAI's rule that a token is roughly three quarters of a word. Google's guidance for Gemini works out to 600 to 800 words, Anthropic's figures for current Claude models to about 555, and many other languages need more tokens for the same text.
Are tokens the same in ChatGPT, Claude and Gemini?
No. Each company trains its own tokenizer, so the same text gives a different count on each. Anthropic says Claude Opus 4.7 and later models produce about 30% more tokens than earlier Claude models, so count with the provider's own tool.
Why are output tokens more expensive than input tokens?
Models read your whole prompt in parallel but write their answer one token at a time, which uses the hardware less efficiently. On the current top models from OpenAI, Anthropic and Google, output costs five times as much as input.
Do I pay per token on ChatGPT Plus or Claude Pro?
No. Consumer subscriptions are a flat monthly price. Tokens still matter there, because long messages, big attachments and long conversations use up your usage limits faster.
What does "per MTok" mean?
MTok means a million tokens. Claude Opus 5.5's input price of $4 per MTok means $4 for every million input tokens, which Anthropic puts at roughly 555,000 English words on its current tokenizer.
Do spaces and punctuation count as tokens?
Yes. Punctuation marks can be tokens of their own, and spaces change how words are split: OpenAI notes that "red" and " red" with a leading space can be tokenized differently.
Sources
- What are tokens and how to count them, OpenAI Help Center
- tiktoken, OpenAI on GitHub
- Pricing, OpenAI API docs
- Introducing GPT-6.2 Astra and Sol, OpenAI
- OpenAI's GPT-6.2 Astra finally arrives, Digital Trends
- Counting tokens, OpenAI API docs
- Glossary, Claude Docs
- Models overview, Claude Docs
- Pricing, Claude Docs
- Token counting, Claude Docs
- Vision, Claude Docs
- Thinking, Claude Docs
- Usage limit best practices, Claude Help Center
- Understand and count tokens, Google AI Studio docs
- Gemini API pricing, Google AI Studio docs
- Gemini 4 Argon launches with an introductory API discount, Let's Data Science
- Gemini 4 Carbon model page, Google AI Studio docs
- Google rolls out Gemini 4 Carbon to general public, Let's Data Science
- Byte-Pair Encoding tokenization, Hugging Face LLM Course
- Mastering LLM Techniques: Inference Optimization, NVIDIA Technical Blog
- Language Model Tokenizers Introduce Unfairness Between Languages, NeurIPS 2023
- Language Model Tokenizers Introduce Unfairness Between Languages, arXiv
- Do All Languages Cost the Same? Tokenization in the Era of Commercial Language Models, arXiv
Was this helpful?
Thanks, noted. It helps decide what gets updated first.


