Illustration of a document's token count measured against a model's context window bar

Context Window Calculator

"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.


💻 Show API usage examples (cURL)
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.