Skip to main content
chudi.dev
calculate Free Tool

Claude Token Counter & Cost Calculator

Paste a prompt to estimate its token count, then see exactly what it costs on Claude Fable 5, Opus 4.8, Sonnet 5, or Haiku 4.5, compared against GPT and Gemini.

~0 tokens 0 words · 0 chars

Estimate only, not an exact tokenizer count. Averages a ~4-chars/token heuristic with a word-based cross-check (char-based: 0, word-based: 0). Claude's actual BPE tokenizer can differ by 10-20% depending on content. For an exact count, use the Messages API's count_tokens endpoint.

Claude cost calculator

$0.00

per request

$0.00

per month

Prices as of 2026-07-21, source: https://platform.claude.com/docs/en/about-claude/pricing.

LLM cost comparison

Same 0 input / 0 output tokens, 1,000 requests/month, across providers.

ModelProvider$/MTok in/outMonthly cost
Claude Fable 5Anthropic$10/$50$0.00
Claude Opus 4.8Anthropic$5/$25$0.00
Claude Sonnet 5Anthropic$2/$10$0.00
Claude Haiku 4.5Anthropic$1/$5$0.00
GPT-5.6OpenAI$5/$30$0.00
GPT-5.6 TerraOpenAI$2.5/$15$0.00
GPT-5.6 LunaOpenAI$1/$6$0.00
Gemini 3.1 ProGoogle$2/$12$0.00
Gemini 3.5 FlashGoogle$1.5/$9$0.00

Sources: Anthropic (official pricing), OpenAI (official pricing), Google (official pricing, verify before relying on it for a purchase decision). All rates as of 2026-07-21.

Why token count alone isn't enough

Most token counters stop at a number. That number is only useful once you attach a price to it, because the same prompt can cost 10x more or less depending on which model you route it to. This tool exists to close that gap: count the tokens, then immediately see the dollar cost per request and per month, per model, side by side with what the same prompt would cost on GPT or Gemini.

If you're optimizing spend across a fleet of models, progressive disclosure cuts token usage 40-60% before you ever touch model choice. And if you're deciding which Claude tier to route a task to, the Fable 5 vs Opus 4.8 cost-per-task breakdown has the routing math.

FAQ

How accurate is this token counter?
It's an estimate, not an exact tokenizer count. It averages a ~4-characters-per-token heuristic with a word-based cross-check, which typically lands within 10-20% of Claude's real BPE tokenizer. For an exact count, use the Messages API's count_tokens endpoint before sending a request.
Why pair a token counter with a cost calculator?
Token counts alone don't tell you what a prompt costs. This tool multiplies your estimated input/output tokens by the current per-model rate so you can see the dollar impact of a prompt, a model choice, or a monthly volume before you commit to it.
Does this tool send my text anywhere?
No. Token counting and cost calculation run entirely in your browser with JavaScript. Nothing you paste is sent to a server or stored.
Which Claude model should I use for cost efficiency?
Haiku 4.5 is cheapest per token and fine for simple, high-volume tasks. Sonnet 5 is the mid-tier default for most production workloads. Opus 4.8 and Fable 5 cost more per token but handle harder reasoning in fewer retries, which can be cheaper in practice for complex tasks.

Stay in the Loop

Get notified about new posts on AI, automation, and building in public.

No spam. Unsubscribe anytime.