Claude Code session cost calculator
Agent sessions re-send their whole context on every call, so cost grows with the square of session length. Set the shape of a Claude Code session and see where the money goes.
Estimate
$1.50
- Cache reads
- $0.70
- Cache writes
- $0.29
- Output
- $0.30
- Cache misses
- $0.21
- Context at the end
- 100k tokens
An estimate from list prices, assuming every call reads the previous context from cache. Drop a real session into the analyzer for exact numbers.
How the estimate works
Each call reads the previous context from cache, writes the newly added context and produces output tokens. A cache miss rewrites the average context at the cache-write price instead of reading it. The total is what the same session would cost at the lab’s list prices.
Itemize your own session
Drop a Claude Code or Codex log. It is parsed in your browser, and you get your real numbers instead of a model.
Drop a session log here
Claude Code ~/.claude/projects/…/*.jsonl, a Codex rollout ~/.codex/sessions/…/rollout-*.jsonl, or the claude-code-action execution file.
Parsed in your browser. Your prompts and code never leave this tab.