GPT-4o & GPT-4.1 vs Claude Sonnet 4 Cost Comparison
See the exact crossover point where Claude Sonnet 4's 90% prompt-cache discount beats GPT-4o — and when GPT-4.1 wins on output-heavy generation.
| # | Model & Provider | Context / Speed | Input $/1M (edit) | Output $/1M (edit) | Cached $/1M | 1 Call | 1,000 Calls | 100,000 Calls | vs GPT-4o |
|---|---|---|---|---|---|---|---|---|---|
| 1 | Llama 3.1 8B Instant (Groq) Meta (Groq)·Fast / Budget | 128K ctx 560 tok/s | N/A | $0.000049 | $0.05 | $4.94 | -99% | ||
| 2 | Gemini 2.0 Flash-Lite Google·Fast / Budget | 1.0M ctx 210 tok/s | $0.019 | $0.0002 | $0.17 | $16.96 | -97% | ||
| 3 | Mistral Small 3.1 Mistral·Fast / Budget | 128K ctx 150 tok/s | N/A | $0.0002 | $0.18 | $18.50 | -97% | ||
| 4 | Llama 4 Scout 17B (Groq) Meta (Groq)·Fast / Budget | 131K ctx 460 tok/s | N/A | $0.0002 | $0.20 | $19.98 | -96% | ||
| 5 | GPT-4.1 nano OpenAI·Fast / Budget | 1.0M ctx 170 tok/s | $0.025 | $0.0002 | $0.22 | $21.96 | -96% | ||
| 6 | Grok 3 Mini xAI·Reasoning | 131K ctx 155 tok/s | $0.075 | $0.0003 | $0.29 | $28.66 | -95% | ||
| 7 | GPT-4o mini OpenAI·Fast / Budget | 128K ctx 135 tok/s | $0.075 | $0.0003 | $0.33 | $33.14 | -94% | ||
| 8 | Gemini 2.5 Flash Google·Balanced | 1.0M ctx 165 tok/s | $0.037 | $0.0003 | $0.34 | $33.92 | -94% | ||
| 9 | Llama 3.3 70B (Groq) Meta (Groq)·Balanced | 128K ctx 280 tok/s | N/A | $0.0005 | $0.50 | $49.51 | -91% | ||
| 10 | Llama 4 Maverick (Together) Meta (Together)·Balanced | 1M ctx 140 tok/s | N/A | $0.0005 | $0.50 | $49.90 | -91% | ||
| 11 | DeepSeek V3 (Chat) DeepSeek·Balanced | 128K ctx 68 tok/s | $0.070 | $0.0006 | $0.62 | $61.62 | -89% | ||
| 12 | GPT-4.1 mini OpenAI·Fast / Budget | 1.0M ctx 115 tok/s | $0.10 | $0.0009 | $0.88 | $87.84 | -84% | ||
| 13 | DeepSeek R1 DeepSeek·Reasoning | 128K ctx 54 tok/s | $0.14 | $0.0012 | $1.23 | $122.72 | -78% | ||
| 14 | Amazon Nova Pro (Bedrock) Amazon·Balanced | 300K ctx 98 tok/s | $0.20 | $0.0018 | $1.83 | $182.84 | -67% | ||
| 15 | Claude 3.5 Haiku Anthropic·Fast / Budget | 200K ctx 120 tok/s | $0.080 | $0.0024 | $2.36 | $235.63 | -57% | ||
| 16 | OpenAI o4-mini OpenAI·Reasoning | 200K ctx 95 tok/s | $0.28 | $0.0024 | $2.42 | $241.57 | -56% | ||
| 17 | Mistral Large 2 Mistral·Frontier | 128K ctx 65 tok/s | N/A | $0.0037 | $3.70 | $370.00 | -33% | ||
| 18 | GPT-4.1Focus OpenAI·Frontier | 1.0M ctx 78 tok/s | $0.50 | $0.0044 | $4.39 | $439.22 | -20% | ||
| 19 | OpenAI o3 OpenAI·Reasoning | 200K ctx 52 tok/s | $0.50 | $0.0044 | $4.39 | $439.22 | -20% | ||
| 20 | GPT-4oFocus OpenAI·Frontier | 128K ctx 85 tok/s | $1.25 | $0.0055 | $5.52 | $552.35 | Baseline | ||
| 21 | Gemini 2.5 Pro Google·Reasoning | 1.0M ctx 88 tok/s | $0.31 | $0.0056 | $5.61 | $560.63 | +1% | ||
| 22 | Grok 3 xAI·Frontier | 131K ctx 74 tok/s | $0.75 | $0.0084 | $8.38 | $837.62 | +52% | ||
| 23 | Claude Sonnet 4Focus Anthropic·Frontier | 200K ctx 72 tok/s | $0.30 | $0.0088 | $8.84 | $883.60 | +60% | ||
| 24 | Claude 3.7 SonnetFocus Anthropic·Frontier | 200K ctx 75 tok/s | $0.30 | $0.0088 | $8.84 | $883.60 | +60% | ||
| 25 | Claude Opus 4 Anthropic·Frontier | 200K ctx 42 tok/s | $1.50 | $0.04 | $44.18 | $4,418.01 | +700% |
Tip: Click any Input or Output $/1M cell to test custom enterprise discounts, Bedrock/Vertex tiers, or Gemini 2.5 Pro >200k long-context rates inline.
Key Cost Benchmarks & Pricing Dynamics
GPT-4.1 ($2/$8) and GPT-4o ($2.50/$10) beat Claude Sonnet 4 ($3/$15) on uncached output-heavy tasks.
With 80%+ cache hits on long system prompts (>15k tokens), Claude's $0.30/1M cached input undercuts GPT-4o ($1.25/1M) by 76%.
OpenAI's o200k_base tokenizer emits ~8% fewer tokens on average than Claude's tokenizer on identical English/code text.
Focused Models in This Calculator
Multimodal chat, vision + text assistants
Coding, 1M-context RAG, instruction following
Autonomous coding agents, editorial writing, tool use
Hybrid extended thinking & enterprise workflows
Production FinOps Optimization Playbook
Use Claude Sonnet 4 for Long-Context, Short-Output Agents
When your ratio is 15:1 input-to-output with >75% prompt caching (like coding diffs or Q&A over large docs), Claude Sonnet 4's $0.30 cached input narrows or reverses the price gap.
Use GPT-4.1 for Long-Form Content Generation
When output tokens dominate (blog drafts, multi-page reports, full-file rewrites), GPT-4.1's $8/1M output is nearly 2x cheaper than Claude Sonnet 4's $15/1M.
Simulate Hybrid Routing in Tab 2
Switch to the AI Agent & SaaS Gross Margin Simulator tab to see how routing 80% of requests to GPT-4.1 mini and 20% to Claude Sonnet 4 preserves both quality and 85%+ margins.
Frequently Asked Questions
Is Claude Sonnet 4 more expensive than GPT-4o?
On list rates without caching, Claude Sonnet 4 ($3/$15 per 1M) is 20% higher on input and 50% higher on output than GPT-4o ($2.50/$10). However, with high prompt caching on input-heavy prompts, Claude can be cheaper.
How does GPT-4.1 compare to Claude Sonnet 4 for coding agents?
GPT-4.1 ($2/$8, $0.50 cached) is roughly 35%–45% cheaper per token than Claude Sonnet 4 ($3/$15, $0.30 cached), though many teams still route complex multi-file edits to Sonnet 4 when fewer retries offset the higher per-token price.
What input-to-output ratio favors Claude Sonnet 4 caching?
Once input tokens exceed output tokens by 10x or more and your prompt cache hit rate is above 75%, Claude Sonnet 4's $0.30/1M cached rate often beats GPT-4o's $1.25/1M cached rate.
Do both OpenAI and Anthropic support 50% Batch discounts?
Yes—both OpenAI Batch API and Anthropic Message Batches discount standard input and output prices by 50% for 24-hour async jobs.
Related LLM Cost Calculators
OpenAI API Cost Calculator (GPT-4.1, GPT-4o, o3 & o4-mini)
Open calculator Anthropic Claude PricingClaude API Cost Calculator (Sonnet 4, Opus 4 & Haiku 3.5)
Open calculator Anthropic 90% Cache SavingsClaude Prompt Caching Cost & Savings Calculator
Open calculator Developer Tooling EconomicsCoding Agent Token Burn Calculator (Cursor / Claude Code / Devin Style)
Open calculatorFree Forever Calculator. Upgrade When Spend Scales.
Model 25 LLMs with zero login today. Upgrade to Pro or Team for automated API price-drop alerts, saved CFO scenarios, and live usage overrun guards.
Free
No SignupEverything you need for architecture sizing, prompt tokenization, and SaaS margin checks.
- Unlimited comparisons across 25+ models
- Live client-side prompt token counter (EN/Code/CJK)
- Prompt caching (0–90%) & Batch API 50% toggles
- AI Agent & SaaS Gross Margin Simulator
- 80/20 Model Routing Optimizer + inline rate edits
- Unlimited CSV financial exports
Pro
Founders & PMsNever get blindsided by provider price changes or margin erosion across investor reviews.
- Everything in Free, plus cloud-saved scenarios
- Compare multiple multi-agent architecture versions
- Weekly API price-drop & new-model email alerts
- 1-click branded CFO / Board Deck PDF export
- Custom enterprise discount profiles (AWS/Vertex/OpenAI)
- Historical token price tracker & depreciation notices
Team
Live GuardrailsConnect real production token telemetry and catch runaway agent loops before the bill lands.
- Everything in Pro for up to 10 team seats
- Zero-latency live usage telemetry proxy endpoint
- Real-time Slack & webhook budget overrun alerts
- Per-customer / per-tenant gross margin leaderboard
- Automatic anomaly detection on infinite agent loops
- Scheduled weekly FinOps digest to #ai-infra