Change language

Artificial intelligence

AI model context window calculator

Check whether your text fits in the context window of Claude, GPT or Gemini and how much of it you use, answer included.

Published by SolucionesAhora.com Data updated 2026-10-07 How we verify

Calculator inputs

  1. Enter your figures, or press “See example” to watch it work.
  2. If your case is unusual, open “Advanced options”.
  3. Read the result and, below it, what it means and how it was worked out.

The model whose context window you want to check. The results table always compares all the models on the list, from largest to smallest window.

Everything you put in the request: instructions, documents, conversation history and tool definitions. If you do not know the tokens, pick another unit below.

Prompt, documents and history

In tokens it is exact. In words, characters or pages it is an approximate conversion based on English (1 token ≈ 0.75 words ≈ 4 characters; a page is 500 words). In other languages there are usually more tokens per word, so leave a margin.

The answer takes room in the same window. If the model “thinks” before answering, those tokens count too: add them.

Includes reasoning

See the result

Results

Model context window (tokens)1,000,000
Share of the window you use15.4 %
Total tokens (input + answer)154,000
Free tokens846,000
Free words (approx.)634,500
Free pages (approx.)1,269
Models on the list where it fits26
All models
ProviderModelWindow (tokens)Window used (%)FitsFree tokens
OpenAIGPT-6 Astra1,050,00014.7Yes896,000
OpenAIGPT-6.1 Sol1,050,00014.7Yes896,000
OpenAIGPT-6 Luna1,050,00014.7Yes896,000
OpenAIGPT-5.51,050,00014.7Yes896,000
OpenAIGPT-5.41,050,00014.7Yes896,000
GoogleGemini 3.8 Flash1,048,57614.7Yes894,576
GoogleGemini 3.5 Flash1,048,57614.7Yes894,576
GoogleGemini 3.5 Flash-Lite1,048,57614.7Yes894,576
GoogleGemini 3.1 Flash-Lite1,048,57614.7Yes894,576
GoogleGemini 3.1 Pro1,048,57614.7Yes894,576
GoogleGemini 2.5 Pro1,048,57614.7Yes894,576
GoogleGemini 2.5 Flash1,048,57614.7Yes894,576
GoogleGemini 2.5 Flash-Lite1,048,57614.7Yes894,576
OpenAIGPT-4.11,047,57614.7Yes893,576
AnthropicClaude Fable 5.11,000,00015.4Yes846,000
AnthropicClaude Opus 5.51,000,00015.4Yes846,000
AnthropicClaude Opus 51,000,00015.4Yes846,000
AnthropicClaude Sonnet 5.51,000,00015.4Yes846,000
AnthropicClaude Sonnet 4.61,000,00015.4Yes846,000
AnthropicClaude Haiku 5.51,000,00015.4Yes846,000
OpenAIGPT-5.4 mini400,00038.5Yes246,000
OpenAIGPT-5.4 nano400,00038.5Yes246,000
OpenAIGPT-5 mini400,00038.5Yes246,000
OpenAIGPT-5 nano400,00038.5Yes246,000
AnthropicClaude Haiku 4.5200,00077Yes46,000
OpenAIo3200,00077Yes46,000
OpenAIGPT-4o mini128,000120.3No-26,000
See the working step by step
  1. Claude Sonnet 5.5 (Anthropic) window: 1,000,000 tokens

Data updated 2026-10-07 · Indicative result: it does not replace professional advice

In short

What it calculates
Check whether your text fits in the context window of Claude, GPT or Gemini and how much of it you use, answer included.
Formula used
Total tokens = input (in tokens) + expected answer (with reasoning)
Example
Example 1. A long report in a 1-million model.

AI context window calculator

Every language model has a context window: the maximum number of tokens it can handle at once. Everything goes in it: your instructions, the documents you attach, the conversation history, tools and also the model’s answer (with its reasoning, if it does any). Go over and the request fails or the model cuts off.

Enter how much you send (in tokens, words, characters or pages) and how much answer you expect, pick a model and you see how much of its window you use, how much is left and in how many models on the list it fits. The data carries a review date. Everything runs in your browser.

How it works

What you send is converted to tokens (if you do not give tokens, using the approximate English equivalence: 1 token ≈ 0.75 words ≈ 4 characters), the expected answer is added and the total is divided by the model’s window. If the total is below the window, it fits; the difference is the free tokens, which are turned into approximate words and pages.

Each model’s data (window and maximum output) lives in a file with its review date and official sources.

Formula

Total tokens = input (in tokens) + expected answer (with reasoning)
Window used = total tokens ÷ model window
It fits if total tokens ≤ window
Approximate equivalences (English): 1 token ≈ 0.75 words ≈ 4 characters; 1 page ≈ 500 words

Worked example

Example 1. A long report in a 1-million model.
150,000 tokens of documents and 4,000 of answer in Claude Sonnet 5.5 (1,000,000 window): 154,000 tokens, 15.4% of the window, with 846,000 tokens free. It fits in 26 of the 27 models on the list (only GPT-4o mini, at 128,000, is left out).

Example 2. A 200,000 model.
A 250,000-token prompt in Claude Haiku 4.5 (200,000) takes 127% (over by 54,000 tokens counting the 4,000 of answer): it does not fit. You would need to trim it or use a model with a larger window.

Example 3. In words.
A 300,000-word manuscript is about 400,000 tokens; with 4,000 of answer it totals 404,000: in GPT-5.4 mini (400,000) it is over by 4,000 tokens.

Example 4. A 400-page book.
400 pages of 500 words is 200,000 words, about 266,667 tokens. With 8,000 of answer, 274,667: in GPT-4o mini (128,000) it takes 214.6%; it fits in 24 of the 27 models.

Explanation

What the context window is

It is the model’s “working memory”: the total tokens it can consider when generating an answer. It includes everything in the request (system instructions, messages, documents, tool results, images) and also what the model generates, reasoning included. It is not the same as the data it was trained on.

Context window versus maximum output

They are two different limits: the window limits the sum of input and output; the maximum output limits how much the model can write in a single answer. A model with a 1-million window may have, say, a 128,000-token maximum output.

More context is not always better

As the token count grows, the model’s accuracy and recall degrade: Anthropic calls this “context rot”. Send what is needed and do not fill the window for its own sake; techniques such as summarising, trimming old results or retrieving only the relevant fragments help.

How to estimate tokens

The most reliable way is the provider’s token counter. As a rough guide, in English a token is about 0.75 words (about 4 characters); in other languages there are more tokens per word. Each provider tokenizes differently: the same text gives different figures depending on the model, and Claude 4.7 and later produce about 30% more tokens than earlier ones for the same text.

Common mistakes

  • Forgetting that the answer and reasoning also take up the window.
  • Trusting the words-to-tokens conversion in languages other than English.
  • Filling the window to the brim: leave a margin.
  • Comparing windows without comparing maximum output.
  • Treating limits as fixed: they change with each model.

Limits of this calculator

  • The data are those of the standard API at the review date; they do not include extended contexts in beta or by contract, nor the limits of chat apps or usage tiers.
  • There is no maximum-output figure for Claude Haiku 4.5 in the source consulted.
  • The OpenAI and Google figures were taken from their pages with a tool that summarises the content: check them on the official page.
  • The conversion of words, characters and pages to tokens is approximate and based on English.
  • It does not count images, audio or tools, which also use tokens.

Notice

This is an estimate. Count tokens with the provider’s tool before fitting a case right to the limit.

Frequently asked questions

What is the context window?

The maximum number of tokens a model can handle at once, adding what you send (instructions, documents, history) and what it answers, reasoning included.

What happens if I exceed the window?

The API usually returns a “prompt too long” error, or the model cuts off its answer when it hits the limit. You need to trim the content or use a model with a larger window.

How many words fit in a million tokens?

About 750,000 English words using 0.75 words per token. With Claude’s newest tokenizers, Anthropic gives about 555,000 words.

Is the context window the same as maximum output?

No. The window limits the sum of input and output; maximum output limits what the model can write in a single answer.

Should I fill the whole window?

Not necessarily: with very long contexts the model recalls and answers less well. Send only what is needed.

How do I count the tokens in my text?

With the provider’s token counter, which gives the exact figure for its model. The word conversion is only a guide.

Why does my text in another language use more tokens than I expected?

Because in languages other than English there are usually more tokens per word (accents, long words, morphology). Leave a margin.

Is my data sent to a server?

No. The calculation runs in your browser.

Sources and references

The formula behind this calculator is not ours. These are the sources it comes from, in APA 7 format, in case you want to go to the original or cite them in your own work.

  1. Anthropic. (2026). Context windows. Claude Developer Platform. Consultado el 7 de octubre de 2026, de https://platform.claude.com/docs/en/build-with-claude/context-windows https://platform.claude.com/docs/en/build-with-claude/context-windows What counts toward the window (input, answer and reasoning), sizes by model and the degradation of recall in long contexts.
  2. OpenAI. (2026). Models. Consultado el 7 de octubre de 2026, de https://developers.openai.com/api/docs/models https://developers.openai.com/api/docs/models Context window and maximum output of each OpenAI model.
  3. Google. (2026). Gemini models. Gemini API. Consultado el 7 de octubre de 2026, de https://ai.google.dev/gemini-api/docs/models https://ai.google.dev/gemini-api/docs/models Input and output token limits of each Gemini model.

Need to calculate something else?

These tools are often used alongside this calculator.

Token cost

What each request to a language model costs and the monthly bill, with prompt caching, reasoning tokens and…

AI cost comparison

What your API usage costs with each Anthropic, OpenAI and Google model, with caching and discounts, ranked…

API cost

Monthly and annual spend on an API with a fixed fee and volume pricing, to compare up to three plans and see…

Word count

Words, characters, sentences and paragraphs in any text.