Tokens sit behind two things you care about: what Claude costs and how well it works. Understanding them takes ten minutes and pays off every day. As in the other parts, each section gives you the picture first and an Expert view with the precise numbers.
What is a token?
A token is a small piece of text that the model reads and writes. Anthropic's pricing documentation describes tokens as "pieces of text that models process". A token may be a whole short word, part of a longer word, a number or a punctuation mark. The picture above is an illustration; real tools split text in their own way.
- 555kwords, roughly, in 1 million tokens
- 0.55words per token, roughly
- 30%more tokens for the same text on newer tokenisers
Expert viewTokenisers and counting
How many tokens a piece of text makes depends on the model's tokeniser, the language and the type of content. Anthropic says 1M tokens is roughly 555,000 words on its current tokeniser (and about 750,000 words on tokenisers before Claude Opus 4.7), and that models from Opus 4.7 onward produce about 30 percent more tokens for the same text than earlier models. The practical consequence is that token counts measured on one model should not be reused for another; count with the model you plan to use.
Anthropic provides a token counting endpoint that is free to use (with its own rate limits). The count is an estimate, and may include system-added tokens that you are not billed for. Image tokens are included in token budgets.
Why tokens matter twice
Cost
- On the API you pay per token, input and output (part 4)
- Longer conversations mean more input tokens each turn
Quality
- Everything on the page takes up the context window
- As tokens grow, accuracy and recall can degrade (context rot)
The hidden multiplier: every turn re-sends the history
This is the idea most people miss. According to Anthropic's documentation, each turn of a conversation includes all the previous history plus your new message as input. So the tenth message in a chat does not just cost the tenth message. It re-reads the first nine too.
Long conversations get more expensive and less sharp with every turn, even when your new messages are short.
Expert viewContext accumulation and the usage field
Anthropic's context-window documentation describes progressive token accumulation: each user message and assistant response accumulates, previous turns are preserved completely, and each turn's input contains the whole history plus the new message. Every API response reports consumption in its usage field, and with prompt caching the input is split into input_tokens, cache_read_input_tokens and cache_creation_input_tokens. Cached prefixes still occupy the window: caching changes what you pay, not whether the tokens count. In the Claude apps you do not see a token bill, but you see the effect as usage limits, so the same habits help.
- Instructions Standing instructions are re-sent every turn.
- Files you pasted Documents and images count as tokens too.
- Earlier questions Your past messages stay on the page.
- Earlier answers Claude's own replies are part of the history too, including any thinking.
- New message The newest question is usually the smallest part.
Takeaway. Most of a long chat is old material that is re-read on every turn.
Nine ways to use tokens well
- 1. Write concise promptsRemove warm-up text and repeated instructions.
- 2. Ask for short, structured output"Three bullets, under 60 words" costs far fewer output tokens than an essay.
- 3. Do not paste what is not neededShare the one function, not the whole codebase.
- 4. Summarise and start freshAsk for a summary of decisions, then begin a new chat with it.
- 5. Reuse repeated material with cachingSame long instructions each time? Cache them (API).
- 6. Pick the right modelHaiku for simple tasks, Sonnet for most work, Opus for hard reasoning.
- 7. Batch work that can wait50 percent off on the Batch API.
- 8. Let the tool manage contextCompaction summarises earlier turns automatically.
- 9. MeasureCheck usage, and count tokens before sending big requests.
- 1Everything is sent as inputSystem instructions, history, files and your new message.
- 2Claude may think firstThinking tokens count as output and use the window.
- 3The reply is writtenOutput tokens, priced higher than input on every current model.
- 4The reply joins the historyThe next turn will send it again as input.
- 5You pay for both sidesOn the API, each side is billed per token. In the apps it shows up as usage limits.
Takeaway. Each turn costs the whole history as input plus the new output.
Expert viewMechanics behind the savings
Anthropic's cost advice names the same levers: use appropriate models, implement prompt caching, batch operations and monitor usage. On cache economics, the pricing page says a cache read costs 0.1x the base input price (less on some models), a 5-minute write costs 1.25x and pays off after one read, and a 1-hour write costs 2x. For long-running API work, server-side compaction (beta) summarises earlier parts of a conversation automatically, and context editing can clear old tool results or thinking blocks. In Claude Code, /clear between unrelated tasks and /compact with a focus instruction are the manual equivalents, and subagents keep large file reads out of your main context.
Output is the pricier side: on every current model it is five times the input price per token, so constraining output length and structure is often the cheapest optimisation.
- 1Are you sending the same long text on every API call?Yes Cache it with prompt caching.No keep going
- 2Can the work wait for an answer?Yes Use the Batch API for 50 percent off.No keep going
- 3Has the chat grown long, or are you starting unrelated work?Yes Summarise the decisions and start fresh. In Claude Code use /clear or /compact.No keep going
- 4Is the task simple?Yes Pick a smaller model such as Haiku.No keep going
- 5OtherwiseTighten the prompt and ask for short, structured output.
Takeaway. Pick the lever that matches where your tokens go.
A worked example, then your own calculator
Suppose one request has 20,000 input tokens and 2,000 output tokens, with an input price of $2 per MTok and an output price of $10 per MTok. These rates are example numbers for the arithmetic, not a quote. Input: 20,000 divided by a million, times $2, is $0.04. Output: 2,000 divided by a million, times $10, is $0.02. Total: $0.06 for one request.
Now try your own numbers. Enter the prices from the official pricing page in whatever currency you like. Nothing is pre-filled, and nothing leaves your browser.
If the calculator does not appear, your browser has scripts turned off. The worked example above shows the same arithmetic by hand.
A simple token budget
- Decide what the task is worthSpend accordingly
- Choose the smallest model that worksMove up only when tests fail
- Keep prompts tight and outputs structuredSay the length you want
- Summarise long conversationsStart fresh with the summary
- Check usage weeklyAdjust what costs most
Frequently asked questions
How many tokens is a page of text?
A rough guide is that a token is a little over half a word, so a page of about 500 words is somewhere near 900 tokens. Count it with a tool when it matters.
Do images use tokens?
Yes. Anthropic's documentation says image tokens are included in token budgets.
Does a bigger context window mean I should paste everything?
No. More text can reduce accuracy. Give Claude what it needs.