AI Cost Calculators

    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.

    AI Model Pricing Reference (per 1M tokens)

    ModelProviderInput /1MOutput /1M
    GPT-4o miniOpenAI$0.15$0.60
    GPT-4oOpenAI$5.00$15.00
    Claude 3.5 SonnetAnthropic$3.00$15.00
    Claude 3 HaikuAnthropic$0.25$1.25
    Gemini 1.5 FlashGoogle$0.075$0.30
    GPT-4 TurboOpenAI$10.00$30.00
    o1 miniOpenAI$3.00$12.00
    Claude 3 OpusAnthropic$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.

    Frequently Asked Questions

    Which AI API is cheapest for production apps?

    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.

    How many tokens is a typical ChatGPT conversation?

    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.

    GPT-4o vs Claude 3.5 Sonnet — which is better?

    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.

    How do I reduce AI API costs?

    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.

    What is RPM vs CPM for ads?

    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.