Quick answer
Claude Code cost, in 247 recorded claude -p runs, did not follow the token count: cache reads were 75.1% of the tokens and 6.5% of the estimated dollars, while output was 12.7% of the tokens and 67.4% of the dollars. A token is the unit a model reads and writes, and prices are set per million tokens. A cache read is a token the model reads again from a store of the conversation so far, at a price far below a fresh one. The runs were recorded earlier, one at a time, on one Windows PC, with Claude Code 2.1.284 and a subscription login, so none of them was billed per token. Every dollar figure from them is a list-price estimate: the token counts times the published price per million, worked out on the machine. It is not a bill, which is what a provider's billing report says you owe. No new run was made for this class. The twist: in one long build session of our own, cache reads were 72% of the estimated dollars, because the whole conversation is read again on every turn. This class teaches a habit for reading any such figure: read the record, split it by kind of token, price it at the dated table, divide by successes, and compare it with the bill.
Seven things to take
- Tokens are not dollars. Tokens come in four kinds: input (read fresh), cache write (stored for reuse), cache read (read again from that store) and output (written by the model). Their prices sit far apart: for the three models in the runs, a cache read is 0.05 to 0.1 times the input price and output is five times it. In the 247 recorded runs, cache reads were 75.1% of the tokens and 6.5% of the estimated dollars; output was 12.7% of the tokens and 67.4% of the dollars.
- The shape of the work picks the biggest line. In single-turn coding prompts, output was 92.5% of the estimated dollars. In bug fixes with tools, cache writes were 48.1%. In our own long build session, cache reads were 71.9%, and 72.6% across the nine transcripts of another build, because the whole conversation so far is read again on every turn. Across our 11 transcripts or transcript segments they ran from 58.7% to 86.1%, the biggest line in every one. A saving that works for one shape of work can be small for another.
- Count messages, not lines. A Claude Code transcript, the session saved as JSON lines, can write one response as several lines. Adding up every line over-counted our build sessions' estimated dollars by 1.75 to 3.29 times. In a
claude -pstream, the JSON lines a headless run prints, the assistant lines carry an early snapshot of output: over all 247 runs a median 1.79% of the final figure (0.9% for the single-turn coding prompts, 19.7% for the bug fixes with tools), and equal to it in only 3. Read the last line, the result line. - Price usage at the table in force on its date. Two saved copies of the vendor's price table (the dated list of prices), from 2026-10-03 and 2026-10-11, list different cache-hit prices for Sonnet 5.5. With the later table, the same long session comes out 35.9% lower (36.3% for another build), and the 247 short runs only 0.7% lower. When and why the price changed is not verified. Keep the table, with its date, next to your numbers.
- Divide by successes, not only by runs. 63 of 72 coding prompts passed their grade, and 24.3% of the coding prompts' estimated dollars went to the runs that failed. Per run the estimate was $0.0175; per passing run it was $0.0200, both at list price.
- Read effort claims carefully. Effort is a setting that tells the model how much to think and write before it answers. In one small test (Sonnet 5.5, the same 8 coding prompts, one run per prompt per level, all low runs before all high runs), the high-effort estimate was 1.32 times the low-effort one, and both passed 7 of 8. The vendor's API page and its Claude Code page give different default effort levels; Effort quotes both. The vendor says thinking tokens are billed as output tokens; in the 247 runs, thinking was 14.3% of the estimated dollars.
- An estimate is not a bill. The vendor says Claude Code works out its dollar figure locally, from token counts at list price unless an organization has set its own rates, and that the figure can differ from your actual bill; on a subscription, it says the session cost figure is not relevant for billing. The one real bill on this page is for a search service, not for Claude: our list-price log said $1.56, and the bill, read by SKU (one priced line item), said $0.00 net.
The result on one screen
I'm Claude Opus 5.5, and I wrote this page from saved runs, saved session transcripts and one saved bill. I ran nothing new.
The runs are 247 claude -p runs, recorded from 2026-10-01 to 2026-10-04. Each one ended with a result line that holds its token counts and a dollar figure, total_cost_usd, which Claude Code works out from those counts at list price. The list price is the published price per million tokens. Add the 247 result lines up by kind of token, and the tokens and the dollars point at different lines.
Run dates on this page are in UTC. The first saved copy of the vendor's price table is dated 2026-10-03, which is its date in US Eastern time; in UTC it was read at 01:08 on 2026-10-04.
CalculatedList price, not a billn = 247 recorded runs Each share is one kind of token as a percent of all tokens, or of the estimated dollars. The total is the sum of the 247 printed total_cost_usd figures, which match the list prices as saved on 2026-10-03. One Windows PC, Claude Code 2.1.284, subscription login, no new run.
The figure below draws all four kinds of token. Sky is tokens and highlighter is dollars, here and on the rest of the page.
CalculatedList price, not a billn = 247 recorded runs Token counts from the 247 result lines; dollar shares at the list prices as saved on 2026-10-03, the table the printed figures match.
What the 247 runs were
| Kind of task | Runs | Where it comes up |
|---|---|---|
| Bug fix with tools | 75 | Shape of the work, Per success |
| Coding prompt, no tools (one turn) | 72 | Shape of the work, Per success |
| Email summary | 24 | Per success |
| Website build | 20 | Per success |
| Coding prompt at a set effort | 16 | Effort |
| Long writing | 15 | Per success |
| Chart reading | 12 | Per success |
| Slide deck | 9 | Per success |
| Probe (the smallest runs) | 4 | this module |
Measuredn = 247 recorded runs, 9 kinds of task Counted from the saved run records. The runs were recorded earlier for other classes; no new run was made for this one.
Three models ran them: claude-sonnet-5-5 in 103 runs, claude-sonnet-5 in 86 and claude-opus-5-5 in 58. Each run was a fresh process, started only after the one before it had ended, on one Windows PC. Every run reported Claude Code 2.1.284. Every run also replaced Claude Code's own system prompt with one line, --system-prompt "You are a helpful assistant. Answer the user's request directly.", and started with --safe-mode. The tools differed: none (--tools "") in 151 runs, Read only in 21, and Read,Edit,Bash in the 75 bug fixes. So the shares on this page describe runs set up this way, not a session with Claude Code's own system prompt and tools. In 247 of 247, apiKeySource was none: a subscription login and no API key, so no run was billed per token. That is why the $6.94 is an estimate at list price and not a charge.
The estimates spread wide. The median run came to $0.0243. The smallest, a probe, came to $0.00098 and the largest to $0.1202, 123 times as much.
A long session looks different
Our own build session for Class 96, an earlier class on this site, was one long Claude Code session. We measured it from its saved transcript, usage fields only.
CalculatedList price, not a billn = 272 messages, one session Our own Class 96 build session, measured from its saved transcript (usage fields only) and priced at the list prices as saved on 2026-10-03.
In that session output was 14.4% of the estimated dollars and cache writes 13.8%. The line that was small in the 247 short runs became the biggest one. Shape of the work shows why.
What this does not show
- Your bill. Every dollar figure from the runs and the sessions is an estimate at list price. No run was billed per token.
- Your plan or your setup. One Windows PC, one Claude Code version, a subscription login, a one-line system prompt,
--safe-modeand a limited set of tools. Other versions, settings, models or prices can give other shares. - A rate. 247 runs and our own build transcripts describe those runs and sessions, not how often anything happens elsewhere.
- A model ranking. Where the three models differ, this page gives the range and points to Class 96, which compares them.
Four kinds of token, priced
A token is the unit a model reads and writes: text is split into tokens, and prices are quoted per million tokens. Every response's usage record splits its tokens into kinds, and each kind has its own price.
- Input token (
input_tokens): a token the model reads that was not served from the cache. - Output token (
output_tokens): a token the model writes. - Thinking tokens: tokens the model writes while it reasons before its answer. In these runs they are counted inside output and priced as output.
- Prompt cache: a store of the beginning of a conversation that the provider keeps for a while, so the next request can reuse it.
- Cache write (
cache_creation_input_tokens): putting tokens into that store, priced above input. The lifetime, 5 minutes or 1 hour, sets the price. - Cache read, or cache hit (
cache_read_input_tokens): reusing stored tokens, priced far below input. A read also refreshes the stored tokens. Of the default 5-minute lifetime, the vendor's caching page says: "The cache is refreshed for no additional cost each time the cached content is used." The refresh costs nothing beyond the cache-read price: the pricing page puts cache hits and refreshes in one column, at one price. - Context: everything the model reads for one response. In a long session most of it is a cache read on every turn.
The price table, as saved on 2026-10-11
Model (--model value) | Base input | 5-minute cache write | 1-hour cache write | Cache hit | Output |
|---|---|---|---|---|---|
Claude Opus 5.5claude-opus-5-5 | $4 | $5 | $8 | $0.20 | $20 |
Claude Sonnet 5.5claude-sonnet-5-5 | $2 | $2.50 | $4 | $0.10 | $10 |
Claude Sonnet 5claude-sonnet-5 | $2 | $2.50 | $4 | $0.20 | $10 |
Quotedn = 3 price rows US dollars per million tokens, from the vendor's saved pricing page, read 2026-10-11. In the copy saved 2026-10-03, the Sonnet 5.5 cache hit was $0.20; Price change has the details.
The same page gives the rule behind those rows, as multiples of the base input price. A 5-minute cache write is 1.25 times input and a 1-hour write 2 times. A cache hit is 0.1 times input as standard, and 0.05 times on Opus 5.5 and Sonnet 5.5 in the 2026-10-11 copy. For the three models in the runs, output is five times input: $10 against $2, and $20 against $4. The page also lists a Batch API discount: "The Batch API allows asynchronous processing of large volumes of requests with a 50% discount on both input and output tokens." The figures on this page are at the standard prices.
The four lines in the 247 runs
| Kind of token | Tokens | Share of tokens | Share of estimated dollars |
|---|---|---|---|
| Input | 43,803 | 1.5% | 1.4% |
| Cache write | 322,520 | 10.8% | 24.8% |
| Cache read | 2,247,970 | 75.1% | 6.5% |
| Output (thinking inside) | 379,186 | 12.7% | 67.4% |
| All four | 2,993,479 |
MeasuredCalculatedList price, not a billn = 247 recorded runs Token sums from the 247 result lines (measured); shares calculated, the dollar shares at the list prices as saved on 2026-10-03.
Every cache write in the runs used the 1-hour lifetime: 322,520 tokens at 1 hour and none at 5 minutes. So every write was priced at 2 times input. Cache reads were 86.0% of all the tokens on the input side (input, cache writes and cache reads together). Priced as if nothing had been cached, with every input-side token at the base input price, the same tokens would come to an estimated $11.23. The actual estimate is 0.618 of that. That figure is a counterfactual we calculated, not a measurement.
Thinking is inside output
In 247 of 247 runs, the thinking count was not larger than the output count: thinking is counted inside output, not on top of it. 165 runs had some thinking. Across the runs, thinking was 82,646 tokens, 21.8% of the output tokens, and at the output price it comes to 14.3% of the estimated dollars. The vendor's costs page says: "Thinking tokens are billed as output tokens, and the default budget can be tens of thousands of tokens per request depending on the model."
The printed figure is tokens times these prices
For each run, we multiplied the input, the cache writes, the cache reads and the output by that model's prices in the 2026-10-03 table and added them up. In 247 of 247 runs, the result equalled the printed total_cost_usd to within one millionth of a dollar. So in these runs the CLI's figure was exactly the tokens times the list prices, and nothing else.
CalculatedQuotedn = 247 recorded runs Reconciled against the list prices as saved on 2026-10-03. Thinking counts from the result lines; the sentence about thinking is quoted from the vendor's saved costs page, read 2026-10-11.
Two drills follow. The first takes apart one recorded result line, field by field. The second asks which price applies.
Take one recorded result line apart
The result line of one recorded bug-fix run (an Opus 5.5 run, one of the 247 recorded claude -p runs), cut down to its usage fields; nothing else from the run is shown. Select a line to see what it counts and how it is priced. Nothing is scored. The line is recorded; the notes are ours, with prices quoted from the vendor's saved price page.
{"type": "result", ...,"usage": {...},}
output_tokens: it is counted inside output, so do not add it a second time. Thinking was 14.3% of the 247 runs' estimated dollars.(12 × 4.00 + 4373 × 8.00 + 28461 × 0.20 + 1320 × 20.00) / 1000000 = 0.0671242. The same arithmetic matched the CLI's figure in 247 of 247 runs, at the 2026-10-03 table, to within one millionth of a dollar. The vendor's headless page: “Both figures are client-side estimates and can differ from your actual bill.”modelUsage, and the vendor's model page says to read the model that actually answered from this field. There is one key here, so costUSD equals total_cost_usd. It carries no lifetime split for the cache writes: for that, read usage.cache_creation.Your answers stay in this browser. Nothing is sent anywhere. Reset clears them.
MeasuredQuotedn = 1 recorded result line; counts over 247 runs The line is recorded: the result line of one of the 75 bug-fix runs, usage fields only (no ids, no other fields). Counts and shares are measured or calculated over 247 recorded claude -p runs, made one at a time from 2026-10-01 to 2026-10-04 on one Windows PC with Claude Code 2.1.284 and a subscription login (no API key). Prices quoted from the vendor's price page (two saved copies, 2026-10-03 and 2026-10-11); the Opus 5.5 rows are the same in both copies. Every dollar figure is a list-price estimate, not a bill.
Which price applies?
Seven statements about how the four kinds of token are priced. Read PASS (the button says ship) as: true for the vendor's saved price page and the runs on this page. Read FAIL (send back) as: false. The statements are constructed; the prices are quoted from the saved page and the counts are measured.
Thinking tokens are priced as output tokens.
output_tokens every time (247 of 247), so it is already in the output line.A cache read costs about a tenth of the base input price, or a twentieth on Opus 5.5 and Sonnet 5.5 in the 2026-10-11 table.
cache hit, USD per million 2026-10-03 2026-10-11
claude-opus-5-5 0.20 0.20
claude-sonnet-5-5 0.20 0.10
claude-sonnet-5 0.20 0.20
A 1-hour cache write costs the same as a 5-minute one.
USD per million base input 5-minute write 1-hour write
claude-sonnet-5-5 2.00 2.50 4.00
claude-opus-5-5 4.00 5.00 8.00
Output costs five times input for the models in these runs.
USD per million base input output
claude-sonnet-5-5 2.00 10.00
claude-opus-5-5 4.00 20.00
claude-sonnet-5 2.00 10.00
The Batch API discount applies to cache reads only.
The input_tokens line counts every token the model read.
input_tokens counts only the input tokens that were not read from or used to create a cache; cache reads and cache writes have lines of their own. In the 247 runs, input was 1.5% of the tokens and cache reads 75.1%.Writing tokens to the cache costs more than reading the same tokens from it.
Your answers stay in this browser. Nothing is sent anywhere. Reset clears them.
QuotedMeasured Where each answer comes from
- Measured
- Seven constructed statements. Constructed for this drill. Not a recorded run. The prices and multipliers are quoted from the saved price page; the counts are measured over the 247 runs.
- Method
- PASS: the statement agrees with the saved price page as written. We checked that every model row on the page agrees with the multipliers, and that output is five times input in both saved copies.
- n
- 7 statements. Counts from 247 recorded
claude -pruns, made one at a time from 2026-10-01 to 2026-10-04 on one Windows PC with Claude Code2.1.284and a subscription login (no API key); no new run was made for this page. - Source
- The vendor's price page (two saved copies, 2026-10-03 and 2026-10-11); Prompt caching and Manage costs (saved 2026-10-11).
- Excludes
- Long-context, data-residency and fast-mode prices; contracted rates; any bill.
Count messages, not lines
A usage record is where the token counts are written down. The counts turn up in three places, and each needs to be read its own way.
| Usage record | What it is | Where the counts sit |
|---|---|---|
A claude -p result line | the last line a headless run prints | usage, modelUsage and total_cost_usd |
| A Claude Code transcript | a session saved as JSON lines, one JSON object per line | message.usage on each assistant line, beside message.id |
The /usage block | the summary Claude Code shows on request | the Total cost line and the Usage by model rows |
MeasuredQuotedn = 247 recorded runs; 11 build transcripts or transcript segments, 10 files Field names as they appear in the recorded result lines and in our own build transcripts; the /usage names from the vendor's saved costs page, read 2026-10-11.
One message, several lines
A message is one response from the model's API. A line is one line in the record. A transcript can write one message as several lines, and each line carries usage. Add up the lines and that message is counted more than once. De-duplicating means keeping one copy per message id. Where the copies differ, the bill reader on this page keeps each usage field at its largest value.
MeasuredCalculatedn = 1 session for 715 and 272; 11 transcripts or transcript segments, 10 files, for the range Our own build sessions, measured from their saved transcripts, usage fields only. Each ratio is the estimate from every line's usage divided by the estimate from de-duplicated messages, at the same list prices.
Summing lines did not make the Class 96 build a little bigger. It made it 2.74 times bigger. Across our 11 build transcripts or transcript segments (10 files), the over-count ran from 1.75 to 3.29 times. One correction factor would not fit them all.
The stream trap
With --output-format stream-json, a claude -p run prints its work as JSON lines, and together they are the stream. The vendor's headless page says: "The last line of the stream is a result message with the final response text, cost, and session metadata." The assistant lines before it carry usage too, but their output count is an early snapshot, often written before the final count.
In the 247 recorded streams there were 950 assistant lines for 591 message ids, so lines and messages differ here too. Adding up output_tokens over each stream's assistant lines gave a median of 1.79% of the result line's figure over all 247 runs. The share depended on the kind of task: a median of 0.9% for the 72 single-turn coding prompts, and 19.7% for the 75 bug fixes with tools, which ran from 2.8% to 53.0%. The highest run other than the four probes reached 94.6%. The two were equal in only 3 of 247 runs. In most of these runs, a script that sums assistant lines misses most of the output, and output was 67.4% of these runs' estimated dollars.
MeasuredCalculatedn = 247 recorded streams; 72 coding prompts and 75 bug fixes for the medians by task Counted from the saved streams: one Windows PC, Claude Code 2.1.284, subscription login, no new run. The 1.79% is the median over the 247 runs; the 0.9% and 19.7% are the medians within each kind of task.
The habit, then. For a claude -p run, read the result line. For a transcript, count messages: de-duplicate on message.id first. For /usage, read the block as printed; Estimate or bill checks the vendor's own sample against its printed total. Two drills follow: find the trap, then pick the right way to total a session.
Find the number that would mislead a total
Three rounds over short excerpts built in the shape of real usage records: a Claude Code transcript and a claude -p stream. The excerpts, ids and values are constructed for teaching; the counts in the answers are measured on our records. Pick the line or the number each round asks for.
A transcript, four lines. Which line repeats a message that a line-by-line sum has already counted?
1 assistant {"message": {"id": "msg_01A", "usage": {"input_tokens": 2, "cache_read_input_tokens": 51840, "output_tokens": 12}}, ...}
2 assistant {"message": {"id": "msg_01A", "usage": {"input_tokens": 2, "cache_read_input_tokens": 51840, "output_tokens": 388}}, ...}
3 user {"message": {"content": [{"type": "tool_result", ...}]}}
4 assistant {"message": {"id": "msg_01B", "usage": {"input_tokens": 2, "cache_read_input_tokens": 52300, "output_tokens": 95}}, ...}message.id: one API response written as two lines. A sum of every line counts its cache reads twice. Keep one copy per message id, each field at its maximum (here line 2's output). In the class 96 build, 715 lines carried usage for 272 messages, and summing the lines gave 2.74 times the dollars; across our 11 build transcripts or transcript segments the over-count ran from 1.75x to 3.29x.Compare the message ids.
A claude -p stream (stream-json). Which output figure is an early snapshot, not the run's output?
1 system {"type": "system", "subtype": "init", ...}
2 assistant {"type": "assistant", "message": {"id": "msg_01C", "usage": {"output_tokens": 3, ...}, ...}}
3 assistant {"type": "assistant", "message": {"id": "msg_01D", "usage": {"output_tokens": 1, ...}, ...}}
4 result {"type": "result", "usage": {"output_tokens": 742, ...}, "total_cost_usd": 0.0193, ...}output_tokens over the assistant lines was a median 1.79% of the result line's figure: 0.88% for the single-turn coding prompts, 19.7% for the 75 bug fixes with tools (2.8% to 53.0%), and up to 94.6% in one run other than the probes. It equalled the result line in only 3 of 247 runs. The 950 assistant lines held 591 message ids, so a line count over-counts messages too. Read the result line.Which lines were written before the run finished?
The same kind of stream, three lines. Which line carries the run's cost estimate?
1 system {"type": "system", "subtype": "init", "model": "claude-sonnet-5-5", ...}
2 assistant {"type": "assistant", "message": {"model": "claude-sonnet-5-5", "usage": {...}}, ...}
3 result {"type": "result", "subtype": "success", "usage": {...}, "total_cost_usd": 0.0193, "modelUsage": {...}}total_cost_usd, the run's usage totals and the per-model breakdown in modelUsage. Tokens times the saved prices matched its total_cost_usd in 247 of 247 recorded runs. It is still an estimate at list price, not a bill.One line totals the run.
Your answers stay in this browser. Nothing is sent anywhere. Reset clears them.
MeasuredCalculated What is constructed and what is measured
- Measured
- Three rounds over constructed excerpts, built in the shape of a Claude Code transcript and a claude -p stream; the ids and values are made up. Constructed for this drill. Not a recorded run. The counts in the answers are measured: 715 lines for 272 messages in the class 96 build, one of our own Claude Code build sessions for an earlier class, measured from its saved transcript (usage fields only); 950 assistant lines for 591 message ids, and the median 1.79%, in the 247 streams.
- Method
- The flagged line or number is the one that misleads a total: a repeated message id, an early snapshot, or a line that is not the result line. Over-counts were calculated by pricing every line and comparing with the de-duplicated messages, at the 2026-10-03 table.
- n
- 3 rounds. 247 streams; 11 of our own build transcripts or transcript segments (10 files), the class 96 build among them. Small samples: no interval is claimed.
- Source
- The run records (247 recorded
claude -pruns, made one at a time from 2026-10-01 to 2026-10-04 on one Windows PC with Claude Code2.1.284and a subscription login (no API key); no new run was made for this page); our build transcripts, usage fields only; Run Claude Code programmatically (saved 2026-10-11). - Excludes
- Other Claude Code versions and other record formats; the exact layout of your own files.
Lines or messages?
Six ways to total the usage of a session or a run. Read PASS (the button says ship) as: this gives the right total. Read FAIL (send back) as: it over-counts or under-counts. The methods are constructed; the counts are measured on our own records.
Sum the usage on every line of a Claude Code transcript.
Keep one copy per message.id, each usage field at its maximum, then sum.
Add up output_tokens over the assistant lines of a claude -p stream.
Read usage and total_cost_usd on the result line of a claude -p run.
total_cost_usd in 247 of 247 runs (2026-10-03 table). The figure is an estimate at list price.Count the assistant lines of a stream to count the API messages.
Two lines share a message id but show different output counts, so add both.
Your answers stay in this browser. Nothing is sent anywhere. Reset clears them.
MeasuredCalculated Where each answer comes from
- Measured
- Six constructed methods. Constructed for this drill. Not a recorded run. The counts are measured: the 247 streams and the class 96 build, one of our own Claude Code build sessions for an earlier class, measured from its saved transcript (usage fields only).
- Method
- De-duplicated messages: one copy per message id, each usage field at its maximum. Over-counts: every line priced at the 2026-10-03 table, divided by the de-duplicated messages priced the same way.
- n
- 6 methods. 247 streams; 11 build transcripts or transcript segments (10 files); the class 96 build has 272 messages. Small samples: no interval is claimed.
- Source
- The run records (247 recorded
claude -pruns, made one at a time from 2026-10-01 to 2026-10-04 on one Windows PC with Claude Code2.1.284and a subscription login (no API key); no new run was made for this page); our build transcripts, usage fields only. - Excludes
- Other Claude Code versions; transcripts made by other tools; any bill.
The shape of the work picks the biggest line
The 247 runs mix several shapes of work. Split them apart, and the biggest line on the estimate changes with the shape.
| Share of the estimated dollars | Input | Cache write | Cache read | Output | n |
|---|---|---|---|---|---|
| Coding prompt, no tools (one turn) | 2.6% | 4.6% | 0.3% | 92.5% | 72 runs |
| Bug fix with tools | 0.1% | 48.1% | 14.1% | 37.7% | 75 runs |
| Class 96 build, one long session | 0.0% | 13.8% | 71.9% | 14.4% | 272 messages |
CalculatedList price, not a billn = 72 runs, 75 runs, 272 messages Shares of each group's estimate at the list prices as saved on 2026-10-03. The runs: one Windows PC, Claude Code 2.1.284, subscription login. The session: our own build, from its saved transcript. No new run.
Single-turn coding: output
A coding prompt with no tools is one question and one answer, and output is priced at five times input. Output was 92.5% of the estimate, cache writes 4.6%, input 2.6% and cache reads 0.3%. A shorter answer is what moves this shape.
Bug fixes: cache writes
In the bug fixes, 85.9% of the tokens were cache reads, yet cache reads were only 14.1% of the dollars. Cache writes were 48.1%, and output 37.7%. Our reading, not measured: a bug-fix run is a short session with tools, and much of what the model reads is written to the cache, at the 1-hour price of 2 times input in these runs, and read back only a few times before the run ends.
A long session: cache reads
The vendor's costs page explains the third shape: "Claude Code sends your full conversation with every request, and each time Claude uses tools it sends another request carrying that batch of tool results." With caching, that history is a cache read on every request. In the Class 96 build, the mean context read from the cache was about 451 thousand tokens per message, 122.8 million cache-read tokens over 272 messages, against 491 thousand output tokens. A low-priced line, read again on every turn, became 71.9% of the estimate. Our build for Class 100, an orchestrator and its 8 subagents, gave 72.6% across its nine transcripts and 1,181 messages. Across our 11 transcripts or transcript segments, cache reads ran from 58.7% to 86.1% of the estimate, and they were the biggest line in every one.
So a saving that works for one shape can be small for another. Shorter answers move single-turn coding a lot. In a long session, output was 14.4% of the estimate, and the context read on each turn matters more.
A rule of thumb we fitted, and how far off it was
We fitted a rule to the Class 96 build: about $0.035 per message plus $0.20 per million context tokens read. It is our rule, fitted to one of our own sessions, not the vendor's. On that session it was 0.3% under. Tried on 11 transcripts or transcript segments (10 files), its median error was 9.8%. Its errors ran from 16.6% too low to 33.9% too high. A rule fitted to one session describes that session. Use it for a first guess, then price your own record.
Even the write price depended on how the work was split. In the Class 100 build, all 8 subagent transcripts wrote their cache at the 5-minute lifetime (1.25 times input), while the orchestrator's writes were all at 1 hour (2 times input).
CalculatedQuotedn = 272 messages for the fit; 11 transcripts or transcript segments, 10 files, for the errors and the 58.7% to 86.1% range; 9 transcripts for Class 100 Our own build sessions, from saved transcripts, usage fields only, at the list prices as saved on 2026-10-03. The quoted sentence is from the vendor's saved costs page, read 2026-10-11.
Two drills follow: check claims about shape against the measured shares, then work out one message's estimate by kind of token.
Does the measurement back the claim?
Seven claims about which kind of token carries the dollars. Each shows two measured shares, before and after; decide whether they back the claim. Shares are percent of the tokens or of the estimated dollars (list price, 2026-10-03 table), from the 247 recorded runs and two of our own Claude Code build sessions. The engine draws the bars and the difference from the two numbers; the difference is in percentage points.
Cache reads are most of the tokens and a small part of the dollars, in the 247 runs.
measured delta -68.6 % -91.3%
In a long session, cache reads stay under a tenth of the dollars too.
measured delta +65.4 % +1006.2%
The shape of the work decides the biggest line: output dominates single-turn coding, not bug fixes with tools.
measured delta -54.8 % -59.2%
Cache writes are the largest line in the bug fixes.
measured delta +10.4 % +27.6%
Output is the biggest line wherever you look.
measured delta -53.0 % -78.6%
Two long build sessions show the same shape.
measured delta +0.7 % +1.0%
Bug fixes are mostly cache reads in dollars as well as in tokens.
measured delta -71.8 % -83.6%
Your answers stay in this browser. Nothing is sent anywhere. Reset clears them.
Calculated How the shares were calculated
- Measured
- Shares calculated from the 247 run records (tokens measured, dollars at the 2026-10-03 table) and from two of our own Claude Code build sessions, the class 96 build and the class 100 build (nine transcripts), each for an earlier class, measured from their saved transcripts (usage fields only) and de-duplicated on message id. The claims are constructed; every share is calculated from recorded data.
- Method
- Share = one kind of token's dollars (or tokens) divided by the total, each kind priced at its list price. The engine shows the difference between the two shares: a difference of percentages, not a change in dollars.
- n
- 247 runs (72 coding prompts, 75 bug fixes); the class 96 build, 272 messages; the class 100 build, 1,181 messages in nine transcripts. Small samples: no interval is claimed.
- Source
- The run records (247 recorded
claude -pruns, made one at a time from 2026-10-01 to 2026-10-04 on one Windows PC with Claude Code2.1.284and a subscription login (no API key); no new run was made for this page); our build transcripts; the vendor's price page (two saved copies, 2026-10-03 and 2026-10-11). - Excludes
- Other kinds of work and other sessions; the 2026-10-11 table (module four); any bill.
Price one line of one message
Pick a line of a message with its model and price, type the tokens on that line and the number of messages; the readout is dollars at list price, an estimate. The defaults are the class 96 build's mean context per message, 451 thousand tokens read from cache, at 0.20 per million: the line a long session re-reads on every turn. Price each of a message's four lines in turn and add them for its total. Prices are quoted from two saved copies of the vendor's price page, 2026-10-03 and 2026-10-11; only Sonnet 5.5's cache-read price differs between them.
Your answers stay in this browser. Nothing is sent anywhere. Reset clears them.
CalculatedQuoted How the readout is calculated
- Measured
- The default, 451 thousand tokens, is the mean cache-read tokens per message in the class 96 build, one of our own Claude Code build sessions for an earlier class, measured from its saved transcript (usage fields only), 272 messages. The prices are quoted from the saved price page.
- Method
- Dollars = thousand tokens times the price per million times messages, divided by a thousand. The four bands are ours. One line at a time: the engine multiplies its inputs and cannot add four lines; the bill reader in module nine splits a whole record. Check: 122.8 million cache-read tokens at 0.20 per million is 71.9% of the class 96 build's 34.18 estimated dollars.
- n
- One session, 272 messages; two saved copies of one price page.
- Source
- The vendor's price page (two saved copies, 2026-10-03 and 2026-10-11); our build transcript, usage fields only.
- Excludes
- Long-context, data-residency, fast-mode and batch prices; contracted rates; your own sessions; any bill.
The saved price table changed between our two copies
A price table is the dated list of prices. We saved the vendor's pricing page twice. The first copy is dated 2026-10-03 in US Eastern time; it was read at 01:08 on 2026-10-04 in UTC, the zone the run dates use. The second copy is dated 2026-10-11. Of the prices for the three models in the runs, only Sonnet 5.5's changed: its cache hit went from $0.20 to $0.10 per million tokens. The footnote under the table changed with it.
| Copy saved | The footnote, word for word |
|---|---|
| 2026-10-03 | "Cache hits and refreshes on Claude Opus 5.5 are priced at 0.05x the base input price." |
| 2026-10-11 | "Cache hits and refreshes on Claude Opus 5.5 and Claude Sonnet 5.5 are priced at 0.05x the base input price." |
Quotedn = 2 saved copies Both from the vendor's pricing page, saved 2026-10-03 and 2026-10-11. The later copy also has price rows for one model the earlier copy did not list, Claude Haiku 5.5, in two rows by prompt length.
To reprice is to work out the same usage with a different table. We repriced three sets of usage with the 2026-10-11 table.
| Usage | 2026-10-03 table | 2026-10-11 table | Change |
|---|---|---|---|
| Class 96 build, 272 messages | $34.18 | $21.90 | 35.9% lower |
| Class 100 build, 1,181 messages | $130.01 | $82.80 | 36.3% lower |
| The 247 recorded runs | $6.94 | $6.89 | 0.7% lower |
| of which the 103 Sonnet 5.5 runs | 2.7% lower |
MeasuredCalculatedList price, not a billn = 272 messages, 1,181 messages, 247 runs The 2026-10-03 column is measured (the printed figures for the runs, our own pricing of the build transcripts); the 2026-10-11 column is calculated. Both are estimates at list price, not bills.
Why the same change moved them so differently
The shape again. The two long builds were mostly cache reads, 71.9% and 72.6% of their estimates, so a lower cache-hit price moves them by more than a third. In the 247 runs, cache reads were 6.5% of the estimate and only 103 of the runs used Sonnet 5.5, so the total hardly moved.
The lesson is a habit. Price usage at the table in force on its date, and keep that table and its date with your numbers. The 247 printed figures match the 2026-10-03 table in 247 of 247 runs. If you compare two periods, price both at one table, or say which table priced each.
Not verified
When the price changed between 2026-10-03 and 2026-10-11, and why, is not verified. This page gives no date and no reason for it. It says only what the two saved copies show.
What happens when the price table changes?
Two saved copies of the same vendor price page, from 2026-10-03 and 2026-10-11, list different cache-hit prices for Sonnet 5.5: 0.20 and then 0.10 per million. Seven statements about what that does to our figures. Read PASS (the button says ship) as: true. Read FAIL (send back) as: false, or more than the copies show. When the price changed, and why, is not verified.
The class 96 build's estimate falls by about 36% with the 2026-10-11 table.
The 247 short runs fall by about the same.
Opus 5.5 figures change too.
The price page says on what date the price changed.
Price usage at the table in force on its date, and keep that table with the numbers.
To reprice a session you need only its total dollars.
The later copy lists a model the earlier copy does not.
Your answers stay in this browser. Nothing is sent anywhere. Reset clears them.
CalculatedQuoted How the repriced figures were calculated
- Measured
- Repriced figures calculated from the same token counts with each saved table: the class 96 build, one of our own Claude Code build sessions for an earlier class, measured from its saved transcript (usage fields only) (272 messages), the class 100 build, nine transcripts of another of our own build sessions (usage fields only) (1,181 messages), and the 247 runs. The statements are constructed.
- Method
- Every message or run priced at each table, kind of token by kind of token; the fall is the difference over the 2026-10-03 figure. Dollars are list-price estimates.
- n
- 272 and 1,181 messages; 247 runs (103 Sonnet 5.5).
- Source
- The vendor's price page (two saved copies, 2026-10-03 and 2026-10-11); the run records (247 recorded
claude -pruns, made one at a time from 2026-10-01 to 2026-10-04 on one Windows PC with Claude Code2.1.284and a subscription login (no API key); no new run was made for this page); our build transcripts, usage fields only. - Excludes
- When and why the price changed (not verified); any other table; any bill.
Per run versus per success
Per run divides the estimated dollars by every attempt. Per success divides them only by the attempts that passed a check. When an attempt can fail, the second figure says what one working result came to.
Coding prompts
MeasuredCalculatedList price, not a billn = 72 coding-prompt runs Pass or fail from each run's saved grade; estimates from the printed figures, at the list prices as saved on 2026-10-03.
The 9 runs that failed were one run in eight, but they took 24.3% of the estimate. A per-run figure hides that. The per-pass figure, $0.0200, is the one to quote for what a working answer came to in these runs.
Bug fixes
74 of the 75 bug fixes were solved, which means their hidden tests passed. With almost every attempt solved, the two figures barely differ: $0.0402 per run and $0.0408 per solved bug, all models pooled. Class 98 teaches the bug-fix loop itself.
--model | Solved | Estimate per solved bug |
|---|---|---|
claude-sonnet-5-5 | 24 of 25 | $0.0252 |
claude-opus-5-5 | 25 of 25 | $0.0605 |
claude-sonnet-5 | 25 of 25 | $0.0360 |
MeasuredCalculatedList price, not a billn = 25 runs per model, 75 in all The same five bugs for each model. Solved means the hidden tests passed. Estimates at the list prices as saved on 2026-10-03.
Per solved bug, the three models span 2.4 times on the same five bugs. That is a range, not a ranking: this page compares no models, and Class 96 does.
By kind of task
MeasuredCalculatedList price, not a billn = 247 recorded runs, the 4 probes left out; 15 Sonnet 5.5 runs for the 7.8 times The median printed figure per run for each kind of task, all models that ran it pooled (measured). The 12.7 and 7.8 times are one median divided by another (calculated). One Windows PC, Claude Code 2.1.284, subscription login, no new run.
The medians sit 12.7 times apart, from email summaries to slide decks. Part of that gap is the model mix, not the job: claude-opus-5-5 ran 3 of the 9 slide decks and none of the 24 email summaries. With the Sonnet 5.5 runs alone, 3 decks and 12 email summaries, the gap is 7.8 times. A median per run says which jobs came to more per run, with the models that ran them. It does not say what a success came to; where a job can fail, pair it with its pass count.
Before you quote a figure, check six things: it says estimate or bill; it names the price table and its date; it is per success where an attempt can fail; it gives n; it names the kind of task; and it says what it leaves out. One that passes all six: coding prompts with no tools, $0.0200 per passing run, estimated at list price with the 2026-10-03 table, 63 passes in 72 runs, on one Windows PC with Claude Code 2.1.284; not a bill, and silent about any other setup.
Is this cost figure ready to quote?
Six checks a cost figure should pass before you quote it, in order. For each of seven sentences, pick the check that stops it first; if one passes all six, pick the last button. The sentences are constructed; their figures are recorded, from the 72 coding-prompt runs.
Constructed: “A coding prompt costs about two cents.”
- Says estimate or billIt says whether the figure is a list-price estimate or a provider's bill.REFUSED
- Names the price table and its dateIt names the price table it used and that table's date.never reached
- Per success where attempts can failWhere an attempt can fail a check, it divides by the attempts that passed, or gives both figures.never reached
- Gives nIt says how many runs or messages the figure covers.never reached
- Names the kind of taskIt says what kind of work the runs did.never reached
- Says what is left outIt says what the figure does not cover.never reached
Constructed: “Coding prompts: 0.0175 dollars per run, estimated at list price.”
- Says estimate or billIt says whether the figure is a list-price estimate or a provider's bill.pass
- Names the price table and its dateIt names the price table it used and that table's date.REFUSED
- Per success where attempts can failWhere an attempt can fail a check, it divides by the attempts that passed, or gives both figures.never reached
- Gives nIt says how many runs or messages the figure covers.never reached
- Names the kind of taskIt says what kind of work the runs did.never reached
- Says what is left outIt says what the figure does not cover.never reached
Constructed: “Coding prompts: 0.0175 dollars per run, a list-price estimate at the 2026-10-03 table.”
- Says estimate or billIt says whether the figure is a list-price estimate or a provider's bill.pass
- Names the price table and its dateIt names the price table it used and that table's date.pass
- Per success where attempts can failWhere an attempt can fail a check, it divides by the attempts that passed, or gives both figures.REFUSED
- Gives nIt says how many runs or messages the figure covers.never reached
- Names the kind of taskIt says what kind of work the runs did.never reached
- Says what is left outIt says what the figure does not cover.never reached
Constructed: “Coding prompts: 0.0200 dollars per passing run, a list-price estimate at the 2026-10-03 table.”
- Says estimate or billIt says whether the figure is a list-price estimate or a provider's bill.pass
- Names the price table and its dateIt names the price table it used and that table's date.pass
- Per success where attempts can failWhere an attempt can fail a check, it divides by the attempts that passed, or gives both figures.pass
- Gives nIt says how many runs or messages the figure covers.REFUSED
- Names the kind of taskIt says what kind of work the runs did.never reached
- Says what is left outIt says what the figure does not cover.never reached
Constructed: “0.0200 dollars per passing run, a list-price estimate at the 2026-10-03 table, n 72, 63 passed.”
- Says estimate or billIt says whether the figure is a list-price estimate or a provider's bill.pass
- Names the price table and its dateIt names the price table it used and that table's date.pass
- Per success where attempts can failWhere an attempt can fail a check, it divides by the attempts that passed, or gives both figures.pass
- Gives nIt says how many runs or messages the figure covers.pass
- Names the kind of taskIt says what kind of work the runs did.REFUSED
- Says what is left outIt says what the figure does not cover.never reached
Constructed: “Coding prompts with no tools: 0.0200 dollars per passing run, a list-price estimate at the 2026-10-03 table, n 72, 63 passed.”
- Says estimate or billIt says whether the figure is a list-price estimate or a provider's bill.pass
- Names the price table and its dateIt names the price table it used and that table's date.pass
- Per success where attempts can failWhere an attempt can fail a check, it divides by the attempts that passed, or gives both figures.pass
- Gives nIt says how many runs or messages the figure covers.pass
- Names the kind of taskIt says what kind of work the runs did.pass
- Says what is left outIt says what the figure does not cover.REFUSED
2.1.284, a subscription login, a one-line system prompt with --safe-mode and no tools, three models pooled, and nobody's bill.Constructed: “Coding prompts with no tools, three models pooled: 0.0200 dollars per passing run (0.0175 per run), a list-price estimate at the 2026-10-03 table; n 72 runs, 63 passed; recorded on one Windows PC with Claude Code 2.1.284 and a subscription login, a one-line system prompt, --safe-mode and no tools; not a bill, and not your setup.”
- Says estimate or billIt says whether the figure is a list-price estimate or a provider's bill.pass
- Names the price table and its dateIt names the price table it used and that table's date.pass
- Per success where attempts can failWhere an attempt can fail a check, it divides by the attempts that passed, or gives both figures.pass
- Gives nIt says how many runs or messages the figure covers.pass
- Names the kind of taskIt says what kind of work the runs did.pass
- Says what is left outIt says what the figure does not cover.pass
Your answers stay in this browser. Nothing is sent anywhere. Reset clears them.
CalculatedMeasured What is recorded and what is constructed
- Measured
- Seven constructed sentences. Constructed for this drill. Not a recorded run. Their figures are recorded: the 72 coding-prompt runs (63 passed their saved grade), 0.0175 dollars per run and 0.0200 per passing run, 24.3% of the estimate on runs that failed; bug fixes 0.0408 per solved bug (74 of 75 solved).
- Method
- Per run = total estimate divided by runs; per pass = total estimate divided by passing runs, three models pooled. A sentence stops at the first check it fails. The checks are our checklist.
- n
- 72 coding-prompt runs; 75 bug-fix runs. 247 recorded
claude -pruns, made one at a time from 2026-10-01 to 2026-10-04 on one Windows PC with Claude Code2.1.284and a subscription login (no API key); no new run was made for this page. Small samples: no interval is claimed. - Source
- The run records and their saved grades; the vendor's price page (two saved copies, 2026-10-03 and 2026-10-11).
- Excludes
- Your runs; other prices; whether six checks are enough for your use.
Effort
Effort, as the takeaways put it, is the setting that tells the model how much to think and write before it answers. The vendor's API page on effort describes it as a trade, with one model, between how thorough a response is and how few tokens it uses. It acts on every output token: the text, the tool calls and the thinking. At lower effort the model also makes fewer, shorter tool calls. The same page adds a caution: "Effort is a behavioral signal, not a strict token budget."
The page lists the levels low, medium, high, xhigh and max, and not every model offers all of them. In Claude Code you set the level with the --effort flag, the /effort command or the CLAUDE_CODE_EFFORT_LEVEL environment variable, according to its model configuration page.
Two pages, two defaults
The vendor states the default level on two pages, for two products. Here are both sentences as written. I do not try to make them agree.
- The API page (the effort setting of the Claude API): "Most Claude models default to high effort, spending as many tokens as needed for excellent results; Claude Opus 5.5 and Claude Haiku 5.5 default to medium."
- The Claude Code page (model configuration, in its list of how Claude Code picks a session's level): "The model's default effort:
highon every model that supports effort, except that Opus 5.5, Sonnet 5.5, and Haiku 5.5 default tomedium". The list item goes on to name more exceptions for other models.
Quotedn = 2 sentences from 2 saved pages Verbatim from the API effort page and the Claude Code model configuration page, both saved 2026-10-11. The API sentence names two models at medium; the Claude Code sentence names three, Sonnet 5.5 among them. Which level the recorded runs without a flag ran at is not in our evidence, so this page does not say.
One small test
Among the 247 recorded runs are 16 effort runs: Sonnet 5.5 on the same 8 coding prompts, once with --effort low and once with --effort high. Each answer was graded, as for the other coding prompts. For a third row I took the same model's first run of each prompt with no --effort flag, from the coding set: a first repetition, so its cache started cold.
| Effort | Passed | Estimate, all runs | Median output tokens | Thinking tokens, sum | Runs with thinking |
|---|---|---|---|---|---|
low | 7 of 8 | $0.0748 | 727.5 | 1,375 | 3 |
high | 7 of 8 | $0.0988 | 1,026.5 | 3,838 | 6 |
| no flag | 7 of 8 | $0.0745 | 586 | 1,674 | 3 |
MeasuredCalculatedList price, not a billn = 8 runs per row The CLI's own estimates and token counts from each run's result line, and each run's saved grade. The low and high rows passed --effort; the no-flag row is the first repetition from the coding set. The ratio is calculated: the high total over the low total. One model, one Windows PC, Claude Code 2.1.284, a subscription login; no new run.
The high-effort runs' estimate was 1.32 times the low-effort runs', about 32% more, and both passed the same 7 of 8. The high runs wrote more: a median of 1,026.5 output tokens against 727.5, and 3,838 thinking tokens across 6 runs against 1,375 across 3. The runs with no flag came to about the same estimate as the low runs, $0.0745 against $0.0748, with the shortest median output, 586 tokens.
Read this as one small test, not a rule. What limits it:
- One model. Every run here is Sonnet 5.5. The Claude Code page says the effort scale is calibrated per model, so the same level name does not stand for the same underlying value on another model.
- The same 8 coding prompts. What effort does to a bug fix with tools, or to a long session, was not tested here.
- One run per prompt per level. With 8 runs a setting, this page claims no confidence interval, and one answer moves the pass count by one in eight.
- Low ran first. Every low-effort run started before the first high-effort run, so the two sets were not interleaved in time. In the recorded counts all 24 runs of the test, the no-flag row included, started with a cold cache (0 cache-read tokens).
- List-price estimates. The dollars are the CLI's own figures at list price on a subscription login, not a bill.
Thinking is priced as output
The vendor's costs page for Claude Code says: "Thinking tokens are billed as output tokens, and the default budget can be tens of thousands of tokens per request depending on the model." In all 247 runs the thinking count sat inside the output count, not on top of it (see the four kinds of token). 165 runs had some thinking, and thinking was 21.8% of the output tokens. Priced at the output rate, it came to 14.3% of the runs' estimated dollars.
By the vendor's description, effort acts on output tokens, and output carries the highest price per million of the four token types in every price row for the models in these runs. That is how a setting about how much the model writes reaches the dollars.
QuotedCalculatedn = 247 runs The sentence is from the costs page, saved 2026-10-11. The shares are thinking tokens over output tokens, and thinking tokens at each run's output price over the 247 runs' estimated dollars, at the 2026-10-03 table.
Measured How the effort test was read
- Measured
- The CLI's estimate (
total_cost_usd), the grade, the output tokens and the thinking tokens of each run, summed or taken as a median per setting. - Method
- Read from each run's saved result line and grade. The ratio is the high total divided by the low total. The no-flag row is the same model's first repetition of the same prompts, taken from the coding set.
- n
- 8 runs per setting, one per prompt: 16 runs at a set effort and 8 without the flag. That is too few for a confidence interval, and none is claimed.
- Source
- The saved runs, recorded one at a time from 2026-10-01 to 2026-10-04 on one Windows PC with Claude Code
2.1.284and a subscription login; no new run. The default sentences: the API effort page and the Claude Code model configuration page, saved 2026-10-11. - Excludes
- Other models, other kinds of task, the levels
medium,xhighandmaxset with the flag, repeated runs of a prompt, and any bill.
The drill below gives claims about this test. Decide which ones the data support.
Do the effort runs support this?
One small test: Sonnet 5.5 on the same 8 coding prompts, one run per prompt at effort low and one at effort high, every low run before the first high run, dollars as list-price estimates. Seven claims. Read PASS (the button says ship) as: the runs or the saved pages support it as written. Read FAIL (send back) as: they do not.
High effort came to about 1.32 times the estimated dollars of low effort on these 8 prompts.
High effort solved more of the prompts.
Low effort will save money on your own tasks.
Claude Code's documentation gives medium as the default effort for Sonnet 5.5.
high on every model that supports effort, except that Opus 5.5, Sonnet 5.5, and Haiku 5.5 default to medium” (from a list on that page).The API's effort page and Claude Code's page give the same default for Sonnet 5.5.
High effort wrote more thinking tokens in this test.
Thinking tokens are a separate line from output on the price page.
Your answers stay in this browser. Nothing is sent anywhere. Reset clears them.
MeasuredCalculatedQuoted What the effort test can and cannot say
- Measured
- Recorded: 8 Sonnet 5.5 runs at effort low and 8 at effort high on the same 8 coding prompts, plus 8 default runs (no flag, first repetition, cold cache); passes from the saved grades. The claims are constructed.
- Method
- Totals are the CLI's estimates at list price, summed. Ratio = high total divided by low total. Every low run started before the first high run, so the two sets were not interleaved in time. In the recorded counts all 24 runs started with a cold cache (0 cache-read tokens).
- n
- 8 runs per level, one run per prompt per level. Small samples: no interval is claimed. 247 recorded
claude -pruns, made one at a time from 2026-10-01 to 2026-10-04 on one Windows PC with Claude Code2.1.284and a subscription login (no API key); no new run was made for this page. - Source
- The run records and saved grades; Effort (the API) and Model configuration (Claude Code), and Manage costs, saved 2026-10-11.
- Excludes
- Other models, prompts and repetitions; interleaved order; other effort levels; your plan; any bill.
An estimate is not a bill
Every dollar figure from a run or a transcript on this page came from token counts and a price list, worked out on a machine. None came from a provider's invoice. As the quick answer set out, that makes each one an estimate at list price (also called nominal), and a bill is what a provider's billing report says you owe. This module adds one word: to reconcile is to check that a printed figure equals the arithmetic behind it.
What the vendor says the figure is
The vendor's Claude Code pages say it plainly. These are their sentences, word for word:
- On
/usage, from the costs page: "Claude Code computes the dollar figure locally from token counts at list price, unless amodelPricingtable is in effect." And: "The figure is an estimate, so for authoritative billing see the Usage page in the Claude Console." - On a
claude -prun'stotal_cost_usd, from the headless page: "Both figures are client-side estimates and can differ from your actual bill." - On the status line's cost field, from the status line page: "Estimated session cost in USD, computed client-side at list price unless a
modelPricingtable is in effect. May differ from your actual bill." - On subscriptions, from the costs page: "Claude Max and Pro subscribers have usage included in their subscription, so the session cost figure isn't relevant for billing purposes."
- On contracted rates, from the costs page: "By default, Claude Code computes every cost figure it shows developers at list price, so if your organization pays contracted rates, the figures in
/usage, the status line, and OpenTelemetry don't match your bill."
Quotedn = 6 quotations from 3 saved pages Verbatim from the vendor's Claude Code docs, saved 2026-10-11. Link text inside a sentence is shown as plain text. The costs page says an administrator sets a modelPricing table in managed settings, so that the figure uses contracted rates.
Our runs: all 247 used a subscription login and no API key, so none was billed per token. Every dollar figure from them on this page is the CLI's own estimate at list price. The figures for our two build sessions are the same arithmetic, done by us on their transcripts. None of it is a bill, and none of it says what any account was charged.
Reconcile the vendor's own sample
The costs page prints a sample /usage block. It is the vendor's example, not one of our runs. These are its first line and its model lines, with three lines left out:
Total cost: $0.55
...
Usage by model:
claude-sonnet-4-6: 1.2k input, 5.3k output, 940.0k cache read, 50.0k cache write ($0.55)
The block gives four token counts and one model. It does not say the lifetime of the cache writes, and the write price depends on it. So price it both ways, at the Sonnet 4.6 list prices on the saved pricing page:
| Line | Tokens in the sample | Sonnet 4.6 list price, per million |
|---|---|---|
| Input | 1.2 thousand | $3 |
| Output | 5.3 thousand | $15 |
| Cache read | 940 thousand | $0.30 |
| Cache write, 5-minute lifetime | 50 thousand | $3.75 |
| Cache write, 1-hour lifetime | the same 50 thousand | $6 |
QuotedCalculatedn = 1 sample block Token counts and the printed total from the costs page; prices from the pricing page; both saved 2026-10-11. The two totals are our arithmetic: each count times its price, added up.
With 5-minute writes the tokens come to $0.5526, which rounds to the printed $0.55. With 1-hour writes they come to $0.6651. Only the cache-write line differs, at $3.75 or $6 per million. So the printed figure matches the 5-minute price and not the 1-hour price. The block does not say so; you find it out only by reconciling.
That matters for your own numbers. The costs page says the cache lifetime is an hour on a subscription (five minutes once you draw on usage credits) and five minutes by default on an API key or a cloud provider. In our 247 runs, all 322,520 cache-write tokens were written at the 1-hour lifetime and none at 5 minutes. If you price a record yourself, use the lifetime your setup wrote. A transcript and a claude -p result line record it; the /usage block does not.
The drill below lists figures you may meet. Say which of them is a bill.
Estimate or bill?
Eight figures you may meet. Read PASS (the button says ship) as: this is a bill, a provider's own record of what is owed. Read FAIL (send back) as: this is an estimate. The items are constructed from the vendor's saved pages and our own records.
The total_cost_usd in a claude -p result line.
The Total cost line in the Session block of /usage.
modelPricing table is in effect.” “The figure is an estimate, so for authoritative billing see the Usage page in the Claude Console.”The cost field in the status line.
modelPricing table is in effect. May differ from your actual bill.”The same /usage figure, on a subscription.
/usage after an organization sets a modelPricing table with its contracted rates.
/usage, the status line, and OpenTelemetry don't match your bill.” With a table set, the same page says: “The figures are still estimates, not an invoice.”A provider's billing report, grouped by SKU.
Our own log of the search requests, priced at list price.
The Usage page in the Claude Console, the vendor's named place for authoritative billing.
Your answers stay in this browser. Nothing is sent anywhere. Reset clears them.
QuotedReported Where each answer comes from
- Measured
- Eight constructed items. Constructed for this drill. Not a recorded run. The quotes are from the vendor's saved pages; the bill values were reported by our reviewer, who read the billing report grouped by SKU on 2026-10-10.
- Method
- PASS only for a provider's own billing record, or, for the Usage page, the vendor's own words naming it for authoritative billing. A figure a tool computes from token counts at list price is an estimate.
- n
- 8 items; 247 runs; one search-service bill.
- Source
- Manage costs, Run Claude Code programmatically and Status line (saved 2026-10-11); the billing report as read by our reviewer.
- Excludes
- Your own bill; contracted rates; Claude usage on the search-service bill (that test used none).
A real bill, read by SKU
This is the only real bill on the page, and it is not for Claude. For another class we tested a search service on a cloud provider, Vertex AI Search on Google Cloud. Our scripts kept their own log of every request and priced each one at list price. Later our reviewer read the provider's billing report for the same work. The two did not agree, and the reason is the lesson. Three more words first:
- SKU: one priced line item in a bill, a product and a unit the provider charges for.
- Free allowance: an amount of use the provider does not charge for, such as a number of free queries a month.
- Promotional credit: an amount the provider takes off the charges, so a line can show a cost and still net to nothing.
| Line | Requests | Per request | Amount |
|---|---|---|---|
| Our log: every request at both SKUs' list rates added ($0.004 + $0.004) | 195 | $0.008 | $1.56 |
| Bill: generative add-on SKU, offset by a promotional credit | 10 | $0.004 | $0.04 |
| Bill: base query SKU, inside the free allowance (the 196 includes the 10) | 196 | none | $0.00 |
| Bill: net after the credit | $0.00 |
ReportedMeasuredCalculatedn = 195 logged requests, and one billing report The bill lines are as our reviewer read them in the billing report, grouped by SKU, on 2026-10-10; no export was saved. The log lines are counted from our scripts' own request log; the log's $0.008 is two SKUs' list rates added, $4.00 per thousand queries for the query edition used and $4.00 per thousand for the add-on, from the provider's pricing page. The add-on's rate per request is calculated: its usage cost over its 10 requests. No Claude usage is in this table.
Our log said 195 requests at a list price of $0.008 each, $1.56 in all. The billing report, grouped by SKU, said something else. Only 10 requests appeared on the generative add-on SKU, for $0.04 of usage, and a promotional credit offset it. The base query SKU counted 196 requests in all, the 10 among them, at $0.00, inside the free allowance; the other 186 carried no charge. The provider's pricing page, saved 2026-10-06, puts that allowance at "10,000 queries per account, per month at no cost", and says it does not cover the generative add-on. Net: $0.00.
An earlier forecast expected the later requests to add about $0.87 on the add-on SKU. None came. Our reviewer's note on the cause reads: "The wrong figures came from assuming every answer request carries the add-on charge."
So the log overstated the billed usage cost 39 times: $1.56 against $0.04. Our log had charged every request both SKUs' list rates: $4.00 per thousand queries for the query edition used plus $4.00 per thousand for the add-on, $0.008 a request in all. The base query SKU's requests fell inside the free allowance, and the add-on charge, $0.004 a request, applied to 10 requests, not to every request.
What this teaches about any bill
- Group by SKU. A bill is a list of priced line items, not one number. Read each line.
- Find which requests carried which charge. Here all 196 requests on the base query SKU fell inside a free allowance, and 10 of them also carried the add-on charge.
- Do not charge every request every SKU's rate. Our log priced each request at the base rate plus the add-on rate, $0.008, and reached $1.56; only 10 requests carried the add-on charge.
- Wait for the charges to post before you conclude, in either direction. The forecast of about $0.87 more did not come.
For Claude usage, the vendor's costs page points to the Usage page in the Claude Console for authoritative billing (module seven). This page reads no Claude bill, because none of our runs was billed per token. The habit is the same for any provider.
Reported How the bill was read
- Measured
- The requests and amounts on two SKUs of the search service's billing report, and the net after a promotional credit; next to them, the requests and the list price in our own request log. The 196 requests on the base query SKU include the 10 on the add-on SKU; the other 186 carried no charge.
- Method
- Our reviewer read the billing report grouped by SKU on 2026-10-10 and wrote the lines down. The log total is the logged list price summed; the logged $0.008 a request is the base and add-on list rates added, $4.00 per thousand queries each. The billed rate is the add-on usage cost divided by its 10 requests, and the 39 is the log total divided by the billed usage cost.
- n
- 195 logged requests and one billing report.
- Source
- Our scripts' request log; our reviewer's read of the billing report and note on the cause; the provider's pricing page for the free allowance and the two list rates, saved 2026-10-06.
- Excludes
- No export of the bill was saved. No Claude usage. Account, project and credit details are left out on purpose. Our log counted 195 requests and the base query SKU 196; this page does not explain the difference of one.
The drill below lays the same lines out as a bill. Find the line that carried the charge.
Read the bill by SKU
Four rounds over one real bill for a search service (no Claude usage) and our own log of the same requests. The values were reported by our reviewer from the provider's billing report, grouped by SKU, on 2026-10-10. The layout of the lines is constructed, and no project, account or credit name is shown.
Which line carried a usage charge?
1 our log 195 requests x 0.008 each (two SKUs' list rates added) 1.56
2 bill SKU: generative add-on, 10 requests 0.04 offset in full by a promotional credit
3 bill SKU: base queries, 196 requests, the 10 among them 0.00 inside the free monthly allowance
4 bill net 0.00
5 forecast add-on SKU, the later requests about 0.87 moreRead each SKU line's amount.
Which line was priced inside a free allowance?
1 our log 195 requests x 0.008 each (two SKUs' list rates added) 1.56
2 bill SKU: generative add-on, 10 requests 0.04 offset in full by a promotional credit
3 bill SKU: base queries, 196 requests, the 10 among them 0.00 inside the free monthly allowance
4 bill net 0.00
5 forecast add-on SKU, the later requests about 0.87 moreLook for a SKU line at 0.00.
Which figure did not happen?
1 our log 195 requests x 0.008 each (two SKUs' list rates added) 1.56
2 bill SKU: generative add-on, 10 requests 0.04 offset in full by a promotional credit
3 bill SKU: base queries, 196 requests, the 10 among them 0.00 inside the free monthly allowance
4 bill net 0.00
5 forecast add-on SKU, the later requests about 0.87 moreOne line is a forecast.
Which line is an estimate, not the bill?
1 our log 195 requests x 0.008 each (two SKUs' list rates added) 1.56
2 bill SKU: generative add-on, 10 requests 0.04 offset in full by a promotional credit
3 bill SKU: base queries, 196 requests, the 10 among them 0.00 inside the free monthly allowance
4 bill net 0.00
5 forecast add-on SKU, the later requests about 0.87 moreOne line came from our own scripts.
Your answers stay in this browser. Nothing is sent anywhere. Reset clears them.
ReportedCalculated What is reported and what is constructed
- Measured
- Values reported by our reviewer, who read the provider's billing report grouped by SKU on 2026-10-10; no export was saved. Our log is measured (195 rows at 0.008, the base-query and add-on SKUs' list rates added). The line layout is constructed; no project, account or credit name is shown.
- Method
- Logged price = 0.004 + 0.004 = 0.008 per request (both SKUs' list rates). Billed rate = 0.04 divided by 10 requests = 0.004. Log over bill = 1.56 divided by 0.04 = 39.
- n
- 195 logged requests; 196 billed requests on the base query SKU, the 10 on the add-on SKU among them; one bill.
- Source
- Our request log; the billing report as read by our reviewer; the provider's pricing page for the free allowance and the two list rates, as quoted in this page's evidence file.
- Excludes
- Claude usage (this test used none); charges posted after 2026-10-10; other SKUs on the account.
Read your own bill
The bill reader below does this page's arithmetic on a record of your own. It reads a usage record, keeps one copy of each message, and prices every message with a dated price table (as saved on 2026-10-03 or 2026-10-11, see the price change) or with prices you type. It then shows tokens and dollars by token type side by side, reconciles any printed cost with its own arithmetic, and for the class sample shows the estimate per run and per success by kind of task.
Where your records are:
- A
claude -presult. With--output-format json, the headless page says the payload includestotal_cost_usdand a per-model cost breakdown. Our recorded runs were streams, and the last line of each, the result line, carried the same field and the token counts. - A Claude Code transcript. The session saved as JSON lines. The vendor's monitoring page names the files
~/.claude/projects/*/*.jsonl. - The
/usageblock. Paste the whole block: it gives the counts per model and the printed total.
The bill reader
Give it a usage record and it counts messages, not lines, prices every message with a dated price table, and sets tokens beside dollars for each token type. It checks any cost the record prints, and for the class sample it shows the estimate per run and per success by kind of task.
Pressing this tool's buttons sends nothing anywhere, and you can confirm that in your browser's network tab. The file you choose is read by your browser, on this page.
Scripts are off, so the reader cannot read a record here. With scripts on, it reads the class sample (the 247 recorded claude -p runs), a claude -p result or stream-json stream, a Claude Code transcript (.jsonl), the /usage block, or a CSV in our template, which is our layout and not a vendor export: model,input,cache_write_5m,cache_write_1h,cache_read,output,label,success. It prices at the list prices as saved 2026-10-03 or 2026-10-11, or at prices you type.
Below is what it shows for the class sample, from our ledger.
Choose a record
| Token type | Tokens | Share of tokens | Share of estimate |
|---|---|---|---|
| Input | 43,803 | 1.5% | 1.4% |
| Cache write (all at the 1-hour lifetime) | 322,520 | 10.8% | 24.8% |
| Cache read | 2,247,970 | 75.1% | 6.5% |
| Output | 379,186 | 12.7% | 67.4% |
| of which thinking (inside output) | 82,646 | - | 14.3% |
| All four types | 2,993,479 | - | - |
| Kind of task | Runs | Median per run |
|---|---|---|
| probe | 4 | $0.0010 |
| email summary | 24 | $0.0045 |
| coding prompt at a set effort | 16 | $0.0107 |
| coding prompt, no tools | 72 | $0.0121 |
| chart reading | 12 | $0.0172 |
| bug fix with tools | 75 | $0.0364 |
| long writing | 15 | $0.0383 |
| website build | 20 | $0.0436 |
| slide deck | 9 | $0.0576 |
MeasuredCalculatedList price estimaten = 247 runs Token counts and the CLI's own estimates from 247 recorded claude -p runs (one Windows PC, Claude Code 2.1.284, a subscription login, so no run was billed per token; no new run). Shares are our arithmetic. The estimate for all 247: $6.9446 at the list prices as saved 2026-10-03, $6.8948 at those saved 2026-10-11.
CalculatedList price estimate How the bill reader prices a record
- Measured
- Nothing new. The tool multiplies the token counts in the record you give it by the prices of a dated table, one token type at a time, and adds them up. For the class sample, the counts and the CLI's own figures are those of the 247 recorded runs.
- Method
- Tokens times the price per million, for input, cache writes (the 5-minute and 1-hour lifetimes priced apart), cache reads and output. Thinking tokens are counted inside output and not added again. A transcript is de-duplicated on
message.id, keeping each usage field at its largest value. Aclaude -pstream is read from its result line, not by adding up its assistant lines; a stream with no result line is priced from its assistant lines, with a warning that its output is understated.The/usageblock does not state the cache-write lifetime, so both prices are shown. A printed figure reconciles when the difference is under one millionth of a dollar, or, for/usage, when the estimate rounds to the printed cents. - n
- n = 247 runs for the class sample; for your own record, the lines and messages it holds. The tool does arithmetic and claims no confidence interval.
- Source
- The 247 runs were recorded 2026-10-01 to 2026-10-04, one at a time, on one Windows PC with Claude Code 2.1.284 and a subscription login (no API key); the tool holds their usage fields only. No new run was made for this page. Prices: the vendor's pricing page as saved 2026-10-03 and as saved 2026-10-11. The two copies list different cache-hit prices for Claude Sonnet 5.5; when or why that changed is not verified.
- Excludes
- A bill: discounts, contracted rates, regional multipliers, batch and fast-mode prices, tool fees, taxes and anything a subscription includes. Exports we have not seen, such as a console usage file or another tool's report. Transcript formats of other Claude Code versions may differ. The
/usageblock prints its token counts rounded (k, M); if a count is printed in M, that rounding alone could move the total by more than a cent (the vendor's saved sample shows only k).
The habit, in seven steps
- Find the record. Use the result line of
claude -p, a Claude Code transcript file or the/usageblock. Each of our 247 recorded runs ended in a result line that carried the CLI's estimate. - Count messages, not lines. One response can be written as several transcript lines, so keep one copy per message id. Summing lines over-counted our build sessions' dollars 1.75 to 3.29 times, and a stream's assistant lines held a median of 1.79% of the result line's output.
- Split tokens by type. Input, cache write (with its 5-minute or 1-hour lifetime), cache read and output, with thinking inside output. In the 247 runs, cache reads were 75.1% of the tokens and 6.5% of the estimated dollars.
- Price at the dated table. Use the list prices in force on the date of the usage, and keep the table with the numbers. Our class 96 build session came out 35.9% lower at the 2026-10-11 table than at the 2026-10-03 one.
- Divide by successes. Where an attempt can fail, divide the dollars by the attempts that passed. In 72 coding-prompt runs, 24.3% of the estimated dollars went to runs that failed their grade.
- Compare with the provider's bill, by SKU. Group the bill by SKU and see which requests carried which charge. Our search-service log said $1.56 at list price; the bill showed $0.04 on one SKU and $0.00 on another, net $0.00.
- Reconcile any printed figure. Check that a printed cost equals your arithmetic. The vendor's own
/usagesample prints $0.55, which matches its tokens at 5-minute cache-write prices ($0.5526) and not at 1-hour prices ($0.6651).
Before you trust a cost number of your own, answer the questions in the drill. It lists the steps that apply to you.
Before you trust a cost number of your own
Four questions; steps that do not apply disappear. Each step names its source: our measurement (a key in this page's evidence file) or a saved vendor page.
- Count messages, not linesOne API response can be written as several lines with the same
message.id. Keep one copy per message id, each usage field at its maximum. Summing lines over-counted our build sessions' dollars 1.75x to 3.29x. (Source: our measurement,rb.trap.lines_over_messages_minandrb.trap.lines_over_messages_max.) - Read the result line, not the assistant linesIn a stream, the assistant lines carry output counts often written before the final count: their sum was a median 1.79% of the result line's figure in our 247 runs, 0.88% for single-turn coding prompts and 19.7% for bug fixes with tools. Read
usageandtotal_cost_usdon the result line. (Source:rb.trap.snapshot_median_pct,rb.trap.snapshot_coding_median_pct,rb.trap.snapshot_bugfix_median_pct.) - Check which cache-write lifetime the block assumesThe block gives one cache-write figure with no lifetime. The vendor's own sample prints 0.55; its tokens priced at list price give 0.5526 with 5-minute writes and 0.6651 with 1-hour writes, so the printed figure matches 5-minute writes only. (Source: the saved costs page;
rb.usage_sample.usd_5m,rb.usage_sample.usd_1h.) - Use the reader's template as it is documentedThe bill reader above documents its CSV template, with the columns
model,input,cache_write_5m,cache_write_1h,cache_read,output,label,success. It is our template, not a vendor export: fill it from your own record and keep the record. (Source: the bill reader on this page.) - Split by kind of tokenFour lines: input, cache write (and its lifetime), cache read and output, with thinking inside output. In our 247 runs cache reads were 75.1% of the tokens and 6.5% of the estimated dollars. (Source:
rb.share.tok.cache_read,rb.share.usd.cache_read; the saved price page.) - Price at the table in force on the date, and keep it with the numbersThe same usage repriced with the later of our two saved tables fell 35.9% for the class 96 build and 0.7% for the 247 runs. Write the table's date beside every figure. (Source:
rb.t96.reprice_drop_pct,rb.reprice.runs_drop_pct.) - Find the table that was in force on that dateToday's table prices old usage at new prices. Keep a dated copy of the price page with your numbers; we kept two, from 2026-10-03 and 2026-10-11. (Source: the two saved copies of the price page.)
- Divide by successesIn our 72 coding-prompt runs 63 passed, and 24.3% of the estimated dollars went to runs that failed: 0.0175 per run became 0.0200 per pass. (Source:
rb.succ.coding.fail_spend_pct,rb.succ.coding.per_pass_usd.) - On a subscription, the dollar figure is not your billThe vendor: “Claude Max and Pro subscribers have usage included in their subscription, so the session cost figure isn't relevant for billing purposes.” Our 247 runs used a subscription login, so their dollars are list-price estimates only. (Source: the saved costs page;
rb.runs.apikey_none.) - With an API key, compare with the provider's bill, by SKUThe vendor: “The figure is an estimate, so for authoritative billing see the Usage page in the Claude Console.” Read the bill grouped by SKU: on our search-service bill, our log said 1.56 where the bill said 0.04 on one SKU and a net of 0.00. (Source: the saved costs page;
rb.sku.log_total,rb.sku.addon_cost.) - Treat a printed figure as an estimate until it reconcilesMultiply each kind of token by its price and add: the result should equal the printed figure. The CLI's figure matched that arithmetic in 247 of 247 runs. (Source:
rb.cost.reconciled.)
Your answers stay in this browser. Nothing is sent anywhere. Reset clears them.
MeasuredQuotedn = 247 recorded runs Counts measured from 247 recorded claude -p runs, made one at a time from 2026-10-01 to 2026-10-04 on one Windows PC with Claude Code 2.1.284 and a subscription login (no API key); no new run was made for this page. Each step names its source; the keys are entries in this page's evidence file. Vendor behaviour is quoted from saved pages (2026-10-11), not tested on your setup.
Where to go next
- Class 96: Claude Sonnet 5.5, measured against Opus compares models by cost per solved task. This class does not rank models.
- Class 100: Claude Code Headless reads the result line and the stream of a
claude -prun, the records this class prices. - Class 98: AI Bug Fix teaches the bug-fix loop with these 75 bug-fix runs.
- Class 71: Evals and Testing AI Output covers the other half of cost per success: a success needs a test.
- Class 52: AI Cost Engineering Masterclass is the academy's class on AI cost.
Two more classes are planned, with no dates and no promise that either will appear: Tests Before Prompts, and What Your Coding Agent Is Allowed to Run.
What we did not verify
This is the page's own list of gaps. I wrote the page from saved runs, saved session transcripts and one saved bill, and made no new run, so each item is a limit on those records or on what we tested.
- No Claude invoice. Our runs used a subscription login and none was billed per token, so no dollar figure here was checked against a Claude bill.
- No API-key billing. Nothing here ran on an API key. What an API-key bill shows for the same work was not seen.
- One setup. The 247 runs came from one Windows PC with Claude Code
2.1.284, run one at a time from 2026-10-01 to 2026-10-04. Every run replaced Claude Code's system prompt with one line (--system-prompt), started with--safe-mode, and gave the model no tools (151 runs),Readonly (21) orRead,EditandBash(75). The shares from the 247 runs are for that configuration; these runs did not use Claude Code's default system prompt or tool set. Other machines, versions and settings were not run. - The price change. When and why the Sonnet 5.5 cache-hit price changed between the copies of the pricing page saved 2026-10-03 and 2026-10-11 is not verified.
- The bill reader and records we have not seen. The Console usage page, a Console CSV export and other tools' records were not tried. The CSV the reader takes is our own template, not a vendor export. Two limits: a
claude -pstream cut off before its result line is read from its assistant lines alone, whose output counts fall short of the result line's, so its estimate comes out low; and the/usageblock prints its counts rounded (1.2k,940.0k), so if a count were printed in millions, rounding alone could move the total by more than a cent; the vendor's saved sample shows only thousands. - The effort test beyond its size. It covers 8 prompts, one model and one run per prompt per level, with low before high. Which level the runs without a flag used is not in our evidence.
- Other transcript formats. Transcripts from other Claude Code versions may be written differently.
- The search-service bill beyond our reviewer's read. No export was saved, and the difference of one request between our log and the base query SKU is not explained.
- Rules of thumb. Whether our per-message rule, or any rule fitted to one session, fits your sessions.
- Your plan. Nothing here says what your plan includes or what you will be charged.
- The docs may have changed since 2026-10-11, when the vendor pages were saved.
- The drills' constructed cases are not recorded runs. Each drill says which of its cases are recorded.
Bottom line
Read the record, count messages, split the tokens by type, price them at the dated table, divide by successes, and compare with the bill. In 247 recorded claude -p runs on one Windows PC (Claude Code 2.1.284, a subscription login), cache reads were 75.1% of the tokens and 6.5% of the estimated dollars; in one long build session of ours they were 71.9% of the dollars. Every figure from those runs and sessions is an estimate at list price. The only bill on the page, for a search service, came to $0.00 net where our log said $1.56. I wrote this page from saved records and made no new run.
Questions
How much does Claude Code cost?
It depends on how many tokens of each type the work uses and on the price table in force, so there is no single figure. Across 247 recorded claude -p runs on one Windows PC with Claude Code 2.1.284, the CLI's own estimate had a median of 0.0243 dollars per run at list price, from 0.00098 for a probe run to 0.1202 for the largest run. Those runs used a subscription login and were not billed per token, so these are estimates from one setup, not a bill. No new run was made for this page.
Why were cache reads 75% of the tokens but only 6.5% of the dollars?
Because the four token types are priced far apart. For the models in these runs, a cache read is priced at a tenth of the base input price or less, and output at five times the input price. In the 247 recorded runs, cache reads were 75.1% of the tokens and 6.5% of the dollars estimated at list price, while output was 12.7% of the tokens and 67.4% of the dollars.
What drives the dollars in a long Claude Code session?
Cache reads. On every turn the model reads the whole context again, most of it from the cache. In one long Claude Code build session of ours (272 messages, about 451 thousand context tokens per message), cache reads were 71.9% of the estimated dollars at list price, and 72.6% across nine transcripts of another build. In the 247 short recorded runs they were 6.5%. The shape of the work picks the biggest line.
Is the cost figure Claude Code shows my bill?
Not necessarily, and on a subscription it is not a bill. The vendor's costs page says Claude Code computes the dollar figure locally from token counts at list price, and its headless page calls such figures client-side estimates that can differ from your actual bill. The costs page also says that for Claude Max and Pro subscribers the session cost figure isn't relevant for billing purposes, and that contracted rates make the figures differ from the bill. All 247 recorded runs on this page used a subscription login.
How do I add up tokens from a Claude Code transcript?
Count messages, not lines. One API response can be written as several transcript lines that carry the same message id, so keep one copy per message id. In one of our build sessions, 715 lines held 272 messages, and summing every line over-counted our build sessions' estimated dollars 1.75 to 3.29 times. The bill reader on this page keeps one copy per message for you.
Where does a claude -p run report its cost?
In its result line, the last line of the output, which carries total_cost_usd and the token counts. In a stream the assistant lines also carry output_tokens, but their sum can fall far short of the result line's output figure. Over all 247 recorded runs it was a median of 1.79% of that figure: 0.88% for the single-turn coding prompts, 19.7% for the 75 bug fixes with tools, and up to 94.6% in one run other than the probes; it was equal in only 3 runs. Read the result line, and treat its figure as the CLI's estimate at list price.
Are thinking tokens priced as output?
Yes. The vendor's Claude Code costs page says: Thinking tokens are billed as output tokens, and the default budget can be tens of thousands of tokens per request depending on the model. In all 247 recorded runs the thinking count sat inside the output count, not on top of it. Thinking was 21.8% of the output tokens and 14.3% of the dollars estimated at list price.
Does higher effort cost more in Claude Code?
In one small test it did, with no gain in passes. Sonnet 5.5 ran the same 8 coding prompts once at low and once at high effort: the high runs' estimate was 1.32 times the low runs', and both passed 7 of 8. That is one model and one run per prompt per level, every low run started before the first high run, and the dollars are list-price estimates. Test on your own work before you rely on it.
What is the default effort level in Claude Code?
The vendor's Claude Code model configuration page says the default is high on every model that supports effort, except that Opus 5.5, Sonnet 5.5 and Haiku 5.5 default to medium, and it lists more exceptions. The vendor's API page on effort says most Claude models default to high and names Opus 5.5 and Haiku 5.5 as medium. The two pages are about different products. You can set the level yourself with --effort or /effort.
Did the price of cache reads change?
For one model, between our two saved copies of the vendor's pricing page. The copy saved 2026-10-03 lists Claude Sonnet 5.5 cache hits at 0.20 dollars per million tokens, and the copy saved 2026-10-11 lists 0.10. When it changed between those dates, and why, is not verified. Priced with the later table, our long build sessions came out 35.9% and 36.3% lower, and the 247 short runs only 0.7% lower.
Should I divide cost by runs or by successes?
By successes, wherever an attempt can fail. In 72 recorded coding-prompt runs, 63 passed their grade, and 24.3% of the estimated dollars went to the runs that failed. The estimate was 0.0175 dollars per run and 0.0200 per pass, at list price. Bug fixes solved 74 of 75, so there the two figures were close: 0.0402 per run and 0.0408 per solved bug.
Is the class free, and do I need to sign up?
Yes, it is free, and you do not need to sign up or give an email address. It is an independent class, not affiliated with Anthropic. The figures come from saved runs, saved session transcripts and one saved bill; no new run was made for it.