Claude Token Counter

Anthropic hasn't published Claude's tokenizer, so nobody can give you an exact browser-side count. We give you an honest heuristic estimate — and a way to get the exact number from Anthropic's own API.

…tokens estimated
0characters
0words

Anthropic has not published its tokenizer, so this is an industry-standard heuristic (~3.5 characters per token for English). Treat it as a rough estimate, not a bill.

What this text would cost, per model

Sorted cheapest first. Assumes 0 input tokens and 500 output tokens. Counts for non-OpenAI rows are estimates.

ModelInput / 1MOutput / 1MEst. costWith cache hits
Gemini 2.5 Flash-Lite · Google$0.1$0.4$0.0002—
GPT-6 Luna · OpenAI$0.1$0.5$0.00025$0.00025
DeepSeek-V4.1 Flash · DeepSeek$0.15$0.6$0.0003$0.0003
DeepSeek-V4 Pro · DeepSeek$0.66$1.98$0.00099—
Gemini 3.8 Flash · Google$0.75$3.75$0.001875—
Claude Haiku 4.5 · Anthropic$1$5$0.0025$0.0025
GPT-6 Sol · OpenAI$2$10$0.005$0.005
Claude Sonnet 5 · Anthropic$2$10$0.005$0.005
Claude Sonnet 5.5 · Anthropic$2$10$0.005—
Gemini 3.1 Pro Preview · Google$2$12$0.006—
Claude Opus 5.5 · Anthropic$4$20$0.01$0.01
Claude Opus 5 · Anthropic$5$25$0.0125$0.0125
GPT-6 Astra · OpenAI$10$50$0.025—
Claude Fable 5.1 · Anthropic$10$50$0.025$0.025

“With cache hits” assumes all input tokens hit the prompt cache, where the provider publishes a cached-input rate. DeepSeek rows use off-peak rates; peak hours cost 2×.

Prices change frequently — last verified 2026-09-30. Rates below are USD per 1M tokens from public pricing pages. Always confirm on the provider's official pricing page before budgeting.

Want an exact count? Use the official API

The counter above is a heuristic estimate. Anthropic publishes an official token-counting endpoint (POST /v1/messages/count_tokens, model claude-sonnet-5). If you have an API key, you can call it right here — the key stays in your browser and is sent only to Anthropic's API. We never see or store it.

About Claude token counting

Claude models bill per token, but unlike OpenAI, Anthropic does not ship a public tokenizer library. Some tools quietly run OpenAI's tiktoken and present the result as a Claude count — Anthropic's own documentation says not to do that. This page takes the other approach: a transparent estimate up front, and the official count_tokens endpoint when you need precision.

Comparing providers? The main LLM token counter puts Claude side by side with OpenAI, Google, and DeepSeek pricing.

Frequently asked questions

Why is the Claude count only an estimate?

Anthropic has not published a standalone tokenizer for Claude models, and explicitly advises against using OpenAI's tiktoken to estimate Claude tokens. Without the real tokenizer, any client-side counter is a heuristic — we label ours as such instead of pretending it is exact.

How is the estimate calculated?

We use a widely-used heuristic of roughly 3.5 characters per token for English text. Code, non-English text, and heavy formatting can deviate significantly, so treat the number as a rough guide.

How can I get an exact Claude token count?

Anthropic's official count_tokens API (POST /v1/messages/count_tokens) returns exact counts. Enable the panel above with your own API key and this page will call it directly from your browser — the key never leaves your device.

Does the cost table below use the estimate too?

Yes. Every cost figure on this page is based on the estimated token count. For budgeting, get an exact count from the API panel first, then multiply by the per-million-token rates.

Which Claude models are covered?

The table covers current Claude API models: Haiku 4.5, Sonnet 5, Sonnet 5.5, Opus 5, Opus 5.5, and Fable 5.1, with input, output, and cached-input rates from public pricing pages.