Formula
Token cost/task = (uncached tokens × input price + cached tokens × cached price + output tokens × output price) ÷ 1,000,000
Storage/task = storage cost/hour ÷ tasks/hour
Total cost/task = token cost + storage/task
What the result means
The main result is fully allocated cost per task. Savings compares this with billing all input tokens at the uncached input rate while keeping output and allocated storage unchanged.
Prices vary by provider, model, cache-write rules, retention duration, region, and date. Enter current contract prices; taxes, network fees, retries, and non-model infrastructure are excluded unless added separately.