← Token Counter

Claude Token Counter: Counting Tokens for Claude 5.5

Claude doesn't publish its tokenizer — here's how to estimate token counts and cost accurately before you send a request.

The short answer

For Claude 5.5 models (Opus, Sonnet, Haiku), an exact token count requires Anthropic's own token counting (available through the API). For everyday budgeting, the free token counter on this site approximates Claude with the cl100k_base encoder — usually within a few percent for English prose — and shows the resulting cost per model instantly.

Why approximation? Tokenizers are model-specific. Anthropic's tokenizer vocabulary differs from OpenAI's, so the same sentence can be a couple of tokens shorter or longer. For billing-critical numbers, use Anthropic's official counting endpoint; for “roughly how much will this prompt cost”, the in-browser estimate is the fastest answer.

Claude 5.5 lineup and prices

ModelInput price / 1M tokensContext windowBest for
Claude Opus 5.5$4.001MHard reasoning, long-form analysis
Claude Sonnet 5.5$2.001MDefault choice — quality/price sweet spot
Claude Haiku 5.5$0.101MHigh-volume classification, extraction

List input prices as of Nov 2026. Output tokens cost more; verify on anthropic.com/pricing.

What a Claude request really costs

Input price is only half the story — every request also pays for the output, and every multi-turn conversation re-sends the whole history as input:

WorkloadTokensSonnet 5.5 input costOpus 5.5 input cost
Short chat turn≈ 2,000$0.004$0.008
20-page document review≈ 30,000$0.06$0.12
Codebase slice≈ 200,000$0.40$0.80
Near-full context≈ 900,000$1.80$3.60

The multi-turn trap: ten follow-up questions on a 30K-token document re-send roughly 30K tokens each turn, so the session costs ten times the first message — about $0.60 on Sonnet, before any output.

Where Claude tokens surprise people

CJK text

Chinese, Japanese and Korean text usually runs near one token per character — roughly 3–4× the token density of English. A “short” Chinese prompt can cost a long English one.

Code and structured data

Indentation, brackets and JSON keys are token-dense. A 500-line file can exceed 5,000 tokens — count it before pasting a whole module into a conversation.

System prompts

Long personality/instruction blocks are re-billed every turn. Trimming a 1,500-token system prompt to 400 tokens saves 1,100 input tokens × every request — the single cheapest optimisation in most Claude deployments.

Practical workflow

  1. Paste your prompt into the token counter — it shows the estimated Claude count and the exact cost across Sonnet, Opus and Haiku.
  2. If the estimate is too high, cut the system prompt first, then the retrieved context, then the history.
  3. Route by task: Haiku for throughput, Sonnet by default, Opus only when Sonnet visibly fails.
  4. For legal/compliance-grade billing numbers, confirm with Anthropic's official token counting endpoint.

FAQ

Can I count Claude tokens exactly in the browser?

Not exactly — Anthropic doesn't publish its tokenizer. This site approximates with cl100k_base and labels Claude rows as ≈. For billing-critical counts use Anthropic's API.

How much is Sonnet 5.5 per 1M tokens?

$2.00 input, $4.00 for Opus 5.5 and $0.10 for Haiku 5.5 (list prices, Nov 2026).

Why does the same text give different counts for GPT and Claude?

Different tokenizer vocabularies. Neither count is “wrong” — each is correct for its own provider.