Cost & sizing

Token Counter & Context Window Checker

Check whether your document fits — before the model tells you it does not.

Free · no signup Time-sensitive Model prices verified 2026-08-28

Counted in your browser. Nothing is uploaded, stored, or sent anywhere — this site has no backend to send it to.

No text handy? Estimate:
What kind of text is it?

Emails, reports, articles, transcripts. The baseline.

Size
Tokens0estimated
Characters 0 including spaces
Words 0 whitespace-separated
Will it fit, and what does one pass cost?
  • Claude Opus 4.1 1% of window
    200K window$0 to read it once
  • Claude Sonnet 4.5 1% of window
    200K window$0 to read it once
  • Claude Haiku 4.5 1% of window
    200K window$0 to read it once
  • GPT-5 1% of window
    400K window$0 to read it once
  • GPT-5 mini 1% of window
    400K window$0 to read it once
  • Gemini 2.5 Pro 1% of window
    1M window$0 to read it once
  • Gemini 2.5 Flash 1% of window
    1M window$0 to read it once

Estimate Token counts are approximate — every provider tokenises differently, and the only exact number comes from that provider's own tokenizer. Costs are input tokens only, at list prices verified 2026-08-28, and cover reading the text once. A conversation re-sends the whole history on every turn, so a long back-and-forth costs several times this.

What people use this for

  • Checking whether a contract or report fits in one pass
  • Estimating what it costs to process a batch of documents
  • Diagnosing a "context length exceeded" error
  • Choosing a model based on the size of what you feed it

Two questions get asked together often enough that they belong in one tool: how big is this in the units AI bills by, and will the model be able to read all of it at once. The second is the one that stops people — "context length exceeded" is the first hard wall most business users hit, and there is no way to see it coming without counting first.

Nothing is uploadedCounting happens in your browser. The text never leaves your machine, is not stored, and is not sent to us or anyone else — this site is static and has no server to receive it. Paste the real contract.

What a token is

DefinitionToken
The unit of text an AI model actually processes — roughly three-quarters of a word in English. Common words are usually a single token; rare words, names, and technical terms split into several fragments. Full definition

Models do not read characters or words. They read tokens: fragments produced by a vocabulary table built during training. Frequent words earn a slot of their own, so "the" is one token. Anything unusual gets assembled from pieces, which is why a surname or a part number can cost four or five tokens while a common verb costs one.

This has a practical consequence worth knowing before you budget: text dense with names, identifiers, code, or formatting tokenises more heavily than ordinary prose of the same length. A spreadsheet export or a JSON file can run half again as many tokens as an article with the same character count, which is why the tool above asks what kind of text you pasted.

Why this is an estimate, and how far off it can be

Every provider ships a different tokenizer, and each is a lookup table rather than a formula — so the only exact count for a given model comes from that model's own tokenizer. Any tool that promises an exact universal number is either wrong or is quietly counting for one specific model and not telling you which.

The estimate here uses the character-based approximation the providers themselves publish as a rule of thumb, adjusted for how dense your text is. On ordinary English prose it lands within about ten percent, which is comfortably good enough for sizing a job or checking a fit. It is not good enough to sit one percent under a hard limit and assume you are fine.

What the context window actually limits

The context window is the total working space for a single call — and everything shares it. Your document, the system prompt, the conversation history, any retrieved reference material, and the response the model is about to write all come out of the same budget. A window is not "how big a document you can send"; it is "how much of everything fits at once".

Leave headroomFilling a context window to the brim leaves no room for the answer, and models tend to lose the middle of very long inputs well before they hit the limit. Sitting under about three-quarters of the stated window is a good working rule — the last quarter is where quality quietly degrades without any error to tell you.

What to do when it does not fit

In order of how much work each option costs you:

  1. Use a model with a bigger window

    The cheapest fix when it works. Windows differ by more than a factor of five across current models, and the largest are not the most expensive ones — check the table above before assuming you need to build something.

  2. Cut what the task does not need

    Boilerplate, repeated headers, navigation text, and signature blocks are frequently a large share of a document and contribute nothing. Stripping them is often enough on its own.

  3. Split it and process in parts

    Summarise each section, then summarise the summaries. Works well for reports and transcripts. Works badly where the answer depends on connecting two facts at opposite ends of the document.

  4. Retrieve instead of sending everything

    Index the material once and send only the passages relevant to each question. This is what RAG is for, and it is the right answer at archive scale — but it is a system to build and maintain, not a setting to change.

How many tokens is a page of text?

A typical single-spaced page of English prose runs about 500 to 800 tokens, or roughly 3,000 characters. A 20-page report lands near 15,000 tokens, and a full-length book is usually somewhere between 100,000 and 150,000. Dense material — code, tables, data exports — runs meaningfully higher for the same page count.

How many words is 1,000 tokens?

About 750 words of ordinary English. The ratio holds well for prose and breaks down for anything unusual: text full of names, technical terms, identifiers, or punctuation produces more tokens per word, sometimes considerably more.

What does "context length exceeded" mean?

You sent more tokens than the model can hold in one call. Remember that the limit covers everything at once — your document, the system prompt, the whole conversation history, and the space needed for the reply. In a long chat it is usually the accumulated history rather than your latest message that pushed it over.

Does a bigger context window mean better answers?

Not reliably. Models are measurably weaker at using information buried in the middle of very long inputs than material near the start or end — the effect is well documented and does not disappear on large-window models. A focused 5,000-token prompt frequently beats an unfocused 200,000-token one. Big windows buy convenience, not accuracy.

Is this token counter accurate?

It is a good estimate, not an exact count. Each provider tokenises differently and only their own tokenizer gives an exact figure for their model. This estimate typically lands within about ten percent on normal prose, which is fine for sizing and budgeting and not fine for sitting right at a hard limit.

The short version

  • A token is about three-quarters of a word — but names, code, and identifiers cost far more than common words.
  • The context window holds everything at once: your text, the system prompt, the history, and the answer.
  • Quality degrades in the middle of very long inputs before you ever hit the limit. Leave headroom.
  • When something does not fit, try a bigger window and trimming boilerplate before you build a retrieval system.

Current model prices

Verified 2026-08-28

USD per million tokens, standard tier. Batch, cached-read, and committed-spend discounts are excluded — they vary by account and would make the comparison flattering rather than useful.

Published list prices and context windows for current AI models
ModelTierInputOutputContext
Claude Opus 4.1AnthropicFrontier$15$75200K
Claude Sonnet 4.5AnthropicBalanced$3$15200K
Claude Haiku 4.5AnthropicFast & cheap$1$5200K
GPT-5OpenAIFrontier$1.25$10400K
GPT-5 miniOpenAIFast & cheap$0.25$2400K
Gemini 2.5 ProGoogleFrontier$1.25$101M
Gemini 2.5 FlashGoogleFast & cheap$0.3$2.51M

Output tokens cost several times more than input tokens at every provider, which is why a job that reads a lot and writes a little is far cheaper than the headline rate suggests — and why "make it more concise" is a cost control, not just a style note.