
How 1-million-token context models actually work (and which ones deliver in 2026)
Short answer (60 seconds): A million tokens of context is the model's ability to "see" all your information at once — roughly 1,500 printed pages or 25 novels. In 2026 it is no longer a differentiator: most frontier models ship with it (Claude Sonnet 5, GPT-5.6, Gemini 3.6 Flash, DeepSeek V4, Grok 4.5, Qwen 3.7, Kimi K3, Muse Spark 1.1). What few tell you: (1) accuracy is not uniform — the model reads the start and end of the prompt better than the middle ("lost in the middle"), (2) latency scales up (1M tokens in GPT-5.6 takes 30+ seconds), (3) price varies 35x across providers. This guide explains how it works under the hood, what use cases it actually unlocks, and when RAG is still the better option.
Every time a provider announces "1M context" the same question comes up: does it actually read all that, or is it marketing? The short answer is yes, with asterisks. 2026 models do process 1M tokens — but accuracy, cost, and latency change non-linearly based on how much of the window you fill. If you understand that curve, you stop overpaying and stop trusting results that look good but lie in the middle.
This guide is written for readers who use AI every day but do not need to know what a tensor is. We will walk through what happens inside when you ask a model to read 1,500 pages, what techniques make it possible, what it actually unlocks, and the real tradeoffs that change your architecture decision.
How big is a million tokens, concretely?
Models do not read characters, they read tokens. A token is a chunk of text — a full word, a syllable, or a punctuation mark, depending on language and tokenizer. In English, one million tokens roughly equals:
- 750,000 words (an average novel has 80,000 words, so ~9 thick books)
- 1,500 printed pages letter-size, single-spaced
- ~30 mid-length novels
- ~5,000 short office emails
- A mid-size codebase (a few hundred thousand lines)
To size against what you were used to: GPT-3.5 in 2022 had 4K of context. That is ~250x less. The industry moved from "fits a paragraph" to "fits a small library" in four years. What changed was not just the models — it was the techniques.
How a model processes a million tokens
When you put 1M tokens into the prompt, four things happen in order. None is magic — all are the result of optimizations the industry pushed between 2023 and 2026.
1. Tokenization
The raw text is split into tokens. Each token is converted into a numeric vector (an embedding) that the model can operate on. For 1M tokens you need ~1M embeddings. At a typical dimension of 4,096 to 12,288 numbers per embedding, that is 16 GB to 48 GB of representation just for the input.
2. Attention (the expensive step)
The attention mechanism is what lets the model "look at" the whole sequence together. Each new token looks at every previous token and decides what weight to give each one. The math problem is that this is O(n²) in length: if you double the context, you quadruple the compute.
For 1M tokens, "dense" attention (the kind GPT-3 used) would require 10¹² operations per layer. That does not run on any hardware on the planet in reasonable time. That is why modern models use variants.
3. Attention variants that make 1M possible
Three techniques dominate in 2026:
Sparse attention (used by GPT-5.6 and Claude Sonnet 5): each token does not look at every previous token, but at a fixed pattern — local window plus a few global tokens. This reduces complexity from O(n²) to O(n log n). The tradeoff: the model sees less context per attention head, so it depends on more layers to compensate.
Ring attention (used by Gemini and DeepSeek): the context is partitioned across several accelerators (GPUs/TPUs) that communicate in a ring, exchanging K/V blocks as they process. This parallelizes attention over huge contexts without any single chip having to load everything in memory.
Position interpolation / YaRN (used by everyone): models were originally trained with smaller windows. To extend attention to 1M, the positional encoding is rescaled. It is like stretching a map: distances change but the overall shape is preserved.
4. Retrieval and cache
Even with sparse attention, moving 1M tokens per call has cost. Providers use two key optimizations:
- Persistent KV-cache: the attention embeddings (KV) are saved between calls. If your second prompt shares the system prompt with the first, it is not recalculated.
- Tariffed prompt caching: Anthropic and OpenAI offer cache read at ~10% of fresh input price. Sonnet 5 charges USD 0.20 per million tokens on cache read — 10x cheaper than new input. For agents with large system prompts, this changes the economics.
What 1M tokens actually unlocks
Three use cases where long context changes the architecture decision:
Whole codebases without RAG
Loading the entire codebase into the prompt lets the model reason about cross-dependencies without building a retrieval graph. If your codebase is under ~500K tokens, you can pass everything to the model and let it build the mental map. Anthropic, Cursor, and Cognition (Devin) are the strongest proponents of this pattern.
The typical case: a PR that touches five files in a monorepo. Without long context, the model needs you to paste the files manually or rely on retrieval that can miss. With 1M context, you pass them all and the model sees the diff with the rest of the code as context.
Long documents with cross-references
Legal contracts, technical manuals, papers with appendices, support transcripts. The classic case: the model needs to see the main contract AND the three exhibits AND the email thread to answer the question. Without long context, RAG has to decide which fragment to fetch; with long context, you pass everything and the model decides what weight to give each section.
Sustained conversational memory
Customer support sessions that last hours, or agents iterating on a complex problem. The model can remember the whole conversation without summarizing, which avoids the classic problem of "summary that drops the important detail". For therapy bots, tutoring, and long-process customer support, this is qualitative.
What nobody tells you: the three hidden costs
This is where most posts about 1M context stop being useful. Sticker price and max size are the easy part; what decides whether 1M works in production are three non-linear effects.
1. Latency
Processing 1M tokens is not instant. Numbers measured in August 2026:
| Model | Latency for 1M tokens (input) | Effective throughput |
|---|---|---|
| Gemini 3.6 Flash | ~10 seconds | ~100K tok/s aggregate |
| DeepSeek V4 Flash | ~15 seconds | ~67K tok/s |
| Claude Sonnet 5 | ~20 seconds | ~50K tok/s |
| GPT-5.6 Sol | ~30 seconds | ~33K tok/s |
| Claude Opus 5 | ~45 seconds | ~22K tok/s |
For an interactive conversation that is unacceptable — a human waits less than 3 seconds. That is why 1M context is used only in background jobs (nightly code analysis, document auditing, reports) or combined with speculative processing (the model starts generating before it finishes reading everything).
2. Cost per token
At list price, 1M input tokens costs:
| Model | Input ($/MTok) | Output ($/MTok) | Cost 1M in + 100K out |
|---|---|---|---|
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.17 |
| Qwen 3.7 Plus | $0.32 | $1.28 | $0.45 |
| DeepSeek V4 Pro | $0.435 | $0.87 | $0.52 |
| Gemini 3.6 Flash | $1.50 | $7.50 | $2.25 |
| Claude Sonnet 5 (intro) | $2.00 | $10.00 | $3.00 |
| Claude Opus 5 | $5.00 | $25.00 | $7.50 |
The gap between cheapest and most expensive is ~44x. If you are not routing by cost-per-task, you are paying the invoice of the lab that does not fit you. But the sticker hides two things:
- Cache read cuts real cost: Sonnet 5 with prompt caching and hit rate >50% drops below USD 1 per million combined tokens. The data point almost nobody looks at.
- The context does not fill all the time: in production, most calls use 20K to 100K tokens. 1M is the ceiling, not the average.
3. Accuracy degradation ("lost in the middle")
This is the most important effect and the worst communicated one. It is documented in the literature since 2024 (Liu et al., "Lost in the Middle") and reproduced across all model families:
The model uses information at the start and end of the prompt far more accurately than information in the middle.
The curve is roughly inverted-U: high precision at the edges, drop in the center. In controlled tests (Qwen 2.5-7B), accuracy collapses past 40-50% of the max context size — F1 drops from 0.55 to 0.30 in that range.
Illustrative needle-in-context accuracy numbers for 1M tokens (not a controlled benchmark):
| Family | Accuracy @ 1K tokens | Accuracy @ 1M tokens | Degradation |
|---|---|---|---|
| Claude (Sonnet 5/Opus 5) | ~94% | ~75-78% | Moderate |
| GPT (5.6 family) | ~92% | ~35-40% | Severe |
| Gemini (3.6 Flash) | ~92% | ~25-30% | Very severe |
If your critical information sits in the middle of the prompt, the model will ignore it more than half the time. This does NOT mean 1M context is useless — it means you have to design your prompts thinking about where information lands.
The rule of thumb: if the answer depends on a specific fact, place it near the end (where the model "sees" best). If it is a long system prompt, put the critical instructions at the start. Information in the middle is a candidate for chunking + RAG.
Verified table: which models offer 1M context in August 2026
Here is the list confirmed by providers. The source for each row is the lab's official blog or the pricing page as of the publication date of this post.
| Model | Maker | Released | Context window | Input ($/MTok) | Output ($/MTok) | Notes |
|---|---|---|---|---|---|---|
| Claude Sonnet 5 (intro) | Anthropic | Jun 30 2026 | 1M | $2.00 | $10.00 | Expires Aug 31; cache read $0.20 |
| Claude Sonnet 5 (post-intro) | Anthropic | post Aug 31 | 1M | $3.00 | $15.00 | Regular price |
| Claude Opus 5 | Anthropic | 2026 | 1M | $5.00 | $25.00 | Top-tier quality |
| GPT-5.6 Sol | OpenAI | Jul 9 2026 | ~1M | $5.00 | $30.00 | Flagship agentic |
| GPT-5.6 Terra | OpenAI | Jul 9 2026 | ~1M | $2.50 | $15.00 | Mid-tier, best ratio |
| GPT-5.6 Luna | OpenAI | Jul 9 2026 | ~1M | $1.00 | $6.00 | Volume, free tier |
| Gemini 3.6 Flash | Jul 2026 | 1.05M | $1.50 | $7.50 | Lowest latency | |
| Grok 4.5 | xAI | Jul 8 2026 | 1M | $2.00 | $6.00 | Co-trained with Cursor; EU not available |
| DeepSeek V4 Pro | DeepSeek | 2026 | 1M | $0.435 | $0.87 | 35x cheaper than Opus 5 |
| DeepSeek V4 Flash | DeepSeek | 2026 | 1M | $0.14 | $0.28 | Cheapest on the market |
| Qwen 3.7 Max | Alibaba | 2026 | 1M | $2.50 | $7.50 | Chinese, best quality/price |
| Qwen 3.7 Plus | Alibaba | 2026 | 1M | $0.32 | $1.28 | Volume tier |
| Kimi K3 | Moonshot | 2026 | 1M | n/d | n/d | Chinese, agentic focus |
| Muse Spark 1.1 | Meta | Jul 9 2026 | 1M | $1.25 | $4.25 | US-only preview |
| GLM-5.2 | Zhipu | 2026 | 1M | n/d | n/d | Open weights, MIT |
Observations that change your decision matrix:
- Context size is no longer a differentiator. In 2024 having 100K was rare; in 2026 having 1M is commodity. What differentiates providers now is accuracy in the middle of the prompt and combined input + output + cache cost.
- The Claude family retains better at 1M. If your workload depends on reading long contexts with precision, Sonnet 5/Opus 5 are the best option. Gemini 3.6 Flash is the fastest but has worse mid-prompt retention.
- DeepSeek is 35x cheaper than Opus 5 on sticker, but the quality gap on complex tasks remains ~20-30% in independent benchmarks. If your task is critical reasoning, it is not a drop-in replacement.
- Sonnet 5 intro pricing expires August 31 2026. If you are evaluating a pilot on Anthropic, this week is the window.
When to use 1M context (and when NOT to)
The right question is not "can I use 1M tokens?" — it is "should I?". Three rules I apply with clients.
Use 1M context when:
- The whole is more than the sum of parts. If you need the model to see document A together with document B because the answer depends on the relationship between them (contracts + exhibits, code + tests, transcript + context).
- Your corpus fits in ~200K tokens and you need all of it. Small/mid codebases, product manuals, support knowledge bases. Here long context wins because latency is tolerable and accuracy is high.
- The cost of building it with RAG exceeds the savings. RAG has indexing cost, per-call retrieval cost, and the cost of keeping the index fresh. If your information changes little and fits in long context, sometimes it is cheaper to put everything in every call than to maintain a retrieval pipeline.
DO NOT use 1M context when:
- Your corpus exceeds ~500K tokens. There latency starts to hurt and accuracy in the middle degrades. RAG over the full corpus is better.
- You only need a specific fragment. If the question is "what does clause 7 say?", RAG retrieves that clause and done. Loading the whole contract to ask about one clause is waste.
- The loop is interactive. 30+ seconds of latency per turn is not usable in chat. For interactive UX, keep context below ~50K tokens.
- Precision matters more than full context. If your task is critical reasoning over scattered data, well-tuned RAG beats full long context. Per-retrieval precision > middle-of-prompt precision.
The golden rule
If the information fits on a screen and you need all of it together, use long context. If you need to search across millions of documents, use RAG. If you need both, use long context + hybrid RAG (retrieve top-K, then pass them all to the model).
The hybrid pattern is what I see work most in production: RAG to find the candidates, long context so the model sees them together with their relationships. It is ~2-5x more expensive than pure RAG but precision jumps significantly on multi-document questions.
What to watch in the next 12 months
Three things that are in beta or were recently announced and will move the frontier:
- Output tokens at the level of context. Most models cap output between 32K and 128K tokens, even with 1M input context. When models can coherently generate 1M output tokens (without "drifting" past 200K), it unlocks full desktop use, generating entire books in one pass, and long reports without chunking.
- Recovered accuracy in the middle of the prompt. Anthropic, OpenAI, and Google have published that they are training specifically against the "lost in the middle" problem. If the U-curve flattens, long context wins where today it loses to RAG.
- Speculative processing for interactive time. Process 1M tokens in the background while the model generates a partial response. Some labs are already experimenting in closed beta. When it goes mainstream, the "30 seconds for 1M" limit drops to 3-5 seconds as perceived by the user.
For now, the best rule stays the same: use long context where the whole matters, RAG where the search matters, and always assume information in the middle is a candidate to fail.
Sources and verified data:
- Lost in the Middle (Liu et al., TACL 2024) — original paper on mid-prompt degradation.
- Intelligence Degradation in Long-Context LLMs (arXiv 2026) — analysis of the 40-50% critical threshold.
- Anthropic Sonnet 5 launch (Jun 30 2026) — pricing and 1M context.
- OpenAI GPT-5.6 family pricing — Sol/Terra/Luna context and pricing.
- Google Gemini 3.6 Flash reference — 1.05M context.
- The July 2026 Model Wave (CometAPI) — compilation of cycle models.
- 1M-Token Context Models: Sonnet 5 vs DeepSeek vs Qwen — pricing comparison.
- Best LLMs 2026 (Santage) — ranking and capabilities.
Frequently asked questions
What is a million tokens of context?
The maximum amount of information a model can "see" in a single conversation. One million tokens equals roughly 750,000 English words, about 1,500 printed pages, or 25-30 average novels. That is enough to fit a mid-size codebase, an entire technical manual, or several years of email.
Which models offer 1 million tokens of context in 2026?
As of August 2026, the verified 1M+ context models include Claude Sonnet 5 and Opus 5 (Anthropic), GPT-5.6 Sol/Terra/Luna (OpenAI), Gemini 3.6 Flash (Google, 1.05M), Grok 4.5 (xAI), DeepSeek V4 Pro/Flash, Qwen 3.7 Max/Plus (Alibaba), Kimi K3 (Moonshot), Muse Spark 1.1 (Meta), and GLM-5.2 (Zhipu, open weights). Context size is no longer a differentiator — what now matters is price and quality in the middle of the prompt.
Do models use the whole context with the same accuracy?
No. The "lost in the middle" phenomenon is well documented: models use information at the start and end of a long prompt far more reliably than information in the middle. In controlled tests, accuracy drops from ~92% at 1K tokens to ~35-40% at 1M for GPT models, ~75% for Claude, and ~25-30% for Gemini. There is a critical threshold around 40-50% of the max context size where precision collapses.
When should I use 1M context instead of RAG?
1M context wins when the model needs to see everything together with cross-dependencies: mid-size codebases, legal contracts with exhibits, long support transcripts. RAG still wins for pure retrieval over massive corpora (millions of documents), because ANN-based search stays at O(log n) while model context has a per- token cost. The rule of thumb: if your info fits in ~200K tokens and you need all of it together, use long context; if it exceeds that or you only need fragments, use RAG.
How much does it cost to use 1M tokens in production?
At list price, 1M input tokens costs between USD 0.14 (DeepSeek V4 Flash) and USD 5 (Claude Opus 5). The real cost depends on cache read pricing: with prompt caching and a high hit rate, Sonnet 5 drops below USD 1 per million combined tokens. Add latency on top: processing 1M tokens in GPT-5.6 takes 30+ seconds; in Gemini 3.6 Flash it falls to ~10s. For agentic loops, sticker price lies — the binding constraint is usually latency and accuracy in the middle of the prompt.