M
MoneyMath

AI Token Counter — GPT, Claude, Gemini

Paste text. See token counts across every major LLM in one table — plus API cost per call and how much of the context window you've used. No SDK install required.

🟢 Updated April 2026👤 Reviewed by MoneyMath Editorial⚡ Runs in your browser · inputs never leave your device
107 chars · 18 words

Typical chat reply: 200–1,000 tokens. Long essay: 2,000–4,000. Summaries: 100–400.

Cheapest for this call
Gemini 2.5 Flash
$0.00 per call
Show the formula
input tokens ≈ character count / chars-per-token
cost = (input / 1M) × input-price + (output / 1M) × output-price
context % = input tokens / model context window

Full breakdown by model

ModelInput tokensContext %Input $Output $Total
GPT-4o / GPT-4o-mini290.0%$0.00$0.01$0.01
GPT-4 Turbo290.0%$0.00$0.02$0.02
GPT-3.5 Turbo270.2%$0.00$0.00$0.00
Claude Opus 4300.0%$0.00$0.04$0.04
Claude Sonnet 4300.0%$0.00$0.01$0.01
Claude Haiku 4300.0%$0.00$0.00$0.00
Gemini 2.5 Pro280.0%$0.00$0.00$0.00
Gemini 2.5 Flash280.0%$0.00$0.00$0.00

How token counting actually works

Tokens are sub-word units each model's tokenizer produces. English averages roughly 3.6–4.0 characters per token, but this varies: code has more tokens per char (symbols tokenize tight), Chinese/Japanese have fewer chars per token (multi-byte).

Estimation vs exact counting

This tool uses a character-based estimate (±5% vs exact tokenizers) — fast enough to run on every keystroke in your browser. For byte-accurate counts, install tiktoken (OpenAI), @anthropic-ai/tokenizer (Claude), or Google's Gemini tokenizer.

Context window — what "2M tokens" actually costs

Gemini 2.5 Pro's 2M context window sounds free, but you pay for every token you put in. Cramming a 1M-token book costs $1,250 per API call at $1.25/1M input. Use context deliberately.

Frequently Asked Questions

Why are my counts slightly different from OpenAI's tokenizer?

We use a character-based approximation (~96% accuracy) so this runs instantly in-browser without downloading a 3MB tokenizer. For byte-exact counts on a single prompt, use platform.openai.com/tokenizer or the official SDK tokenizer library.

Do prompt caching and batch APIs reduce the cost?

Yes — often 50–90%. OpenAI caches prompts with identical prefixes at 50% off. Anthropic prompt caching is 90% off for cache hits. Batch API (24-hour turnaround) is 50% off on both. Factor these in for production workloads.

How do I count tokens for images or audio?

Images: OpenAI uses ~85 tokens per 512×512 tile (detail=low) or 170+ tiles at high detail. Claude uses ~1,300 tokens per 1,000×1,000 image. Audio (Whisper, Gemini): roughly 1 token per 4 seconds of speech.

Is the data I paste being sent anywhere?

No. This calculator runs entirely in your browser — text never leaves your device. Check your DevTools Network tab if you want to verify.