Free Tool

Context Window Calculator

Visualize how your context window is distributed across system prompts, chat history, documents, and queries. Plan your prompts before hitting limits.

33 tokens
38 tokens
29 tokens
36 tokens
1,500 tokens

Context Utilization

Total Consumption1,636 / 200,000
Remaining Cushion198,364 tokens
System Prompt
330.0%
Conversation History
380.0%
Pasted Documents / Files
290.0%
Current Query
360.0%
Reserved for Output
1,5000.8%

✓ Safe Allocation

Total tokens occupy a safe fraction of context window. You have ample capacity left.

Why context window planning matters

A 200K context window sounds enormous, but in practice it fills up fast. A moderately-sized codebase, a long conversation history, and a detailed system prompt can push you over the limit before you've even gotten to your actual query.

The calculator breaks down usage into the key components of a typical LLM conversation:

  • System Prompt: Your base instructions and persona
  • Conversation History: Previous messages in the thread
  • Documents / Context: Files, code, or content you've pasted in
  • Current Query: What you're actually asking
  • Reserved for Output: Space you need for the model's response

Context window sizes by model (2026)

  • Claude 3.5 Sonnet: 200,000 tokens
  • GPT-4o: 128,000 tokens
  • Gemini 1.5 Pro: 2,000,000 tokens
  • Llama 3 70B: 128,000 tokens
  • Mistral Large 2: 131,072 tokens

Related tools

Related reading