Language ModelsExplainer
What Is a Token in AI? I Ran the Same 71 Tasks on Three Models
A token is the unit a language model reads, writes and bills in. I gave the same 71 tasks to three Claude models. The mid-size one got 57 of 63 right for about half the price of the largest, which got 58. In this test the model choice moved the bill far more than trimming the context did.
7 min read

A token is the unit a language model works in: a short piece of text, often part of a word, that the model reads and writes one at a time. Context windows, prices and rate limits are all counted in tokens. In a test of 71 identical short tasks on three Claude models, the answers were under 0.4% of all tokens; almost the whole bill was the session's starting context, about 47,000 to 50,000 tokens per task. Choosing the model changed the cost far more than anything else: about $28 on the largest, $14 on the mid-size and a small fraction of that on the smallest.
A token is the unit a language model reads, writes and bills in. I gave the same 71 tasks to three Claude models and counted every token. The largest model got 58 of 63 checkable tasks right. The mid-size one got 57 at about half the cost. The smallest got 48, and 58 once I blocked the command line. That choice moved the cost far more than disconnecting eight unused servers did, and the reason is where the tokens go.
What a token is
A model does not see letters or words. Before it reads your text, a tokenizer cuts it into tokens. Common words become one token, rarer words split into several pieces, and punctuation often becomes a token of its own. A common rule of thumb for English is about three quarters of a word per token. It is only a rule of thumb: the split depends on the tokenizer, and Anthropic notes that its newer models produce about 30% more tokens for the same text than earlier ones. The three models in this test use the same newer tokenizer, so their counts compare directly.
The model then writes its answer one token at a time, each one chosen from what came before.
Using a model is counted in these units. The context window, how much the model can hold at once, is a number of tokens. API prices are per million tokens, with input and output priced separately, and rate limits depend on tokens used.
Where the tokens actually go
People picture a token bill as the question plus the answer. In this test it was almost neither.
Each of the 71 tasks was a single short request, and the session stopped at the model's first real tool call, so the answers were tiny by design. On every model, output was under 0.4% of all tokens. On the largest model the 71 tasks used about 9.6 million tokens, and 19,338 of them were output.
The rest was the context a session starts with: the system prompt, built-in tool definitions, skills, project instructions, and the instructions and tool list of the connected servers. Full tool descriptions load only when the model searches for them. Each model call sends that whole context again, but repeats are read from cache at a twentieth of the input price on the two larger models. What cost money was writing it into the cache in the first place, once per fresh session, about 47,000 to 50,000 tokens per task. On the largest model that was $26.69 of the $28.32. Output was $0.39.
I measured that starting context before. With every server connected, an empty Claude Code session started at 47.8 thousand tokens. After I disconnected eight servers I had not used in 30 days, it started at 34.4 thousand, about 28% less. That article covers where those tokens came from.
The test
The 71 tasks come from my tool search measurement: requests like finding a file in my notes, listing deployments or checking analytics, with eleven tool servers connected. For 63 of them the right tool was written down before the run. Each task ran in a fresh Claude Code session, and a hook recorded and blocked the first tool the model chose, so nothing was executed.
I ran the same set on three models. The largest ran on November 23, the other two on November 25, with the same servers connected; Claude Code's tool list was 31 tools longer on the 25th, for a reason I have not traced. The costs are Claude Code's own estimates at list price, not an invoice, and they reconcile to the cent with Anthropic's published prices.
| Model | Right of 63 | Cost | Cost per right answer |
|---|---|---|---|
| Claude Opus 5.5 | 58 | $28.32 | $0.49 |
| Claude Sonnet 5.5 | 57 | $14.46 | $0.25 |
| Claude Haiku 5.5 | 48 | $0.78 | $0.016 |
The three models read about the same amount: 9.6 million, 7.8 million and 9.3 million tokens. What differs is the price of each token.
I ran the mid-size and small models once. A reader asked for the largest one on a tool list within one tool of theirs, so I ran it again on November 25: 55 of 63 for $30.05. Its own two runs differ by three tasks, so the one task between the two larger models is not a result. Ten tasks is large next to that.
What the smallest model got wrong
Ten fewer right answers sounds like the small model is simply worse. The errors are more specific.
Twelve of its fifteen misses were the same move: it reached for the command line instead of the connected tool. Nine of them were GitHub tasks, where it chose the shell over the GitHub server. By the rules of the test that counts as wrong, because the right tool was written down in advance. Some of those could still have finished the job through the gh command line tool.
So the gap is not spread evenly. On the 16 GitHub tasks the small model missed 9. On the other 47 it missed 6. Within the GitHub tasks the shell won once for the largest model, three times for the mid-size one and nine times for the small one.
Three tasks were missed by all three models: who I am logged in as on GitHub, which feature flags my Vercel project has, and a ten-slide deck in Gamma. On the first two every model went to the shell.
The small model without the shell
After a reader asked, I ran the small model again on the same 71 tasks with one change: the shell tool was blocked. It got 58 of 63 instead of 48, and all 16 GitHub tasks instead of 7. The cost stayed at $0.78. That is the score the largest model got on November 23 (its re-run got 55), at about a thirty-sixth of the price. Of the three tasks no model had solved, it solved two. Its five misses went to other built-in tools, such as a local file search, or to the wrong tool on the right server.
This is one run, and identical runs differ by two to three tasks. Blocking the shell is not free either: the model then cannot do anything that needs the shell. What the run shows is where the gap was. The small model could find the right tool. It went to the command line first.
Why the model choice is the bigger lever
Disconnecting eight servers cut the starting context by about 28%. Moving the same tasks from the largest model to the mid-size one cut the bill by 49% for one right answer fewer. Moving to the small one cut it by about 36 times.
The reason is arithmetic. A smaller context saves on part of the tokens. A cheaper model lowers the price of every token the session writes, reads and produces. Anthropic's own pricing page gives the same advice in short form: Haiku for simple tasks, Sonnet for most workloads, Opus for the most complex reasoning.
My own rule is the short version: choosing the right model for the task is the basis of saving tokens.
What this test suggests doing
- Write down what right looks like before you run anything. Here that was the expected tool for each of 63 tasks.
- Run the same tasks on more than one model. Compare right answers and cost per right answer, not total cost alone.
- Read the errors, not only the score. The small model's misses clustered in one kind of task, which tells you which tasks it can take. Here blocking the shell closed the gap in one run.
- Trim the context too. It lowered the starting cost of every session, on every model.
One set of 71 short tasks, one kind of work, the first tool choice only. Long sessions produce far more output, and output costs five times the input price, so the split between context and answer will look different there. The price of each token still depends on the model.
Sources
Vladimir Beskorovainyi, Enterprise AI Architect & CTO, author of the Amazon bestseller "Enterprise AI: The KATA Way", founder of Besk Tech (besk.tech)
More in this section
AI AgentsExplainer
MCP Tools: I Have 738 Connected and Called 39 in a Month
I counted every tool my 19 MCP servers offer in Claude Code and every tool called in 30 days. Twelve servers were never called, and one of them cost more up front than the other 18 together.
AI AgentsExplainer
MCP Tool Search: Does the Model Pick the Right Tool Out of 738?
Readers asked whether 738 connected tools make the model pick the wrong one. I ran 71 tasks three times, twice with every server connected and once with 12 servers blocked. In 189 scored picks it never took a tool from the wrong server. It took the shell 19 times.
Language ModelsExplainer
What Is RAG? A 1,534-Question Test Where Retrieval Only Took Things Away
Retrieval-augmented generation finds the relevant material and puts it in the model's window before it answers. In my Text-to-SQL benchmark the retrieval step kept 96.5% of the needed tables on average and left accuracy unchanged. Here is why, and how to tell whether retrieval will help on your data.
Get new articles by email
One message when something new is published. No other mail, and you can stop at any time.
The address is used for this one letter and nothing else. Privacy