AI · for biologists who use Claude · 12 minutes
What is a token?
Claude does not read letters or words. It reads tokens, and tokens are also the unit on the bill, the unit of its memory, and the unit of its usage limits. Here is what one is, and what 100 000 of them get you.
Start here the idea in bench terms
Before Claude sees your text, a program called a tokenizer cuts it into pieces taken from a large, fixed dictionary of text fragments. Frequent words are one piece. Rare words are assembled from several smaller pieces. Each piece is a token, and from then on the model works with tokens only.
A useful picture: a restriction digest with a very large set of enzymes, chosen so that ordinary language falls into long fragments and unusual strings fall into short ones. English prose is ordinary. A gene accession number, a DNA sequence or a column of p-values is not.
- Input tokens
- Everything Claude reads for one reply: your message, the instructions, attached files, and the whole conversation so far.
- Output tokens
- Everything Claude writes, including reasoning it does before answering. Output costs five times as much as input.
- Context window
- The most tokens Claude can hold in view at once, input and output together. Think of it as bench space. Current models have room for a million tokens.
- API
- The way to call Claude from a script or a program instead of the chat window. API use is billed per token.
1. Cut some text into tokens
Type or paste anything, or pick an example. Compare an English sentence with a sequence.
2. What do 100 000 tokens hold, and what do they cost?
As text
Assumes about 2.7 characters per token for English on current Claude models, 6 characters per word including the space, 500 words per page and 7 500 words per paper. Other languages, code, tables and sequences need more tokens for the same length.
As money (API list prices, US dollars)
Prices per million tokens as listed on 1 December 2026. They change, so check the pricing page before you budget.
3. Why a long chat gets expensive
Claude has no memory between messages. Every time you send a message, the whole conversation so far is sent again, together with any file you attached at the start. You type one new question. Claude re-reads everything.
One bar per message you send. Dark: material Claude has already read in earlier turns and reads again. Light: what is new in this turn.
4. What counts as a token
| Item | Counted as | Good to know |
|---|---|---|
| Your message | Input | Usually the smallest item on the bill. |
| Instructions (system prompt, project instructions) | Input, on every turn | A two-page instruction block is read again with each message. |
| Earlier turns of the conversation | Input, on every turn | The reason long chats cost more per message than short ones. |
| Attached text, pasted tables, FASTA files | Input, on every turn | A 500 kB research paper is in the region of 125 000 tokens. |
| Images | Input | Priced by size, not by content: one token per 28 × 28 pixel patch. Large images are shrunk first. Try it below. |
| PDF pages | Input | Each page counts twice: as its text, and as an image of the page (at most 1 568 tokens). |
| Tools and web search | Input | Tool descriptions and everything a tool returns are read by Claude. On the API, web search also costs $10 per 1 000 searches. |
| Thinking | Output | Reasoning before the answer is billed as output, even when the reasoning text is not shown to you. |
| Claude's answer | Output | Five times the input price. A single reply can run to 128 000 tokens. |
How many tokens is my micrograph?
5. Subscription or API: two ways to pay for the same tokens
| Claude apps (chat, desktop, Claude Code on a plan) | Claude API | |
|---|---|---|
| You pay | A flat monthly fee | Per token, from prepaid credits. There is no free tier, and the smallest purchase is $5. |
| The limit | A usage allowance that refills: a five-hour window that starts with your first message, plus a weekly limit | Your budget, and rate limits per minute |
| What uses it up | The same things in both: long conversations, large attachments, tools and connected apps, more thinking, and larger models. | |
| Where to look | Settings, then Usage | The usage page of the Claude Console, and the usage block in every API response |
On a subscription nobody shows you a token count, but the allowance is drained by the same mechanics as in section 3. If you hit a limit halfway through the afternoon, a very long chat with a large file attached is the usual reason.
6. Plan a job before you run it
Do not guess the input size. Counting is free and takes three lines:
import anthropic
client = anthropic.Anthropic()
n = client.messages.count_tokens(
model="claude-opus-5-5",
messages=[{"role": "user", "content": open("abstract.txt").read()}],
)
print(n.input_tokens)
The count is an estimate and depends on the model, so count with the model you plan to use.
7. Seven habits that save tokens
- New topic, new chat. Yesterday's 40 messages about figure legends are re-read every time you ask about statistics.
- Do not paste raw data into the chat. A FASTA file or a 50 000-row table costs a great many tokens, and long raw data is not what a language model reads best. Let Claude write and run code on the file, or paste a small sample and the column names.
- Crop and downscale images. A micrograph larger than the model's limit is shrunk before Claude sees it, so fine detail is lost and you still pay the maximum. Send the region that matters.
- Ask for the length you need. Output is the expensive side. "Answer in five bullet points" is a cost control.
- Match the model to the task. Pulling gene names out of 10 000 abstracts does not need the largest model. Between the smallest and the largest, the price differs by a factor of 80.
- Batch what can wait. Overnight jobs on the API cost half.
- Cache what repeats. If every call starts with the same protocol or the same paper, prompt caching makes the repeated part far cheaper.
8. Check yourself
Sources, date and caveats
Facts and prices were taken from Anthropic's public documentation on 1 December 2026: pricing, glossary (tokens), token counting, context windows, vision (image tokens), PDF support, and the help article How do usage and length limits work?
The documentation states that current Claude models produce about 30 % more tokens for the same text than earlier models, on which a token was about 3.5 English characters. The figure of 2.7 characters per token used here is derived from that, and is an average for English only. The token cutter in section 1 is an illustration with invented rules. The chat simulation ignores thinking and tools, and treats caching in a simplified way (a 5-minute cache, written at 1.25 times and read at a model-specific fraction of the input price). Prices are list prices in US dollars for the Claude API. Plans, limits and prices change often.
This page is an independent teaching aid from the MMV Lab and is not an Anthropic publication.