Free Token Estimate calculator with clear step-by-step results.
Prices an LLM workload with input and output tokens billed at different rates, which matters because output is typically three to five times the price of input. Prompt caching is applied as a discount on the input side only, since cached prefixes reduce input cost but never output cost.
Effective input price
Price = list input price x (1 - cache hit rate x cache discount)
Daily cost
Cost = input tokens / 1,000,000 x effective input price + output tokens / 1,000,000 x output price
Output tokens are generated one at a time and cannot be batched the way a prompt can be processed in parallel, so each one costs far more compute to produce.
A great deal for repeated system prompts and long shared context - a 40% hit rate at a 90% discount cuts input cost by over a third. It does nothing for varied one-off prompts.