Claude Token Counter
Estimate Claude tokens for Fable, Opus, Sonnet and Haiku prompts, check the 200K context window, and see per-request and monthly Anthropic API cost — in your browser.
0
Claude tokens (est.)
$0
Input cost, cheapest model
0
Words
0
Characters
Loading tokenizer (≈2 MB, once)…
Each coloured block is one GPT token (o200k). Long or unusual words split into several; common English words are usually one.
Does it fit the context window?
How much of each model's limit your prompt uses, leaving room for the output length set below.
What this prompt costs.
Per request, and per month at your volume.
| Model | Your tokens | Input $/1M | Output $/1M | Per request | Per month |
|---|
Prices per million tokens from the providers' official pricing pages, verified . Standard (≤200K-token) tier, no caching or batch discounts. GPT counts are exact (o200k tokenizer, used by GPT-4o and later); Claude and Gemini counts are estimates — those tokenizers aren't public. Promotional rates are marked ◦. Confirm current pricing with the provider before budgeting.
Working with an estimate, honestly
Anthropic's tokenizer is proprietary, and the company's own guidance is that Claude tokens are "approximately 3.5 English characters" — slightly finer than OpenAI's roughly 4. The calibration this tool uses (1.15× the o200k count) reflects that difference on ordinary prose. Where the estimate drifts: heavily formatted code, tables, and non-English text. If a number matters for billing or a hard context limit, use Anthropic's count_tokens endpoint — it is free, exact, and takes the same messages payload you would send to the model.
Two Claude-specific cost levers are worth knowing before you compare it to other providers. Prompt caching bills reused prefixes at a tenth of the input price (a fortieth on Fable 5.1), so a large, stable system prompt costs far less across a session than the uncached table suggests. And the batch API halves prices for work that can wait up to a day. Neither is reflected above; both routinely cut real Anthropic bills by more than half.
The 200K window is shared between your input and Claude's output. The fit bars include the output allowance you set, so a document that shows 95% will fail once the model starts answering — leave headroom.
How to use Claude Token Counter.
- 1
Paste your prompt, system message or document
- 2
Read the estimated Claude token count (marked ~ because Anthropic's tokenizer is proprietary)
- 3
Check the 200K context bars for each Claude model
- 4
Set output tokens and requests per day; compare per-request and monthly cost across Claude models and against GPT and Gemini
Why use this tool.
Budget an Anthropic integration before you write it
See how much a long system prompt costs across a month of traffic — and what prompt caching would save
Know when a document will not fit Claude's 200K window with room for the answer
Confidential prompts stay on your machine
About Claude Token Counter.
Anthropic does not ship a public tokenizer, so this Claude token counter does the next best thing honestly: it runs a real tokenizer (OpenAI's o200k) in your browser and applies a calibration factor that tracks Claude's tokenization of English prose, labelling every number as an estimate. Around that estimate it gives you what matters for planning — whether the prompt fits Claude's 200K window with room to answer, what one request costs on Fable 5.1, Opus 5, Sonnet 5 and Haiku 4.5 at verified current prices, and what a month of traffic costs at your volume, next to the equivalent GPT and Gemini numbers. When you need an exact count for billing reconciliation, Anthropic's count_tokens endpoint is free; for everything before that, this is faster and keeps your prompts private.
Frequently asked questions.
Why is the Claude count an estimate?
Anthropic does not publish its tokenizer, so no browser tool can count Claude tokens exactly. This tool runs OpenAI's o200k tokenizer and applies a calibration factor (about 1.15×) that matches Claude's behaviour on English prose. Expect ±10% on prose, more on code and non-English text. For exact numbers, call Anthropic's count_tokens API endpoint, which is free.
What is Claude's context window?
All current Claude models — Fable 5.1, Opus 5, Sonnet 5 and Haiku 4.5 — offer a 200K-token context window at standard pricing. Input plus output must fit within it; the bars above include your expected output.
How does prompt caching change the cost?
Anthropic bills cache reads at 10% of the input price (2.5% on Fable 5.1) for prompt prefixes you reuse across requests, with a one-time write premium. If your system prompt is large and stable, the effective input cost in the table can fall by up to 90% on the cached portion. The table shows uncached prices; treat it as the ceiling.
Which Claude model is cheapest?
Haiku 4.5 at $1 per million input tokens and $5 per million output. Sonnet 5 is $2/$10, Opus 5 is $5/$25, and Fable 5.1 is $10/$50 (prices verified September 2026). Per request, the gap is what the table shows for your actual prompt.
Guides for this tool.
- How many tokens is my prompt? GPT, Claude and Gemini counted on the same text
The four-characters-per-token rule breaks budgets. How each provider actually tokenizes English, code, JSON and other languages, why the counts differ, and how to get an exact number without sending your prompt anywhere.