← Back to Blog

GPT-5 Token Limit & Context Window Explained

"What's the GPT-5 token limit?" depends on which GPT-5 model you use and whether you mean the context window (how much you can send in) or the max output (how much you get back). Here are the real numbers as of October 2026.

GPT-5 Token Limits at a Glance

Current GPT-5-family limits (check OpenAI's pricing page before building — numbers change):

  • GPT-5.5 (flagship) — ~1 million token context window, 128K max output
  • GPT-5.4 (mid-tier) — ~1.05 million token context window, 128K max output
  • GPT-5.4-Nano (budget) — 400K token context window, 128K max output

The context window counts everything in one request: system prompt, conversation history, pasted documents, tool outputs, and the model's reply. A 1M window with a 128K output cap means up to ~870K of input plus 128K of generated text.

How Much Text Is 1 Million Tokens?

  • ≈ 750,000 words of English prose
  • ≈ 500,000 lines of typical source code
  • ≈ 20 average novels
  • ≈ a full codebase of a medium project, or hundreds of PDF pages in one prompt

In practice, few workflows need the full window — and filling it on every call gets expensive fast, since you pay for every input token each time. Estimate any text's token count with the AI Token Counter before you paste it.

Context Window vs Max Output

These two limits get confused constantly:

  • Context window — total tokens the model can read and hold: your prompt + history + its answer.
  • Max output tokens — the ceiling for a single response, set via the max_tokens parameter. For GPT-5 models it tops out around 128K, which is far more than any single reply needs.

If you're writing long documents or running agents, set max_tokens explicitly so a runaway generation doesn't burn your budget.

What Happens When You Hit the Limit?

You'll see one of three outcomes:

  • The API returns an error mentioning maximum context length — the request never runs.
  • Older messages get silently dropped in chat apps — the "AI forgot earlier in the conversation" effect.
  • A long generation stops mid-sentence when it reaches the output cap.

Also note long-context cost: some tiers price input higher above large context thresholds (for example, some OpenAI and Google models roughly double input rates past a few hundred thousand tokens). A 1M window is available — it isn't always at the headline price.

How to Check Your Token Usage

On the API, every response includes a usage object with exact prompt, completion, and total token counts — the authoritative number. For planning before you build, paste drafts into the AI Token Counter, which estimates per-model counts locally in your browser, and compare model windows side-by-side in the Model Comparator.

Check how close your prompt is to any model's limit.

Try AI Token Counter →

Frequently Asked Questions

What is the GPT-5 token limit?

It depends on the model: GPT-5.5 has roughly a 1 million token context window, GPT-5.4 about 1.05 million, and GPT-5.4-Nano 400K. All current GPT-5 models allow up to around 128K output tokens per response.

How many words is 1 million tokens?

About 750,000 words of English text, since one word averages roughly 1.3 tokens. Code and non-English text take more tokens for the same amount of content.

What happens when I exceed the context window?

The API returns a context-length error, or chat apps silently drop the oldest messages so the conversation continues with less history. Long generations also stop mid-sentence when they hit the max output limit.

Does a bigger context window mean a bigger bill?

Yes, if you fill it. Every input token is billed on every request, and some models charge higher input rates past large context thresholds. Send only the context you need and cache repeated prefixes to keep costs down.