LLM Token Counter — GPT-4, Claude, Gemini Tokenization Comparison
Free online LLM token counter. Compare how OpenAI GPT-4 / GPT-4o, Anthropic Claude, and Google Gemini tokenize your text. Includes character / word counts and estimated API cost.
Token Count by Model
GPT-4 / GPT-4o
0 tokens
—
GPT-3.5 Turbo
0 tokens
—
Claude 3.7 Sonnet*
0 tokens
—
Gemini 2.0 Flash*
0 tokens
—
* Claude / Gemini are BPE estimates and may differ from official tokenizers by ±5%. OpenAI counts are exact (uses tiktoken).
What is a Token?
LLMs process text by tokens (sub-word chunks), not characters or words. 1 English token ≈ 4 characters ≈ 0.75 words. 1 Chinese character ≈ 1.5-2 tokens. Token count directly determines API cost and context window usage — the core cost metric in LLM development.
When to use Token Counter?
- 📊 Budget estimation: calculate cost before making API calls
- 📏 Context trimming: trim long text to fit the model's max context window
- 🔀 Cross-model comparison: see token differences across GPT / Claude / Gemini for the same text
- 🛠️ Prompt optimization: spot redundant prompts via token count
API Pricing Reference (May 2026)
| Model | Input | Output |
|---|---|---|
| GPT-4o | $2.50 / 1M | $10.00 / 1M |
| GPT-3.5 Turbo | $0.50 / 1M | $1.50 / 1M |
| Claude 3.7 Sonnet | $3.00 / 1M | $15.00 / 1M |
| Gemini 2.0 Flash | $0.075 / 1M | $0.30 / 1M |