Token Counter & Cost Estimator

Paste your prompt, see roughly how many tokens each model family will charge you for — and what the call costs before you send it. Estimates, not exact counts.

Advertisement

0 characters · 0 words

GPT family
≈ 0 tokens (est.)
Claude family
≈ 0 tokens (est.)
Grok family
≈ 0 tokens (est.)

Heuristic estimates — each provider's real tokenizer differs. Usually within ~20% for plain English; CJK and code vary more.

Cost estimator

Output ≈ input ×
Input cost: $0.00
Output cost: $0.00
Estimated total: $0.00 per call

Prices verified 2026-10-01 from public sources (see below). Providers change prices — confirm on the official pricing page before budgeting real spend.

Why count tokens outside the chat?

Chat apps never show you the meter running. When you move the same prompt to the API — for an agent loop, a batch job, or a RAG pipeline — every token has a price tag. A quick estimate before you send a 50-page document can be the difference between a $0.30 call and a $15 one.

How the estimates work

Real tokenizers (tiktoken for GPT, Anthropic's for Claude, xAI's for Grok) split text into subword pieces using vocabularies trained on massive corpora. This page approximates with a simple rule per family: roughly 1 token per ¾ of an English word, more per character for CJK text and code. Good enough for budgeting, not for billing disputes.

Price sources (verified 2026-10-01)

Claude Sonnet 5 $3/$15 and Opus 4.8 $5/$25 per 1M input/output tokens (Anthropic list prices, widely mirrored); Claude Haiku 4.5 $1/$5; Grok 4.7 $2/$6 (xAI pricing page, Sept 2026); GPT-5.5 $5/$30 (OpenAI list price at launch). Cached-input, long-context and batch tiers are not included — they can cut the bill significantly.

FAQ

Are these token counts exact?
No. Each provider uses its own tokenizer and none of them run in a page like this. Treat the numbers as heuristic estimates — usually within ~20% for plain English. For billing, trust your provider's dashboard.
Why do Claude, GPT and Grok show different counts?
Each model family tokenizes text differently, splitting words into different subword pieces. The gaps are small per sentence but compound over long documents.
Are the API prices current?
They were verified against public sources on 2026-10-01. Providers change prices and run promos, so confirm on the official pricing page before committing real spend.
Does my text leave my browser?
No. Counting and cost math happen entirely in JavaScript on your device. Nothing is uploaded anywhere.
Advertisement