iWebSeoTool Context Usage Calculator: See how much of an AI model's context window your prompt is already using — enter the window size and the tokens in the system prompt, the history, the retrieved documents and the message.
This context usage calculator shows how much of an AI model’s context window your prompt is already using — the system prompt, the conversation history, the retrieved documents and the current message. Enter your own figures and the context window usage calculator shows the total input tokens, the tokens remaining, the percentage used and the room left for the reply — if the prompt does not fit, it tells you that too.
The conversation history is the honest part of this calculation — it grows with every turn, so a long chat can fill the window by itself while the current message stays small. The figures are a model of your own numbers, not a reading of your provider’s dashboard. Everything runs in your browser.
Tap a star to rate:
Why Use Our Context Usage Calculator?
Every Part Counted
The system prompt, the history, the retrieved documents and the message are added separately, so the biggest part is visible.
Room for the Reply
The tokens reserved for the answer are kept aside, so the reply is never squeezed out.
Over the Limit, Spotted Early
A prompt that does not fit is flagged before it is sent, not after the provider refuses it.
Free, With No Limits
Check every prompt, conversation and retrieval on your list, with no signup and no premium tier.
Common Use Cases for Context Usage Calculator
Long Conversations
Check how much of the window a long chat history is already using.
RAG Prompts
See whether the retrieved documents leave room for the question.
Agent Runs
Check an agent’s working context before a long multi-step run.
Cost Checks
Watch the input tokens per call, since longer prompts cost more.
Window Comparisons
Compare what the same prompt uses on models with different windows.
Prompt Debugging
Find which part of a prompt is eating the window when a call fails.
Understanding Context Usage
What is Context Usage?
Context usage is how much of an AI model’s context window — the most text it can read in one request, measured in tokens — your prompt already takes up. The total input tokens are the system prompt plus the conversation history plus the retrieved documents plus the current message, and the usage percentage is that total divided by the window size. The tokens remaining are the window minus the total, and the room left for the reply is what is left after the tokens reserved for the answer.
How Our Context Usage Calculator Works
- Enter the window: Add the context window in tokens — 8,000, 32,000, 128,000 or whatever your model offers.
- Add the parts of the prompt: Enter the tokens in the system prompt, the conversation history, the retrieved documents and the current message, plus the tokens to reserve for the reply.
- Read the usage: See the total input tokens, the tokens remaining, the percentage of the window used, the room left for the reply and whether the prompt fits — then trim the biggest part if it does not.
Where Context Usage Goes Wrong
- Counting only the message: The current question is usually the smallest part — the history and the retrieved documents are what fill the window.
- Forgetting the reply: A window filled to the brim leaves nothing for the answer, so the reply is cut short.
- Trusting the token estimate: Token counts from a rough character rule can be off by a wide margin on code or other languages.
- Letting history grow unchecked: A long conversation fills the window by itself, and the oldest turns are the first to be dropped.
Privacy, Accuracy & Availability
Your figures are calculated in your browser and are never uploaded or stored. The calculator is a model of the numbers you enter — it cannot read your provider’s dashboard, and no call outcome is guaranteed. It is free, with no account and no usage limits.
Related tools
- Character to Token Calculator — turn characters into tokens before sending text to a model.
- Chunk Count Calculator — work out how many chunks a document splits into.
- AI Chatbot ROI Calculator — work out the return on a customer-support chatbot.
- AI Customer Support Savings Calculator — price what AI could save on support tickets.
Frequently asked questions
Add the tokens in the system prompt, the conversation history, the retrieved documents and the current message. 500 plus 12,000 plus 25,000 plus 800 is 38,300 tokens, which is 29.92% of a 128,000-token window, leaving 89,700 tokens — and 85,700 of those once 4,000 are reserved for the reply.
Everything the model reads before it answers: the system instructions, the conversation history, the retrieved passages and the current message. Only the answer itself is not counted as input.
It depends on the provider — most refuse the call with an error, and some silently drop the oldest history so the call goes through with less context than you expected. Either way, the answer suffers, so check the usage before sending.
Enough for the longest answer you expect — a few hundred tokens for a short answer, a few thousand for a long one. Reserving too little truncates the answer; reserving too much wastes room the prompt could use.
Every turn adds the question and the answer to the history, so a long conversation can fill the window by itself. Summarising the older turns or trimming them is the usual fix when the usage creeps up.
Yes — every passage retrieved for the model is input tokens, and a large retrieval can be the biggest part of the prompt. If the usage is high, fewer or shorter retrieved passages is often the quickest saving.
No. The calculator runs entirely in your browser; the figures you enter are never uploaded or stored.