AI API Cost Calculator
Estimate AI API costs using token usage, request volume, and your provider’s current pricing.
Input cost (monthly): $— · Output cost (monthly): $—
Total tokens / month: —
This is a general estimator: enter the current prices from your AI provider to calculate cost. Token counts also vary by model and language. Prices change often — always confirm the latest rates on your provider's pricing page. We don't provide or endorse specific prices.
Find current rates: OpenAI · Anthropic · Google Gemini
How this estimator works
The calculator uses the exact formula below — nothing is hidden or assumed. It only computes what you enter:
Output cost per request = output tokens ÷ 1,000,000 × output price
Cost per request = input cost + output cost
Monthly cost = cost per request × requests per month
What the estimate includes
Five inputs drive the result: input tokens per request, output tokens per request, requests per month, input price per million tokens, and output price per million tokens. The tool then shows the monthly cost, the cost per request, the monthly input and output costs separately, and the total tokens processed per month.
Example calculation
Using the default example values:
Input price $3 / 1M · Output price $15 / 1M
Output cost = 500 ÷ 1,000,000 × $15 = $0.0075
Cost per request = $0.0045 + $0.0075 = $0.012
Monthly cost = $0.012 × 10,000 = $120 ($45 input + $75 output)
Pricing note
AI provider prices change frequently, and the values shown above are examples only. Always confirm the current input and output rates on your provider's official pricing page before relying on an estimate. This tool does not fetch, store, or endorse any specific prices — you supply your own rates.
Privacy
This calculator runs locally in your browser. The tool itself does not transmit or store the values you enter.
