Empirical evaluation reveals prompt caching reduces AI coding session costs by 85% across 11,942 assistant turns, indicating nominal token counts severely overestimate real expenses.
I built TokenMeter to figure out where token cost actually goes in a Claude Code session, broken down by prompt, by tool call, and by model, with prompt caching priced in properly (most tools ignore this and get the real cost wrong as a result). I ran it on about ten weeks of my own usage: 11,942 assistant turns across 1,154 prompts. A few things stood out. Cost is heavily concentrated, the top 10% of prompts account for about 45% of spend (Gini 0.61). Caching does most of the work: 95% of input context came from cache, cutting effective cost by about 85%, so counting nominal tokens overstates real cost roughly 6.5x. Tool calls weren't more expensive than plain generation, which surprised me. And one model, run on nearly every turn, accounted for 97.5% of the cost, more a default-setting effect than a small share of turns quietly driving the bill. Because the method only needs recorded token counts, not anything Claude Code-specific, it should carry over to other coding tools and to a study across multiple developers, that's the next step. This deposit has the paper, the scripts used for the analysis and figures, the anonymized dataset (token counts only, no code or prompt text), and the figures. The tool itself is at https://github.com/plumbgoat/tokenmeter.
No takes yet. Share an insight, caveat, or question.
Shweta Tyagi (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: