See what percentage of a model's context window your conversation is using, how many tokens remain, and how many more turns you can fit before it fills up.
Enter your details and click Calculate to see results
A context window calculator answers a question raw token-cost tools don't: not "how much does this conversation cost," but "how much room is left before the model simply can't read any more." This context window usage calculator takes your tokens already used, tokens reserved for the next reply, and how fast a conversation typically grows per turn, and turns them into a percent-used figure, a tokens-remaining count, and a projected number of turns before the window fills — across GPT-4o, GPT-4.1, o1, Claude, Gemini, DeepSeek, and Llama.
Every large language model has a hard architectural ceiling on how many tokens it can read and write in a single request, called its context window. As a conversation grows — more turns, more retrieved documents, more tool output pasted back in — that fixed budget fills up, and once you hit the limit the next request doesn't degrade gracefully, it simply fails. This calculator adds your tokens-used and tokens-reserved figures together, compares the total against the selected model's published context window, and projects how many more turns you have left at your current growth rate, so "will this conversation fit" stops being a guess you find out the hard way.
It's built for developers building chatbots, coding assistants, or agentic loops that need to survive long sessions without a mid-conversation failure; product teams sizing how long a support or onboarding conversation can realistically run on a given model; RAG pipeline engineers budgeting how much retrieved-document space is left after system prompt and history; and anyone comparing GPT-4o's 128K context window against Gemini 1.5 Pro's 2M-token ceiling before picking a model for a long-document or long-conversation use case.
Long-running chat sessions, agentic loops that re-read tool output every step, and RAG pipelines that stuff retrieved documents into the prompt are the most common ways production applications quietly run out of context window. Catching this ahead of time — instead of discovering it through a failed API call in front of a user — lets you build in mitigations proactively: summarizing older history, trimming retrieved context to only what's relevant, or switching a long-lived session to a model with a larger window before it becomes a problem. This mirrors how teams already plan capacity with tools like the VRAM Requirement Calculator before deploying a model, rather than discovering a hardware shortfall in production.
How this context window calculator turns raw token counts into a percent-used and turns-remaining projection
Context Window Size is the selected model's published token ceiling (128K to 2M in this calculator's model list). If Total Committed Tokens exceeds the Context Window Size, Tokens Remaining is shown as 0 and a warning banner appears, since that combination would fail on a real API call.
System prompt, the full conversation history resent every turn, attached documents, tool/function-call outputs, and the current user message all count toward tokens already used — not just the latest message.
Ranges from 128K tokens (GPT-4o, DeepSeek V3, Llama 3 70B) to 2M tokens (Gemini 1.5 Pro) in this calculator's model list — a fixed architectural limit, not something a setting can raise.
This calculator's warning banner signals over-capacity, but real APIs don't quietly truncate — they reject the request outright, so treat "0 tokens remaining" as an action item, not a soft ceiling.
From picking a model to reading how many turns you have left
Select the model your conversation is running on from GPT-4o, GPT-4.1, o1, Claude Sonnet 4.6, Claude Opus 4.8, Gemini 1.5 Pro, Gemini 1.5 Flash, DeepSeek V3, or Llama 3 70B — each option loads that model's published context window size.
Add up the system prompt, full visible conversation history, and any attached documents or tool output sent so far, and enter that figure as tokens already used.
Enter the max_tokens or max_output_tokens value you've set for the model's next reply, since most APIs count the reservation against the context window whether or not the model uses all of it.
Estimate how much the conversation typically grows — user message plus reply — each turn, so the calculator can project how many turns remain.
See percent of context used, tokens remaining, context window size, tokens used plus reserved, and additional turns until full, alongside a doughnut chart of used versus free tokens.
If tokens already used plus reserved output exceeds the model's context window, a warning banner appears — treat it as a signal to trim history, summarize, or switch to a larger-context model before your next real request.
Using the calculator's own default scenario — Claude Sonnet 4.6, 20,000 tokens used, 2,000 reserved, 1,500 per turn
Suppose you're partway into a conversation on Claude Sonnet 4.6 (1,000,000-token context window). The system prompt, history, and any documents sent so far total 20,000 tokens, you've reserved 2,000 tokens for the next reply, and this conversation typically grows by about 1,500 tokens per turn.
Explanation: At these defaults, the conversation has barely touched Claude Sonnet 4.6's million-token window — only 2.2% committed, with 652 turns of runway left at the current growth rate. Contrast that with the same 20,000 used + 2,000 reserved tokens on GPT-4o's 128K window instead: that would already be 17.2% used. Swap in a heavier scenario — say 100,000 tokens used and 4,000 reserved on GPT-4o (128K context) at 2,000 tokens/turn — and usage jumps to 81.3%, with only 24,000 tokens and 12 turns remaining, which is exactly the point where a warning banner and a mitigation plan become useful rather than optional.
What your percent-of-context-used figure generally implies
| % of Context Used | What It Generally Means | Recommended Next Step |
|---|---|---|
| 0% – 25% | Plenty of headroom for a long conversation | Continue normally; no action needed yet |
| 25% – 50% | Comfortable, but history is accumulating | Note your growth rate; no changes required |
| 50% – 75% | Getting full — worth planning ahead | Start deciding how you'll summarize or trim later |
| 75% – 90% | Nearing the limit | Actively summarize older turns or trim retrieved context now |
| 90% – 100% | Critical — very little runway left | Summarize immediately or switch to a larger-context model |
| Over 100% | Over capacity | The next request will fail; reduce tokens or switch models now |
If your percent used is low but climbing fast: look at your average tokens added per turn rather than the current snapshot — a conversation growing by several thousand tokens per turn can go from comfortable to critical in a handful of exchanges, especially once documents or tool output get pasted in.
If turns remaining looks small even on a large-context model: that usually means your average tokens per turn is unusually high, often from long tool outputs or large retrieved chunks — reducing that per-turn growth rate helps more than switching to an even bigger context window.
These figures are projections based on the growth rate and totals you supply, not a live read of an actual conversation. Recalculate periodically as the conversation evolves rather than relying on a single early estimate.
This calculator provides planning estimates only. Actual context window enforcement, exact token counts, and any provider-side formatting overhead depend on the live API you're calling. Always verify against your provider's own token counting endpoint before assuming a request will fit.
Where checking context window usage up front genuinely helps
Check whether a long report or book chapter, plus your system prompt, will fit in one request before you send it.
Project how many more exchanges a support or companion chatbot session can sustain before it needs summarization.
See how much room is left for retrieved passages after your system prompt and conversation history are accounted for.
Catch a conversation approaching its context ceiling before users encounter a failed request in a live app.
Track context growth in agent loops that re-read tool output every step, since those loops fill windows unusually fast.
Estimate whether a large diff or multiple files pasted for review will fit alongside your review instructions.
Check whether a lengthy contract or filing fits in a single pass, or needs to be chunked across multiple requests.
Plan how much call or chat transcript history an analysis prompt can include before hitting the model's ceiling.
Budget context for drafting a book, report, or multi-section document where earlier sections must stay in context.
Compare how much extra runway a move from a 128K-context model to a 1M or 2M-context model would actually buy you.
Decide when to trigger summarization or a sliding window based on a concrete turns-remaining projection, not guesswork.
Use it in a course or onboarding doc to make context window limits concrete for engineers new to LLM application design.
What this context window calculator does well, and where it can't replace a live API check
Published context window sizes across major model families
| Model | Provider | Context Window | In This Calculator |
|---|---|---|---|
| GPT-4o | OpenAI | 128K | Yes |
| GPT-4.1 | OpenAI | 1M | Yes |
| o1 | OpenAI | 200K | Yes |
| o3-mini | OpenAI | 200K | No |
| Claude Sonnet 4.6 | Anthropic | 1M | Yes |
| Claude Opus 4.8 | Anthropic | 1M | Yes |
| Claude Fable 5 | Anthropic | 1M | No |
| Claude Haiku 4.5 | Anthropic | 200K | No |
| Gemini 1.5 Pro | 2M | Yes | |
| Gemini 1.5 Flash | 1M | Yes | |
| DeepSeek V3 | DeepSeek | 128K | Yes |
| DeepSeek R1 | DeepSeek | 64K | No |
| Mistral Large | Mistral | 128K | No |
| Llama 3 70B (self-hosted) | Meta | 128K | Yes |
Summary: This context window calculator gives you an instant, free way to check how much of a model's context window your conversation has used, how many tokens remain, and how many more turns you can add before it fills up — across 9 models from OpenAI, Anthropic, Google, DeepSeek, and Meta. Pair it with the Prompt Cost Estimator and Inference Latency Calculator for a fuller picture of how a long conversation behaves in production.
Common questions about context window limits
Official documentation to complement this calculator — always verify live context window limits before finalizing a design
Explore other AI & tech tools