Skip to content
AI Dev Toolkit.
Esc
  • Loading…

Tokens & Costs

Context window checker: will your text fit?

A context window is the most tokens a model can handle in one request, with your prompt and its reply sharing the space. Paste text or type a token count to see which of 320+ models it fits (limits as of 16 October 2026), how much room is left for the answer, and which larger-context models to switch to. Counting runs in your browser.

0 characters · 0 words

Counting runs in your browser. Your text isn’t sent anywhere unless you ask a provider for an official count.

Tokens the model may write. Reasoning models spend thinking tokens here too.

System prompt, tool definitions, chat history.

Will it fit?

Other promptYour textUncertainReply

  • GPT-6.1 Sol

    OpenAI · 1,050,000-token window

    Add some text to check.

  • GPT-6 Luna

    OpenAI · 1,050,000-token window

    Add some text to check.

  • Claude Opus 5.5

    Anthropic · 1,000,000-token window

    Add some text to check.

    Free, uses your own API key. Sends this text to Anthropic.
  • Claude Sonnet 5.5

    Anthropic · 1,000,000-token window

    Add some text to check.

    Free, uses your own API key. Sends this text to Anthropic.
  • Claude Haiku 5.5

    Anthropic · 1,000,000-token window

    Add some text to check.

    Free, uses your own API key. Sends this text to Anthropic.
  • Gemini 3.8 Flash

    Google · 1,048,576-token window

    Add some text to check.

    Free, uses your own API key. Sends this text to Google.
  • DeepSeek V4.1 Flash

    DeepSeek · 1,048,576-token window

    Add some text to check.

  • Llama 4 Maverick

    Meta · 128,000-token window

    Add some text to check.

Context windows updated 2026-10-16

Steps

How do I check if my text fits a model?

  1. Paste your text or drop a file, or switch to “Enter a token count” if you already know it.
  2. Set the room for the reply, and any tokens already used by a system prompt, tool definitions or chat history.
  3. Read the verdict for each model: “Fits”, “Too close to call” or “Too large”, with how much space is left.
  4. For Claude and Gemini, get the official count with your own API key to turn a range into an exact answer.
  5. If it doesn’t fit, add one of the suggested larger-context models, or split the text into the number of parts shown.

Method

Will my text fit in the context window?

A model’s context window is the most tokens it can handle in one request, including its own reply. Windows range from a few thousand tokens to 2,000,000 for Grok 4.20, the largest in our data. The checker adds up everything a request carries and compares it with each model’s published limit. For background, see context windows explained.

Does the reply count toward the context window?

Yes, and the reply is only one of several things that share the window. A request is more than the text you paste. It also carries the system prompt, any tool or function definitions, the earlier messages in a conversation, and room for the answer. The checker splits these into three parts: your text, other prompt tokens, and the reply. The bar for each model shows all three against its window, and a line marks the edge when the request goes past it.

For example, a 200K-token window might hold system prompt (2,000), tool definitions (3,000), earlier messages (15,000), attached document (150,000), room for the reply (8,000): 178,000 tokens in all, leaving 22,000 spare. In the checker, the document is your text, the first three go in “other prompt tokens”, and the last is the reply room.

How are the tokens counted for each model?

Different models split the same text into different numbers of tokens, so the checker counts per model. For OpenAI models and for open-weight models whose tokenizers are published (such as DeepSeek, Qwen and Mistral), it runs the model’s own tokenizer in your browser, the same engine the token counter uses to count tokens per model, and the count is exact.

Claude, Gemini and many other models don’t publish their tokenizers. Rather than pretend to know their count, the checker gives a range. We measured the published modern tokenizers against OpenAI’s on more than 1,500 texts in many languages: they used between 0.61 and 2.0 times as many tokens, and most stayed within 0.88 to 1.43 times. So the range runs from 0.5× to 2× OpenAI’s count, widened to 3× when most of the letters are in a non-Latin script, where tokenizers differ most. A model is only marked “Fits” if the top of the range fits, and only “Too large” if the bottom of the range doesn’t. In between, it says “Too close to call”, and the official count (free, with your own API key) gives the exact answer.

What happens when a prompt is too long?

Most APIs reject it with an error, so you have three main options. Choose a model with a larger window: the checker lists the cheapest current models with room for your request. Split the text into parts that each fit, and process them one at a time; the checker tells you how many parts a given model needs, and you can split a long document into chunks. Or send less: summarise long documents first, or retrieve only the relevant passages instead of the whole text. The last option is often the best, because very long prompts cost more and run slower.

A window that fits isn’t the same as a window the model uses well. Research on long inputs found that models recall information at the start and end of a prompt better than information “lost in the middle”, so put the most important instructions and passages near the start or end.

Context windows and reply limits come from the OpenRouter models API and the LiteLLM model list, refreshed daily (last updated 2026-10-16). Some providers offer larger windows on request or on special tiers; the checker uses the standard published limit.

Examples

How much text fits in 128K, 200K or 1M tokens?

How much text fits in popular models

ModelContext windowLongest replyAbout (English)
GPT-6.1 Sol OpenAI1,050,000128,000787,500 words · 1,575 pages
GPT-6 Luna OpenAI1,050,000128,000787,500 words · 1,575 pages
Claude Opus 5.5 Anthropic1,000,000128,000750,000 words · 1,500 pages
Claude Sonnet 5.5 Anthropic1,000,000128,000750,000 words · 1,500 pages
Claude Haiku 5.5 Anthropic1,000,000128,000750,000 words · 1,500 pages
Gemini 3.8 Flash Google1,048,57665,536786,432 words · 1,573 pages
DeepSeek V4.1 Flash DeepSeek1,048,576–786,432 words · 1,573 pages
Llama 4 Maverick Meta128,00016,38496,000 words · 192 pages

Words and pages use ¾ of a word per token and 500 words per page, before leaving room for the reply. “–” means no published reply limit. For ratios measured by tokenizer, language and kind of text, use the tokens to words converter. Data updated 2026-10-16.

Which LLM has the largest context window?

The largest context window from each provider, in tokens, as of 16 October 2026. One model per provider; on a tie, the cheapest.
ProviderModelContext window (tokens)
xAIGrok 4.202,000,000
OpenAIGPT-6 Luna1,050,000
MeituanLongCat 2.01,048,756
PoolsideLaguna S 2.11,048,576
GoogleGemini 2.5 Flash Lite1,048,576
MetaMuse Spark 1.2 Contributor1,048,576
XiaomiMiMo-V2.51,048,576
DeepSeekDeepSeek V4 Flash Vision Exp1,048,576

To weigh windows against price and other limits, compare context windows across models.

FAQ

Frequently asked questions

What is a context window?

It is the most text a model can handle in one request, measured in tokens. Everything counts: the system prompt, tool definitions, the conversation so far, any documents you attach, and the reply the model writes.

Does the reply count towards the context window?

Yes, for most providers the prompt and the reply have to fit in the window together, so a model with a 200,000-token window can’t read 199,000 tokens and then write 4,000. This checker always leaves the room you set for the reply. Each model also has a separate limit on how long one reply can be, and the checker warns you if your reply room is above it.

How many pages fit in 200,000 tokens?

For English prose, roughly 150,000 words or about 300 printed pages, using the common estimate of three-quarters of a word per token and 500 words per page. Code, tables and other languages use more tokens per word, so check your own text.

Why does Claude or Gemini show a range instead of a number?

Their tokenizers aren’t public, so the exact count isn’t knowable without asking the provider. The checker takes OpenAI’s count of your text and allows from 0.5× to 2× of it (3× for text mostly in non-Latin scripts), the spread we measured across the tokenizers that are public. It only says “Fits” if even the top of the range fits. Click “Get the official count” with your own API key for an exact answer.

What happens if a request is too long?

Most APIs reject it with an error, such as Anthropic’s “prompt is too long”. Chat apps usually handle it for you by dropping or summarising older messages, which means the model quietly stops seeing part of the conversation.

Do reasoning or thinking tokens use the context window?

Yes. Reasoning models write hidden thinking tokens before the visible answer, and those count as output in the same window. If you use a reasoning model, set the reply room high enough for the thinking as well as the answer.

Is a bigger context window always better?

Not always. Long prompts cost more (some models charge a higher rate above a size threshold), take longer to process, and models tend to use information buried in the middle of very long inputs less reliably than information at the start or end. Sending only the relevant parts often gives better answers for less money.

Which model has the largest context window?

Grok 4.20 from xAI, at 2,000,000 tokens, is the largest in our data (as of 16 October 2026). Very long prompts cost more, though, and models recall facts from the middle of long inputs less reliably, so the largest window isn’t automatically the best choice.

How do I see how much context Claude Code is using?

Run /context in Claude Code. It shows what is filling the window, broken down into the system prompt, tools, memory files and messages, and /compact summarises the conversation to free space.