AI API Cost Calculator
Compare exact API costs across 20+ AI models β GPT-4o, Claude 3.5, Gemini 2.0, DeepSeek, Grok, Llama and more. Enter tokens or words, see costs instantly.
| Model | Input price | Output price | Input cost | Output cost | Total / call | Total (Γcalls) |
|---|
How to Use the AI API Cost Calculator
- Enter your token counts β Input the number of input tokens (your prompt) and output tokens (the AI's response). Switch to Words or Characters if you prefer β the calculator converts automatically (1 word β 1.3 tokens, 1 token β 4 characters).
- Set your API call volume β Enter how many API calls you make per day or month. The "Per 1,000 calls" default shows your cost at scale, which is usually what matters for budgeting.
- Filter by provider β Click OpenAI, Anthropic, Google, or DeepSeek to focus the comparison. Click "All Models" to see the full picture.
- Read the results β The table shows input cost, output cost, total per call, and total for your full call volume. The cheapest model gets a β badge. Sort by price or name using the dropdown.
- Use the summary cards β See the cheapest option, most expensive, average cost, and potential savings at a glance before diving into the table.
Understanding AI API Pricing in 2026
AI Model Pricing Comparison β Full Breakdown
OpenAI GPT Models
OpenAI remains the most-used AI API in 2026. GPT-4o is the flagship model at $2.50/MTok input and $10/MTok output β suitable for complex reasoning, vision, and code generation. GPT-4o Mini at $0.15/$0.60 is the budget tier, ideal for classification, summarization, and simple Q&A. The o3 reasoning model at $10/$40 per MTok is reserved for complex multi-step reasoning tasks where accuracy matters more than cost. OpenAI's Batch API offers 50% discounts for non-realtime workloads.
Anthropic Claude Models
Claude 3.5 Sonnet ($3/$15 per MTok) is widely considered the best model for coding and writing in 2026. Claude 3.5 Haiku ($0.80/$4) is the budget option with strong performance on structured tasks. Claude 3 Opus ($15/$75) is the premium reasoning model. Anthropic's prompt caching cuts cached input costs to $0.30/MTok for Sonnet β a major advantage for applications with fixed system prompts. Claude has a 200K token context window across all models.
Google Gemini Models
Gemini 2.0 Flash ($0.10/$0.40 per MTok) is Google's most cost-effective frontier model and one of the cheapest available in 2026. Gemini 2.0 Pro ($1.25/$5) is the premium tier. Gemini has a 1M token context window β the largest of any major provider β making it ideal for document analysis and long-context tasks. Google offers a free tier with rate limits for development and testing.
DeepSeek Models
DeepSeek V3 at $0.27/$1.10 per MTok caused a major market disruption in early 2025 by matching GPT-4 quality at a fraction of the cost. DeepSeek R1 ($0.55/$2.19) is the reasoning model. Both are open-source and can be self-hosted for near-zero marginal cost at scale. For cost-sensitive production workloads where data privacy allows, DeepSeek often delivers the best price-performance ratio available.