Free calculators to estimate AI API costs across all major providers — OpenAI, Anthropic Claude, and Google Gemini. Budget your AI usage before it bills you.
Calculate monthly API costs for GPT-4o, GPT-3.5, Claude, Gemini, and other LLMs by request volume and token count.
Estimate AdSense monthly revenue from page views, niche RPM, and ad unit count for your website.
| Model | Provider | Input /1M | Output /1M |
|---|---|---|---|
| GPT-4o mini | OpenAI | $0.15 | $0.60 |
| GPT-4o | OpenAI | $5.00 | $15.00 |
| Claude 3.5 Sonnet | Anthropic | $3.00 | $15.00 |
| Claude 3 Haiku | Anthropic | $0.25 | $1.25 |
| Gemini 1.5 Flash | $0.075 | $0.30 | |
| GPT-4 Turbo | OpenAI | $10.00 | $30.00 |
| o1 mini | OpenAI | $3.00 | $12.00 |
| Claude 3 Opus | Anthropic | $15.00 | $75.00 |
Prices are approximate and subject to change. Verify current pricing at platform.openai.com, console.anthropic.com, and ai.google.dev.
For high-volume apps, the cheapest options are: Gemini 1.5 Flash ($0.075/$0.30 per 1M tokens), GPT-4o mini ($0.15/$0.60), and Claude 3 Haiku ($0.25/$1.25). For 1M requests/day at 500 input + 200 output tokens: GPT-4o mini ≈ $195/month · Gemini Flash ≈ $93/month · Claude Haiku ≈ $177/month. Always test quality first — the cheapest model that meets your quality bar is the best choice.
A typical exchange: User message ~50–200 tokens, AI response ~100–500 tokens. A full 10-turn conversation with context: 1,000–5,000 tokens total. A single 500-word essay generation: ~250 input tokens + ~700 output tokens. Code generation for a medium function: ~300 input + ~400 output. 1 token ≈ 4 characters or ¾ of a word in English.
Both are top-tier models. GPT-4o is better for: multimodal tasks (image + text), function calling, and general chat. Claude 3.5 Sonnet is better for: coding, long-document analysis, and following complex instructions. On coding benchmarks (HumanEval, SWE-Bench), Claude 3.5 Sonnet leads. For cost: GPT-4o at $5/$15 vs Sonnet at $3/$15 — Sonnet is cheaper on input tokens. Use the AI API Calculator to compare your specific use case.
Key strategies: (1) Use GPT-4o mini / Gemini Flash for simple tasks, reserve expensive models for hard tasks. (2) Cache common responses — identical prompts should return cached results. (3) Compress prompts — remove unnecessary words, use JSON instead of verbose text. (4) Batch requests where possible. (5) Set max_tokens limits to prevent unnecessarily long responses. Many teams cut costs 60–80% by routing easy queries to cheap models.
RPM (Revenue per Mille) = actual revenue you earned per 1,000 page views. CPM (Cost per Mille) = what advertisers pay per 1,000 ad impressions. The difference: RPM accounts for your page's ad fill rate and click-through rate, so it's always lower than CPM. If your page fills 80% of ad slots and CPM is $10, your RPM might be $7–$8. RPM is the metric that directly predicts your AdSense earnings.