Multi-Turn AI Agent Prompt-Cache TCO Calculator
Model a coding or support agent’s conversation history and retries to compare monthly token spend with and without prompt caching.
Agent workload
Monthly costs and savings
Enter valid values to see the estimate.
USD · 30-day month
Monthly token spend
Monthly savings
- Without cache
- With cache
- Retry spend with cache
- Extra attempts
Monthly tokens with cache
- Standard input
- Cache reads
- Eligible prefix misses
- Billable output
Compare AI coding agent costs
Bring your monthly estimate to BudgetHub to compare API-based agent spending with coding agent plans.
Method & FAQ
How does the context grow each turn?
The first turn starts with the entered input tokens. Each later turn resends the previous turn’s input as an eligible prefix and appends the new tokens per turn. Include retained replies and tool results in that growth. Each task starts cold. Apply your hit rate to eligible repeated prefixes. Check your provider’s context limit and cache eligibility before using this estimate.
How do retries change billed usage?
The model assumes independent failures and retries until success, giving 1 ÷ (1 − failure rate) attempts per completed turn on average. Each failed attempt repeats the same input, has the same cache eligibility, and uses the entered output allowance. Failed output does not grow later context. A 100% failure rate has no finite estimate.
How are savings and cache misses priced?
The baseline bills all input at the standard rate. In the cached estimate, new input uses the standard rate, eligible prefix hits use the cache-read rate, and eligible misses use the miss or write rate. Both scenarios bill the same output and retry volume. Savings equal the baseline minus the cached estimate. Tools, cache storage, and taxes are outside this estimate.