AI Calculator Pro

Context Window Usage Calculator

See what percentage of a model's context window you're using.

Quick answer

With the default inputs, 15.6% of the context window used — 20,000 tokens of 128,000 tokens · 108,000 tokens free. Enter your own numbers below to recompute instantly; the full step-by-step math is shown under the worked example.

Results update automatically as you type.

Result
15.6% of the context window used
20,000 tokens of 128,000 tokens · 108,000 tokens free
Tokens used
20,000 tokens
Context window
128,000 tokens
Used
15.6%
Remaining
108,000 tokens

Enter how many tokens you're sending and pick a model to see how much of its context window you're filling and how much room is left for retrieval, history and output.

How this is calculated

We divide the tokens you're sending by your chosen model's context-window size to show the percentage used and the tokens remaining for retrieval, history and output. The window covers input plus (usually) the generated output, so 100% is a hard ceiling.

Is this a good result? What to do next

Aim to stay comfortably below 100% and leave room for the response. Beyond raw fit, very full contexts can degrade quality ('lost in the middle'), so lower utilization is often better for accuracy, not just safety.

Typical planning ranges

Reserve for output
leave headroom, don't fill to 100%
Quality risk zone
very high utilization can hurt recall
Typical safe target
well under the model's max

Ranges are typical planning figures to sanity-check your result, not authoritative benchmarks. Your numbers will vary with use case, volume, and vendor.

How to improve this number

  • Trim history or retrieve fewer chunks to lower usage.
  • Switch to a larger-context model if you're consistently near the ceiling.

Common mistakes

  • Forgetting output tokens also consume the window.
  • Filling the window and blaming the model for weaker answers.

When to use a different approach

To lay out each component (system, history, RAG, output), use the context window planner. To test a single document, use the 'will it fit' checker.

Worked example (defaults)

With the default inputs above, here is the result:

Result
15.6% of the context window used
20,000 tokens of 128,000 tokens · 108,000 tokens free
Tokens used
20,000 tokens
Context window
128,000 tokens
Used
15.6%
Remaining
108,000 tokens
  • used % = 20,000 tokens / 128,000 tokens

Frequently asked questions

What is a context window?+

The maximum number of tokens (input + output) a model can consider at once. Exceeding it causes errors or truncation.

How full should I let it get?+

Leave headroom for the response. Very full contexts can also degrade quality ('lost in the middle').

Related calculators

Answering a real question?

This calculator powers these problem-solving guides: