Early-bird price on the GenAI & Agentic AI Engineer Bootcamp batch. Grab a seat →

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.

Monthly usage
Tokens and rates

Use average tokens per attempted task, including retries and fallbacks. Enter prices per 1 million tokens.

Other costs

Your estimate

Monthly cost
$76.50
Cost per successful task
$0.0085
Token cost per attempt
$0.00465

Download the PDF worksheet

Keep the calculation guide and worked example.

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.

  1. 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.

  2. 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.

  3. Compare scenarios 2 checks

    Model normal and peak traffic. Include an uncached scenario and update retry and fallback assumptions if the traffic mix changes.

  4. 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.