"I have 120,000 tokens of documentation — will it fit in this model?" Paste text (estimated with the same heuristic as the Token Counter) or enter a known token count directly, pick a model, and see how much of its context window that uses. Data as of August 2026 — context limits change over time, verify with the provider before relying on this for capacity planning.
curl -sS -X POST https://devops.majbase.com/context-window-calculator/api -H "Content-Type: application/json" -d '{"tokens":120000,"model":"gpt-4o"}'
Returns {"model", "context_window", "token_count", "fits", "remaining_tokens", "percent_used"}, or {"error": "..."}. Valid model ids: claude-opus-5, claude-sonnet-5, claude-haiku-4.5, gpt-5.5, gpt-5, gpt-4o, gemini-3-pro, gemini-3-flash.
Want an AI agent (Claude Code, claude.ai, or anything else that supports the Agent Skills format) to use this tool for you on request? Download the skill below and add it:
~/.claude/skills/context-window-calculator/SKILL.md