Feature Comparison
| Item | Value | Planning note |
|---|---|---|
| Context window | 200,000 tokens | Input plus working context must fit before the response. |
| Input price | $3 per 1M tokens | Use for prompts, files, messages, and tool context. |
| Output price | $15 per 1M tokens | Use for generated response tokens. |
| Safe planning reserve | 10% to 20% | Leave room for formatting, tools, and completion. |
| Best fit check | Official token counting API | Use count_tokens for structured prompts before sending. |
Context Window Calculator
Use this formula when planning a long prompt, repo summary, document batch, or tool-heavy request.
usable_context = 200000 - expected_output_tokens - safety_reserve remaining_input = usable_context - system_tokens - message_tokens - tool_tokens
Cost Calculator
For Claude 3.5 Sonnet API pricing, estimate total cost with separate input and output token rates.
input_cost = input_tokens / 1000000 * 3
output_cost = output_tokens / 1000000 * 15
total_cost = input_cost + output_cost
Example:
input_tokens = 80000
output_tokens = 4000
total_cost = 80000 / 1000000 * 3 + 4000 / 1000000 * 15
= $0.30Practical Planning Table
These rough buckets help decide whether to paste content, summarize it, or use retrieval.
- Under 20K tokens: usually safe for direct prompts and a full response.
- 20K to 100K tokens: leave deliberate output room and avoid unnecessary logs.
- 100K to 180K tokens: plan reserves carefully and count tokens before sending.
- Above 180K tokens: summarize, chunk, retrieve, or reduce tool output first.
Official References
Anthropic's Claude 3.5 Sonnet launch post lists the 200K context window and launch pricing. The token counting docs explain how to count structured message tokens before sending.
FAQ
What is the Claude 3.5 Sonnet context window?
Claude 3.5 Sonnet launched with a 200,000 token context window.
Does output count against the context window?
You should reserve context for the expected response. If the input fills the window, the model has too little room to answer.
How much does Claude 3.5 Sonnet cost per token?
The launch pricing was $3 per million input tokens and $15 per million output tokens.
How do I count Claude tokens accurately?
Use Anthropic's token counting endpoint for structured API messages. Character or word-count heuristics are only rough estimates.