AI API Cost Calculator

Estimate monthly AI API costs based on requests, input tokens, output tokens, and model pricing.

How many API calls you expect daily.
Prompt, system message, history, and user input.
Average generated response length.
Set this to your model’s input price.
Set this to your model’s output price.
Optional discount for cached/reused input tokens.
Usually 30 days for monthly estimate.
Adds buffer for retries, tools, logs, or hidden system tokens.
Used to estimate cost per active user.
How we calculate
  • Input cost = input tokens ÷ 1,000,000 × input token price
  • Output cost = output tokens ÷ 1,000,000 × output token price
  • Cached input discount reduces input token cost only
  • Extra overhead adds a safety buffer for real-world usage