Few-Shot Example Builder
Turn input and output pairs into a clean, consistent few-shot prompt block.
See whether your text fits a model context window, and how much room is left.
The Context Window Calculator estimates the tokens in your text, adds the system prompt and a reserve for the answer, and shows whether the total fits the context window of GPT, Claude, Gemini, DeepSeek, Mistral or Llama — and how much room is left.
Every language model has a context window: a hard ceiling on how many tokens it can hold at once, counting your system prompt, the conversation so far, any documents, and the answer it is about to write. Go over it and the request fails or the oldest text is silently dropped.
Paste the text you plan to send and choose a model. The calculator estimates its tokens, adds the system prompt and tool definitions, reserves space for the answer, and shows exactly how the window is spent and how many tokens are left. Set a number of documents to see how many of this size fit together, and a table runs the same total against every model at once — from 16K windows up to a million tokens.
It also warns about the limits that are not the window itself: a model whose maximum answer is shorter than the space you reserved, reasoning models that spend hidden thinking tokens from the same budget, and the drop in recall past about three quarters of a full window.
The same total is checked against every window at once, from 16K to one million tokens.
Output shares the window, so space for the reply is part of the calculation.
Flags when the answer you reserved exceeds the model maximum output length.
See how many documents of this size fit together in one request.
Reminds you that hidden thinking tokens come out of the same budget.
A prompt, a document, a transcript or source code. Tick "This is code" for code.
The window size fills in automatically, or type a custom window.
Tokens for the system prompt and tools, and how much to reserve for the answer.
The bars show how the window is spent, and the table shows every other model.
The maximum number of tokens a model can process in one request, including the input and the output it generates. It is the working memory of that single call.
Yes. Input and output share the window, which is why you need to reserve space for the reply. Each model also has a separate, smaller cap on output length.
It is an estimate, usually within about ten percent for English prose. An exact count needs the model provider tokenizer or token counting endpoint, which differs between model families.
Not always. Filling a large window is slower and more expensive, and models tend to use information in the middle of very long inputs less reliably. Retrieving only the relevant passages often gives better answers.
No. Tokens are estimated in your browser, so confidential documents stay on your device.
What people who use the Context Window Calculator think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the Context Window Calculator. It takes half a minute and no account.
Write the first reviewTurn input and output pairs into a clean, consistent few-shot prompt block.
Split long documents into overlapping chunks for embeddings and RAG.
Remove markdown from ChatGPT and Claude answers and keep clean plain text.
Compare GPT, Claude, Gemini, DeepSeek and Llama by price, context and monthly cost.
Add aspect ratio, stylize, chaos, style references and more to a Midjourney prompt.
Fill a prompt template from spreadsheet rows and get one prompt per row.
Score a prompt on the parts that change the answer, and see what is missing.
Create a persona for a chatbot or roleplay character, as a prompt or a character card.