Free Claude token counter · Runs in your browser

Count Claude tokens, and what they cost

Paste any text or code and instantly see the token estimate plus the price on Opus, Sonnet, and Haiku, as input and as output, including cache rates. No signup, nothing uploaded.

text

Paste something to count. Rough rule: 1 token ≈ 4 characters of English, less for code.

100% client-side · nothing uploaded · calibrated for prose and code

Claude API pricing

The full price table, one place

Per million tokens, July 2026. Output always costs ~5× input; cache reads cost 90% less than fresh input, the two facts that explain most Claude bills.

🧠

Claude Opus

Input $15 / MTok · Output $75 / MTok
Cache write $18.75 · Cache read $1.5
The heavyweight, for the hardest reasoning and agentic work.

⚖️

Claude Sonnet

Input $3 / MTok · Output $15 / MTok
Cache write $3.75 · Cache read $0.3
The default, best cost/intelligence balance for coding.

Claude Haiku

Input $1 / MTok · Output $5 / MTok
Cache write $1.25 · Cache read $0.1
The economy tier, classification, extraction, high-volume calls.

How tokens work

Four facts that make bills predictable

~4 characters per token

English prose averages 3.5–4 characters (≈0.75 words) per token. 'The quick brown fox' is 4 tokens; this whole sentence is about 12.

Code tokenizes heavier

Brackets, operators, and camelCase identifiers split into more tokens per character, budget 25–40% more than prose. This counter detects code and adjusts.

You pay both directions

Every call bills the entire prompt (input) plus the response (output), and in a conversation, the whole history is re-sent as input each turn. Long chats compound.

Caching changes everything

Repeated context (system prompts, codebases) can be cached: 25% extra to write, 90% off to read. It's why Claude Code can hold your repo in context affordably.

FAQ

Token counting questions

How do I get an exact token count?+
Use the API's free count_tokens endpoint, it runs the real tokenizer server-side. For planning, budgeting, and prompt-size sanity checks, this estimator's ±5% is plenty.
Do Claude and GPT count tokens the same way?+
No, every model family has its own tokenizer, so the same text produces different counts. The differences are usually within ~10–20% for English, but never assume counts transfer between providers.
How many tokens fit in Claude's context window?+
Claude models offer 200K-token context windows (with 1M-token tiers available on some models). 200K tokens is roughly 150,000 words, about two novels, but remember: everything in context is billed as input on every call.
Why did my agent workflow cost more than this estimate?+
Agents loop: each tool call re-sends the conversation as input, and system prompts, tool definitions, and file contents all count. Multiply per-call cost by turns, and use cache pricing for the repeated prefix, or just measure real usage with ccusage and our Claude Code Wrapped tool.
Is my text stored or sent anywhere?+
No. The counter is client-side JavaScript, your text never leaves the browser.
Go further

Spend those tokens on real work

The AgentsKit kits are token-efficient by design, tight skills, scoped agents, and commands that get more done per call, for engineering and marketing.

🛠️
Most popular

Engineering Kit

Battle-tested Claude skills & workflows for builders.

  • 58 agents · 61 skills · 159 commands
  • Security, testing & code-review skills
  • Every skill formatted to spec
  • Lifetime updates
Get the Engineering Kit
📣
For founders

Marketing Kit

Turn Claude into your growth team.

  • 31 agents · 61 skills · 32 commands
  • Content, SEO & email-sequence skills
  • Landing-page & funnel templates
  • Lifetime updates
Get the Marketing Kit

Or grab all 89 agents, 122 skills & 181 commands in the Complete Bundle →