Will my code fit in the context window?

Which models can read your code or text in one go, with room left for the answer.

Result

It fits in 35 of 42 models in one go, with 32K tokens left for the answer.

Which context windows it fits in
ModelContextYour textOf the windowResult
GPT-5.5OpenAI1.05M~500K48%Fits
GPT-5.6 SolOpenAI1.05M~500K48%Fits
GPT-6 AstraOpenAI1.05M~500K48%Fits
GPT-6 LunaOpenAI1.05M~500K48%Fits
GPT-6 SolOpenAI1.05M~500K48%Fits
GPT-6.1 SolOpenAI1.05M~500K48%Fits
DeepSeek V4 ProDeepSeek1.05M~500K48%Fits
DeepSeek V4.1 FlashDeepSeek1.05M~500K48%Fits
Gemini 3.1 Pro PreviewGoogle1.05M~500K48%Fits
Gemini 3.5 Flash-LiteGoogle1.05M~500K48%Fits
Gemini 3.6 FlashGoogle1.05M~500K48%Fits
Gemini 3.8 FlashGoogle1.05M~500K48%Fits
Gemini 4 ArgonGoogle1.05M~500K48%Fits
GLM-5.3Z.ai1.05M~500K48%Fits
GLM-5.3 FlashZ.ai1.05M~500K48%Fits
Kimi K3Moonshot AI1.05M~500K48%Fits
MiMo-V2.6-ProXiaomi1.05M~500K48%Fits
Mistral Large 4Mistral1.05M~500K48%Fits
Muse Spark OpenMeta1.05M~500K48%Fits
Muse WonderMeta1.05M~500K48%Fits
Claude Fable 5Anthropic1M~650K65%Fits
Claude Fable 5.1Anthropic1M~650K65%Fits
Claude Haiku 5.5Anthropic1M~650K65%Fits
Claude Opus 4.6Anthropic1M~500K50%Fits
Claude Opus 4.7Anthropic1M~650K65%Fits
Claude Opus 4.8Anthropic1M~650K65%Fits
Claude Opus 5Anthropic1M~650K65%Fits
Claude Opus 5.5Anthropic1M~650K65%Fits
Claude Sonnet 4.6Anthropic1M~500K50%Fits
Claude Sonnet 5Anthropic1M~650K65%Fits
Claude Sonnet 5.5Anthropic1M~650K65%Fits
Grok 4.3xAI1M~500K50%Fits
MiniMax M3.1 FlashMiniMax1M~500K50%Fits
Qwen3.8 27BAlibaba (Qwen)1M~500K50%Fits
Qwen3.8 MaxAlibaba (Qwen)1M~500K50%Fits
MiniMax M3MiniMax524K~500K95%Too big
Grok 4.6xAI500K~500K100%Too big
Grok 4.7xAI500K~500K100%Too big
Kimi K2.6Moonshot AI262K~500K191%Too big
Mistral Medium 3.5Mistral262K~500K191%Too big
Claude Haiku 4.5Anthropic200K~500K250%Too big
gpt-oss-120bOpenAI131K~500K381%Too big

How we work it out

We estimate tokens as characters ÷ 4, and add 30% for Claude models from 4.7 on, whose tokenizer counts more tokens for the same text[1]. A model fits when your text plus the room for the answer is within its context window.

Questions

How accurate is the token estimate?

It is a rule of thumb: about 4 characters per token for English text and code. Real counts depend on the tokenizer and the language, so leave some room.

Why do newer Claude models count more tokens?

Anthropic says Claude 4.7 and later models use a newer tokenizer that produces about 30% more tokens for the same text. The calculator adds that for those models.

Should I fill the whole window?

Rarely. Agents work better with a focused context, and every call resends it, so a full window is also the most expensive way to work.

More tools

Sources

  1. platform.claude.com: docs/en/about-claude/pricing, read

Numbers from the makers' own pages, checked by hand, last read . List prices in US dollars before tax. Spotted a mistake? office@shuriken.sh.

Made by Shuriken, the harness for coding agents. Its hot swapping moves your chats to another of your accounts or API keys when one nears its limit. Use only accounts you own and are entitled to use.

Try Shuriken on your own computer

Add your Claude, Codex and Gemini accounts once. Shuriken switches between them so your agents keep working.

Downloads open soon Pricing
Download on the App StoreGet it on Google PlayComing soon