LLM API cost calculator

Enter your token counts and your model's prices (check your provider's pricing page) to see what a feature really costs at scale.

Estimated cost

Per request$0.0135
Per day$13.50
Per month (30 days)$405

Output tokens are 56% of the cost. Shorter answers are often the cheapest optimization.

How to lower this number

  • Cap and shorten outputs. Output tokens usually cost the most.
  • Put static instructions and documents first so prompt caching can hit.
  • Send fewer, better RAG chunks instead of whole documents.
  • Route easy requests to a smaller model, and batch work that can wait.

FAQ

How is LLM API cost calculated?

Providers charge per token, usually quoted per million tokens, with separate prices for input (your prompt) and output (the model's answer). Cost per request = input tokens × input price + output tokens × output price.

Why do output tokens cost more?

Generating each output token requires a full step of the model, while input tokens are processed in parallel. Output is typically priced several times higher than input.

How much does prompt caching save?

If a large part of your prompt is identical across requests, providers can charge cached reads at a fraction of the normal input price, often cutting input cost by more than half. Check your provider's current pricing.