Elena' s AI Blog

I counted 15.7 billion Claude Code tokens. Here is what I found.

21 Nov 2026 (updated: 21 Nov 2026) / 42 minutes to read

Elena Daehnhardt

Claude: four panels on the 18 November transcripts — 98.4% cache reads, each turn keeping the earlier ones, ten sessions holding 68.5% — plus the 21 November test at 20.5% fewer tokens, and a list-price yardstick of about $570 a month.
I am still working on this post, which is mostly complete. Thanks for your visit!


TL;DR:
  • On 18 November 2026 I counted 98 Claude Code sessions and 15.7 billion tokens, and 98.4% of them were cache reads. Ten sessions held 68.5% of those cache reads.
  • The same snapshot records both 40,332 and 40,738 calls. A few sessions were still open, so the latest chat is in one tally and not the other. Dividing 15,458,543,225 cache reads by 40,332 gives 383,282, beside the 384,543 average I recorded.
  • On 21 November 2026, claude-haiku-5-5 used a median 25,876 tokens in one conversation and 20,578 when each phase started fresh, which is 20.5% fewer. Every trial scored 33. Cache reads were zero because the extra tokens were counted as fresh input, standing in for the prefix a cache read would have been.
  • An earlier file from 18 November had medians of 25,901 and 20,521, or 20.8%. One live trial on 21 November reached 30,301 tokens, so the median is the summary to use.
  • Cache reads cost 2.5%, 5%, or 10% of a model's input price. Anthropic does not publish a conversion from that token total to the percentage of a subscription allowance.
  • Claude Code reloads most settings in the running session. autoCompactWindow sets the compaction threshold, and from v2.1.251 /usage can show the prompt-cache hit ratio.

Previous: Part 14 — How to Use Claude AI

Next: Part 26 — Composio MCP: connect Claude, Cursor and AI agents to 1,500+ toolkits

I counted 15.7 billion Claude Code tokens. Here is what I found.

I went looking for a number and found a habit.

I wanted to know what Claude Code was costing me in computing work, session by session. So I read five months of local transcripts, collected on 18 November 2026: 98 sessions, twelve projects, 15.7 billion tokens. Claude Code is not the only tool I use. This post stays with these transcripts.

98.4% of those tokens were cache reads. The same conversation, served again on a later request.

Ten sessions accounted for 68.5% of those cache reads.

I then ran one task two ways. One conversation throughout, or a fresh conversation for each phase. On a live run on 21 November 2026, the fresh one used 20.5% fewer tokens, and the finished files scored the same. Those extra tokens are the prefix that, in Claude Code, would have been a cache read.

A smaller token count is a smaller context. It is a separate question from the API bill, and a separate question again from the percentage on a subscription allowance. The measurements, the experiment, and those limits are below. The script is at the end.

Transcripts collected on 18 November 2026. I did not record the Claude Code version beside them. The live experiment used claude-haiku-5-5 on 21 November 2026.


First surprise: it is not input, and it is not output

Here is the whole five months, by token type:

  tokens share
Cache reads 15,458,543,225 98.4%
Cache writes 210,324,550 1.3%
Output 35,263,173 0.2%
Uncached input 100,348 0.0006%

Uncached input was one hundred thousand tokens out of fifteen billion. In the API usage object, input_tokens is the portion after the last cache breakpoint, not the whole request and not a transcript of what I typed. A prompt I typed can sit inside the cached prefix on the next turn.

Prompt caching makes that repeated prefix cheaper to process. A cache read costs 2.5%, 5%, or 10% of the model’s base input price: 2.5% on Fable 5.2, Mythos 5.2, Fable 5.1, and Mythos 5.1; 5% on Opus 5.5 and Sonnet 5.5; 10% on the other current models, including Haiku 5.5 and Opus 5. Five months of transcripts can easily span more than one of those rates. Caching does not remove tokens from the context window. It reduces the work and the price of processing a repeated prefix.

How the same conversation accumulates

Turn New this turn What the model still processes
1 the task the task
2 one edit the task, then the edit
3 the next edit the task, the edit, and the next edit

A later request can reuse the earlier prefix from cache. The footprint still grows. A real Claude Code request also carries system instructions, tools, and other context. The table is the mechanism, not a trace from one of my sessions.

Three stacks for one conversation. Turn one is a single block, the task. Turn two keeps the task and adds one edit. Turn three keeps both and adds the next edit. The earlier blocks stay in the window. Only the top block is new. Caching reduces the work and the price of the earlier blocks. It does not remove them.

Diagram 1. Each new turn is a short block on top of everything already said. Those earlier blocks stay in the window.


Second surprise: the average request carried about 384,000 tokens

I recorded an average prefix of 384,543 tokens across 40,332 calls.

Dividing the cache-read total by that same call count gives 383,282. A second tally of calls came to 40,738, which is 406 calls more. A few sessions were still open when I counted, and the latest chat is included in one tally and not the other. Beside 15.7 billion tokens the gap is small. It is why these three figures do not divide out neatly, and why a script run a few days later will not reprint them. The files keep growing.

When a session begins, the baseline I measured is about 43,000 tokens: the system prompt, project instructions, and tool definitions. MCP servers, skills, and instructions can move that floor. 43,000 is the baseline from this snapshot.

On that baseline, roughly 90% of a 384,000-token prefix was conversation being processed again.

Prefix on the call share of calls share of cache reads
under 50K 1.8% 0.2%
50–150K 19.1% 5.4%
150–300K 26.0% 14.8%
300–500K 21.9% 22.3%
over 500K 31.3% 57.4%

A third of my requests accounted for over half of the cache reads. A one-line edit at the end of a long session does no more editing than the same edit at the start. It carries a heavier conversation.

Still in this guide

  • Third surprise: ten sessions out of ninety-eight
  • Why length costs more than it looks
  • The habit
  • I tested it, because advice is cheap
  • When to clear, and when not to
  • What you can actually do about caching
  • Three smaller levers
  • The lever I measured and then left alone
  • Measure your own
  • Practical setup: three settings worth knowing about
  • What this means on a subscription
  • Caveats worth stating plainly
  • The short version
  • Final thoughts
  • References

You've hit a Deep Dive tutorial.

I spend dozens of hours researching, coding, and breaking things to write these guides. This content is free, but reserved for my subscriber community. Drop your email below to unlock this guide (and all past/future deep dives):

Already a subscriber? Use the magic link from your last newsletter, or reset your password.

New subscribers get an inbox mail: Set a password to unlock articles. The form does not log you in — use the same email afterwards.

desktop bg dark

About Elena

Elena, a PhD in Computer Science, simplifies AI concepts and helps you use machine learning.




Citation
Elena Daehnhardt. (2026) 'I counted 15.7 billion Claude Code tokens. Here is what I found.', daehnhardt.com, 21 November 2026. Available at: https://daehnhardt.com/blog/2026/11/21/what-claude-code-actually-costs/
All Posts