LLM Token Counter & Cost Calculator
Estimate token counts and compare API costs across Claude, GPT, and Gemini — paste text, pick a model, get an instant cost estimate.
How the token estimate works
This tool estimates tokens with a characters-per-token heuristic (about 4 characters per token for typical English). Real tokenizers differ by model and language, so treat the number as a budgeting estimate — for exact counts, use each provider's official token-counting endpoint. The cost calculator multiplies your input and output token counts by the model's per-million-token prices.
About the prices
Claude prices reflect published Anthropic list pricing (Opus 4.8 $5/$25, Sonnet 5 $3/$15, Haiku 4.5 $1/$5, Fable 5 $10/$50 per 1M input/output tokens). GPT and Gemini entries are approximate and provided for comparison — every price field is editable, so adjust them to match your current contract or a newly released model.
Tips to cut LLM cost
- Use prompt caching for large, repeated context — cached reads cost a fraction of full input price.
- Pick the smallest model that meets quality needs; reserve the top tier for hard tasks.
- Cap output tokens and stream — output tokens are usually the most expensive part.