Claude API Cost Calculator (Sonnet 4, Opus 4 & Haiku 3.5)
Model exact Anthropic token spend across Claude Sonnet 4, Opus 4, and Haiku 3.5 — including Anthropic's industry-leading 90% prompt-cache read discount.
| # | Model & Provider | Context / Speed | Input $/1M (edit) | Output $/1M (edit) | Cached $/1M | 1 Call | 1,000 Calls | 100,000 Calls | vs GPT-4o |
|---|---|---|---|---|---|---|---|---|---|
| 1 | Claude 3.5 HaikuFocus Anthropic·Fast / Budget | 200K ctx 120 tok/s | $0.080 | $0.0026 | $2.65 | $264.70 | -57% | ||
| 2 | Claude Sonnet 4Focus Anthropic·Frontier | 200K ctx 72 tok/s | $0.30 | $0.0099 | $9.93 | $992.62 | +60% | ||
| 3 | Claude 3.7 SonnetFocus Anthropic·Frontier | 200K ctx 75 tok/s | $0.30 | $0.0099 | $9.93 | $992.62 | +60% | ||
| 4 | Claude Opus 4Focus Anthropic·Frontier | 200K ctx 42 tok/s | $1.50 | $0.05 | $49.63 | $4,963.09 | +702% |
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
Claude Sonnet 4 cached input drops from $3.00 to $0.30/1M—making long repo contexts dramatically cheaper.
Anthropic charges 5x more per output token ($15 vs $3 on Sonnet 4), so concise output schemas yield huge savings.
Pairing Claude 3.5 Haiku for routing/extraction with Sonnet 4 for final synthesis protects 80%+ SaaS margins.
Focused Models in This Calculator
Autonomous coding agents, editorial writing, tool use
Hybrid extended thinking & enterprise workflows
Hardest multi-file engineering, legal & research synthesis
Low-latency customer support & prompt-cached sub-agents
Production FinOps Optimization Playbook
Add cache_control Breakpoints on Tool Definitions & Docs
Anthropic requires explicit cache_control markers. Place breakpoints right after your system prompt, tool JSON schemas, and pinned reference docs to unlock 90% read discounts on turns 2–20.
Constrain Verbosity in Agent Loops
Because Sonnet 4 output is $15/1M and Opus 4 output is $75/1M, stripping conversational preamble and requesting terse JSON diffs cuts total Claude bills by 30–45%.
Use Opus 4 Strictly as an Escalation Model
At $15/$75 per 1M tokens, running 100% of SaaS traffic on Opus 4 destroys gross margin on sub-$50/mo plans. Route only failed retries or architectural planning to Opus 4.
Frequently Asked Questions
How much does Claude Sonnet 4 cost per 1,000 API calls?
For a 2,000-input / 500-output token call without caching, Claude Sonnet 4 costs ~$0.0135 per call ($13.50 per 1,000 calls). With 80% prompt cache hits, the same 1,000 calls drop to ~$9.18.
Why does Claude tokenize slightly differently from OpenAI?
Anthropic's tokenizer typically produces ~6–10% more tokens on English prose and source code than OpenAI's o200k_base. TryLLMCost automatically applies a 1.08x tokenizer multiplier to Claude estimates.
When does Anthropic Prompt Caching break even?
Anthropic's 5-minute cache write costs 1.25x base input, while cache reads cost 0.10x. As soon as a cached prefix is reused even once within 5 minutes, you save money—and at 5+ turns you save >70% on input.
Does Anthropic support Batch API discounts?
Yes. Anthropic Message Batches offer a 50% discount on both input and output tokens for asynchronous workloads processed within 24 hours.
Related LLM Cost Calculators
Claude Prompt Caching Cost & Savings Calculator
Open calculator Frontier Head-to-HeadGPT-4o & GPT-4.1 vs Claude Sonnet 4 Cost Comparison
Open calculator Developer Tooling EconomicsCoding Agent Token Burn Calculator (Cursor / Claude Code / Devin Style)
Open calculator OpenAI Pricing CalculatorOpenAI API Cost Calculator (GPT-4.1, GPT-4o, o3 & o4-mini)
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