AI API Cost Calculator
Budget your AI API spend before you build. Model your expected usage and see the monthly bill across providers.
Usage
$1.25/M in · $0.125/M cached in · $10.00/M out · 400K context
Estimated cost
$187.50/month
Per request
$0.00625
Per day
$6.25
Per year
$2,281.25
Compare across models
| Model | Provider | Per month |
|---|---|---|
| OpenAI | $7.50 | |
| OpenAI | $13.50 | |
| OpenAI | $24.00 | |
| OpenAI | $36.00 | |
| OpenAI | $37.50 | |
| OpenAI | $37.50 | |
| $46.50 | ||
| $78.75 | ||
| Anthropic | $105.00 | |
| OpenAI | $180.00 | |
| OpenAI | $180.00 | |
| $180.00 | ||
| OpenAI | $187.50 | |
| Anthropic | $210.00 | |
| OpenAI | $225.00 | |
| OpenAI | $240.00 | |
| $240.00 | ||
| Anthropic | $315.00 | |
| OpenAI | $420.00 | |
| Anthropic | $525.00 | |
| Anthropic | $525.00 | |
| Anthropic | $525.00 | |
| Anthropic | $1,050.00 |
How this is calculated
Providers bill input and output tokens separately, per million tokens (MTok). Cached input tokens — a repeated prompt prefix the provider recognizes — are billed at a discounted rate.
cost = (input_tokens − cached_tokens) × input_rate
+ cached_tokens × cached_rate
+ output_tokens × output_ratePricing is verified against provider pricing pages as of 2026-09-01. AI and cloud pricing changes frequently — confirm the current rate on the provider's own pricing page before budgeting.
Frequently asked questions
How do I estimate my request volume before launch?
Start from expected daily active users × average requests per user per day. For a chatbot, 1-3 requests per session is typical; for an agent with tool calls, count each model call in the loop separately.
Does this account for system prompts and conversation history?
Include them in your input token count — every prior turn you resend to a stateless API counts as input tokens on that request, which is why long conversations get progressively more expensive without caching.
Can I compare providers side by side?
Yes — the comparison table below the calculator shows every model's projected monthly cost for the same usage, sorted cheapest to most expensive.
What's the biggest lever for reducing API costs?
Prompt caching for repeated context, choosing a smaller/cheaper model for routine tasks, and trimming unnecessary output length typically save more than switching providers.