BroadRouter

Context window calculator

Updated

In short: A context window is the most tokens a model handles in one request, prompt and answer together. Your text fits if its prompt tokens plus the output you reserve stay within the window. BroadNet chat models offer 32,768 to 1,048,576 tokens. Paste text or open files to see the share used, room left and cost per model.

Free, no sign-up, runs in your browser: nothing you type is sent anywhere.

or drop them here · read locally, never uploaded

    Room left = context window − prompt tokens. Cost = prompt tokens × input price per 1M; the reserved output, if fully used, adds the output cost shown. ≈ marks an estimate until that model's tokenizer is loaded.

    Create an account ($5 starting credit)

    Report a wrong price or number (email to info@broadnet.ai, with this page's link and your inputs filled in).

    How it works

    1. Paste text, or open one or more local files (.txt, .md, .json, .csv or code). Nothing is uploaded.
    2. Set how many tokens to reserve for the answer, including any reasoning.
    3. Read each model's row: tokens, share of the context window used, room left for output and the cost to send the text once.
    4. Load the real tokenizers to replace estimates marked ≈ with real counts.

    Context windows at a glance

    How much English prose each window holds, measured with each model's own tokenizer at 500 words per page:

    ModelContext window≈ English words≈ PagesCost to fill once
    DeepSeek V4.1 Flash1,048,576 tokens823,135.6391,646.271$0.184
    GLM 5.31,048,576 tokens812,886.8991,625.774$0.818
    Qwen3.8 27B262,144 tokens198,665.184397.33$0.0459
    BroadNet Gemma 4 VL 26B32,768 tokens25,220.91350.442$0.0033

    Words per token from our English prose sample (1183 words) measured 2026-11-15; see the tokens to words converter for other content. Prices synced 2026-11-14.

    The formula

    room left for output = context window − prompt tokens
    fits                 = prompt tokens + reserved output ≤ context window
    cost to send once    = prompt tokens × input price per 1M ÷ 1,000,000

    Worked example: a 300-page English report is about 197,928.994 tokens with the Qwen tokenizer. It fits Qwen3.8 27B's 262,144-token window with 64,215.006 tokens to spare, and costs $0.0346 to send once. It would not fit BroadNet Gemma 4 VL 26B's 32,768-token window; split it, or summarise it in parts.

    When it doesn't fit

    • Move to a longer window: DeepSeek V4.1 Flash and GLM 5.3 take 1,048,576 tokens.
    • Send only the relevant parts: retrieve the sections that answer the question instead of the whole file.
    • Trim history in long chats: keep the system prompt and the latest turns.
    • Remove noise: minify JSON, drop base64 blobs, logs and lockfiles from code dumps.

    Questions

    What is a context window?

    The maximum number of tokens a model can handle in one request, counting the prompt (system prompt, history, documents) and the answer it writes together. If the prompt uses the whole window, there is no room left for output. Context window explained.

    How do I know if my document fits in the context window?

    Open the file above. The calculator counts its tokens with each model's own tokenizer, then subtracts them and your reserved output from each window. A green row fits with your reserve; amber fits the prompt but leaves less room than you reserved; red does not fit.

    How many pages fit in a 1M-token context?

    About 1,646.271 pages of English prose at 500 words per page, by our measurement with the DeepSeek V4.1 Flash tokenizer. Code, JSON and Arabic fit fewer pages because they need more tokens per word.

    Why reserve output tokens?

    The answer shares the window with the prompt. Reasoning models also spend hidden reasoning tokens before answering, which count as output. Reserve enough for both, or a long prompt leaves the model no room to finish. Why reasoning can empty a reply.

    Are my files uploaded?

    No. Files are read in your browser with the FileReader API and tokenized locally. The only download is the public tokenizer file from Hugging Face, once.

    Does the API add tokens beyond my text?

    Yes, a few. The chat template wraps each message in role markers, usually 12 to 52 tokens per request for these models, and tool definitions add more. Leave a small margin, or tick "Chat format" in the token counter to see the exact overhead.

    Go deeper

    Read as MarkdownAsk ChatGPTAsk ClaudeAsk Perplexity