Token Cost Calculator

The per-request cost formula from Appendix B of Production LLM Architecture — see exactly where your API bill comes from.

Model & Volume

Model tier
70%

Cost Breakdown

Uncached input $0.000000
Cached input $0.000000
Output $0.000000
Per request $0.000000
$0
Per day
$0
Per month
Output tokens are 0% of this request's cost — and they generate sequentially, one at a time (the Sequential Output Law). Shortening responses or capping max_tokens cuts cost here faster than trimming input.

Cache Hit Rate Sensitivity

Same request, held constant — only the cached-input share changes. The book's steady-state target is 70%.

0%50%70%90%

Bars show monthly cost at each cache hit rate, using your current input/output/volume settings.

This is Appendix B. The book has 61 more tables like this — plus the filtering, caching, and routing techniques that change these numbers.

Get notified when it's live →