Claude Context Cost Calculator
Calculate Anthropic Claude API costs for Claude Sonnet 4 and Claude Haiku 3.5. Both models offer a 200K context window with competitive quality for complex tasks.
LLM Context Cost Calculator
Enter your usage parameters below
Number of tokens in your prompt per request
Number of tokens in the model response
Average number of API calls per day
$2.5/M input · $10/M output · 128k context
Cost Per Request
$0.022
GPT-4o - OpenAI
Daily Cost
$2.25
Monthly Cost
$67.50
Annual Cost
$810.00
Cost Per 1K Tokens
$0.0037
Blended input + output rate
Input vs Output Split
56% / 44%
Input cost vs output cost
Cheapest Alternative
GPT-4.1-nano
$2.70/mo - save 96% ($64.80/mo)
OpenAI · budget
Optimize your LLM spend
Platforms like OpenRouter, Together AI, and Groq offer competitive pricing and unified APIs across multiple models. Fireworks AI and Anyscale specialize in high-throughput inference at lower cost.
Need help optimizing LLM costs?
Digital Signet builds AI-powered systems and provides fractional CTO leadership. 20+ years shipping software.
This costs you ~$810/year
We'll identify the top 3 drivers and give you a 90-day mitigation plan.
Get a Free Exposure Teardown →Or email Oliver directly → [email protected]
Claude Model Pricing
| Model | Input $/1M | Output $/1M | Context | Category |
|---|---|---|---|---|
| Claude Sonnet 4 | $3.00 | $15.00 | 200K | flagship |
| Claude Haiku 3.5 | $0.80 | $4.00 | 200K | fast |
Claude Prompt Caching
Claude's prompt caching charges cache writes at $3.75/1M and cache reads at $0.30/1M - a 90% discount on input tokens. Break-even after ~1.2x reuse. Ideal for long system prompts and repeated document context.
Frequently Asked Questions
How much does the Claude API cost?
Claude Sonnet 4 is priced at $3.00 per 1M input tokens and $15.00 per 1M output tokens. Claude Haiku 3.5 is considerably cheaper at $0.80/1M input and $4.00/1M output. Both models have a 200,000 token context window. For a typical exchange (1,000 input + 500 output tokens), Claude Sonnet 4 costs about $0.0105 per call.
What is Claude's context window size?
All current Claude models support a 200,000 token context window - equivalent to roughly 150,000 words or a full novel. This is larger than GPT-4o's 128K but smaller than GPT-4.1's 1M context. Claude's 200K window is sufficient for most enterprise use cases including long document analysis, large codebase review, and extended multi-turn conversations.
How does Claude compare to GPT-4 on cost?
Claude Sonnet 4 at $3.00/1M input is 20% more expensive than GPT-4.1 ($2.00/1M), with higher output costs ($15 vs $8/1M). Claude Haiku 3.5 at $0.80/$4.00 is more expensive than GPT-4.1-mini ($0.40/$1.60) but often preferred for its stronger instruction following and reduced hallucinations in structured output tasks.
Does Claude support prompt caching?
Yes. Anthropic offers prompt caching for Claude models. Cached input tokens cost $0.30/1M (90% discount vs standard input price). Cache writes cost $3.75/1M. This is highly effective for applications with long static context like system prompts, retrieved documents, or tool definitions that are reused across many API calls.
Compare providers: GPT-4 API costs · Gemini API costs · Full model comparison