Claude Token Limits

Claude models from Anthropic have three types of token limits: context window (how much text you can send), output limit (how much the model can generate), and plan limits (usage caps based on your subscription). Understanding all three is essential for building with Claude.

As of November 2026, Claude 5.5 Opus, Sonnet, and Haiku all support 200,000-token context windows—enough for entire codebases, long documents, or hours of conversation history. Output is capped at 8,192 tokens per response for most models.

Claude's tokenizer is less efficient than OpenAI's, producing about 50% more tokens for English text and 70% more for code. This means a "200K context window" holds less actual content than GPT-4o's 128K window.

Calculate Claude Costs

Claude Context Window Limits

The context window is the total number of tokens Claude can process in a single request, including both your input and the model's output.

Claude context window limits (November 2026)
Model Context Window Notes
Claude 5.5 Opus 200,000 tokens Largest context, best for complex reasoning
Claude 5.5 Sonnet 200,000 tokens Most popular, balanced performance
Claude 5.5 Haiku 200,000 tokens Fastest, cheapest, same context size
Claude 4.7 Opus 200,000 tokens Previous generation, still available
Claude 4.7 Sonnet 200,000 tokens Legacy model

What 200K Tokens Holds

Due to Claude's tokenizer inefficiency, 200K tokens is approximately:

  • 130,000–140,000 words of English prose (vs ~150K words in GPT-4o's 128K window)
  • ~300 pages of standard documents
  • ~40,000–50,000 lines of Python code
  • One full-length novel plus extensive instructions
  • ~500 emails averaging 250 tokens each

Remember: the context window includes your prompt and the model's response. If you send 195K tokens, the model can only generate 5K tokens before hitting the limit.

Claude Output Token Limits

Claude models have separate limits on how many tokens they can generate in a single response:

Claude output limits by model
Model Max Output Use Case
Claude 5.5 Opus 8,192 tokens Long-form content, detailed analysis
Claude 5.5 Sonnet 8,192 tokens General-purpose, balanced tasks
Claude 5.5 Haiku 8,192 tokens Short responses, classifications

8,192 tokens is approximately:

  • 5,000–6,000 words (due to Claude's tokenizer)
  • ~12 pages of text
  • ~1,500 lines of code

If you need longer outputs, you must chain multiple requests or use prompt engineering to get Claude to continue generating from where it left off.

Handling Output Limit Errors

When Claude hits the output limit mid-generation, you'll receive:

  • HTTP 200 response (not an error)
  • "stop_reason": "max_tokens" in the response
  • A potentially incomplete response (ends mid-sentence)

To handle this, check stop_reason and if it's "max_tokens", send a continuation prompt like "Please continue from where you left off."

Claude Pricing Tiers and Long-Context Costs

Claude 5.5 Haiku has tiered pricing that increases for long-context requests:

Claude 5.5 Haiku pricing tiers (per million tokens)
Total Request Size Input Price Output Price
0–100K tokens $0.80 $4.00
100K+ tokens $4.00 $20.00

Critical detail: The tier applies to the entire request, not just tokens above 100K. If you send 101K input tokens, you pay $4.00/M for all 101K tokens, not $0.80/M for the first 100K and $4.00/M for the remaining 1K.

This creates a pricing cliff at 100K tokens. A 99K-token request costs ~$79.20 for input, but a 101K-token request costs ~$404.00—a 5× jump for 2% more content.

Opus and Sonnet Pricing

Claude 5.5 Opus and Sonnet do not have tiered pricing. They charge flat rates regardless of context length:

  • Sonnet: $3.00 input / $15.00 output per million tokens
  • Opus: $4.00 input / $20.00 output per million tokens

Claude Plan Token Limits (claude.ai vs API)

Anthropic's consumer plans (claude.ai web app) have usage limits that are separate from technical limits:

Claude.ai plan limits (as of November 2026)
Plan Monthly Cost Usage Limits
Free $0 Limited messages per day, Claude 5.5 Sonnet only
Pro $20/month 5× more usage than Free, priority access, all models
Team $30/user/month Higher limits, collaboration features, admin controls

These limits are intentionally vague ("limited messages"). In practice, Free users report 30–50 messages per day, Pro users report 500+ messages per day, depending on message length.

API Usage Is Different

If you use Claude via the Anthropic API, you have:

  • No daily message limits—only pay-as-you-go token pricing
  • Rate limits based on your tier (Tier 1: 50K tokens/min, Tier 4: 4M tokens/min)
  • No monthly subscription—you're billed per token consumed
  • Access to all models including Haiku, Sonnet, and Opus

For high-volume use, the API is almost always more cost-effective than Pro subscriptions.

Frequently Asked Questions

Can I increase Claude's output limit beyond 8,192 tokens?

No. The 8,192-token output limit is a hard constraint across all Claude models. To generate longer outputs, you must send multiple requests and use continuation prompts.

Does Claude charge for tokens over the context limit?

No. If you exceed 200K tokens, the API returns an error (HTTP 400) and you're not charged. You must reduce your input to fit within the limit.

How do I calculate my total request size?

Add input tokens + expected output tokens. If you send 195K input and set max_tokens=8192, your total potential size is 203K—which exceeds the limit. You'd need to reduce max_tokens to 5000.

Is prompt caching included in context window limits?

Yes. Cached content counts toward the 200K limit. However, cached tokens are billed at ~10% of normal input pricing, making long-context requests much cheaper when reusing content.

Why does Claude count more tokens than ChatGPT for the same text?

Claude uses a different tokenizer optimized for different training data. English text typically produces ~50% more tokens on Claude than GPT-4o. This is a fundamental difference; you cannot change it.

Do images count toward the token limit?

Yes. Claude Vision models convert images into tokens. A high-resolution image can consume 1,500–4,000 tokens depending on size and detail. Factor this into your 200K budget.