Guide
Why ccusage undercounts your cache cost
The most popular Claude Code cost tool gets cache writes wrong. It is a real, verifiable accounting error.
The bug
In its `calculate` mode, ccusage prices every `cache_creation` token at the single 5-minute rate (1.25× input). But Claude Code predominantly writes 1-hour caches, which cost 2× input — so those writes are under-billed by roughly 60%.
The fix
The JSONL actually carries the split: `usage.cache_creation.ephemeral_5m_input_tokens` and `ephemeral_1h_input_tokens`. Price the 5-minute tokens at 1.25× and the 1-hour tokens at 2× separately. JP the Cat reads that split and bills each correctly — so your real cost is right where the popular tool is wrong.
Common questions
- Does this mean ccusage is wrong for everyone?
- It under-counts cost for anyone whose sessions use 1-hour cache writes — which is most Claude Code usage. The token counts are fine; the cache-write pricing is the issue.
See your real numbers with JP the Cat
A light, local menu-bar meter for Claude Code and Codex — real cost, honest limits.
Download Meow