Free tool
AI API Cost Calculator
Estimate your monthly API spend across GPT, Claude, and Gemini from your own usage — ranked cheapest-first. Free and instant.
1M tokens ≈ 750,000 words. Tip: a chatbot turn is often ~500–2,000 in / ~200–800 out.
- GPT-5.4 minicheapest$30.00/mo
- Claude Haiku 4.5$35.00/mo
- Gemini 3.5 Flash$60.00/mo
- Gemini 3.1 Pro$80.00/mo
- Claude Sonnet 4.6$105/mo
- Claude Opus 4.8$175/mo
- GPT-5.6 Sol$200/mo
Cheaper still: run a capable model locally for $0/token.
Approximate public list prices ($/1M tokens). Directional only — confirm current pricing with each provider.
Reference prices (USD per 1M tokens)
The list rates this calculator runs on. On a 3:1 input:output mix, GPT-5.4 mini is the cheapest of the set at $1.69/1M blended.
| Model | Input /1M | Output /1M | Blended /1M | Context |
|---|---|---|---|---|
| GPT-5.6 SolOpenAI | $5 | $30 | $11.25 | 1.05M |
| GPT-5.4 miniOpenAI | $0.75 | $4.50 | $1.69cheapest | 400K |
| Claude Opus 4.8Anthropic | $5 | $25 | $10 | 1M |
| Claude Sonnet 4.6Anthropic | $3 | $15 | $6 | 1M |
| Claude Haiku 4.5Anthropic | $1 | $5 | $2 | 200K |
| Gemini 3.1 ProGoogle | $2 | $12 | $4.50 | 1M |
| Gemini 3.5 FlashGoogle | $1.50 | $9 | $3.38 | 1M |
Prices as of 20 Jul 2026 · list rates for prompts up to ~200K tokens · from the Frontier Ledger
Frequently asked
How is the AI API cost calculated?
Monthly cost = (requests × avg input tokens ÷ 1M × input price) + (requests × avg output tokens ÷ 1M × output price), summed for each model at its public per-million-token rate.
How many tokens is a typical request?
Roughly: 1M tokens ≈ 750,000 words. A single chatbot turn is often ~500–2,000 input tokens and ~200–800 output tokens, depending on context size.
How can I lower my AI costs?
Route cheap, short tasks to a smaller model (e.g. GPT-5.4 mini, Claude Haiku, Gemini Flash) and reserve the strong model for hard work — or run a capable open model locally for $0 per token.