LLM cost calculator
Estimate monthly spend and cost per successful task using your own usage and provider rates.
Usage and pricing
Edit the example with your usage and rates. Currency changes display only.
Your estimate
- Monthly cost
- $76.50
- Cost per successful task
- $0.0085
- Token cost per attempt
- $0.00465
How to estimate LLM costs
Measure cost per task alongside quality and latency. Use provider prices dated for your model, billing mode and currency. The numbers below are illustrative.
Collect measured inputs 2 checks
Measure all model calls per task, including retries and fallback calls. Record uncached input, cached input and output tokens separately.
Calculate monthly cost 2 checks
For each token class, multiply tokens per task by the rate per million tokens and divide by one million. Sum the classes and add other variable cost per task.
Compare scenarios 2 checks
Model normal and peak traffic. Include an uncached scenario and update retry and fallback assumptions if the traffic mix changes.
Worked monthly estimate
Example rates in USD per million tokens are hypothetical. Use the CSV to record the assumptions and results for each scenario.
Related reading How to reduce LLM costs: caching, batching, routing and shorter context.