Token Calculator for LLMs
Free AI token counter for GPT-5 class models, Claude Opus, Gemini, and other LLMs—estimate context length and API usage before you ship.
How to Use
Paste your text
Paste or type prompts, system messages, or API payloads into the text area. Everything runs locally in your browser—nothing is uploaded.
View token count
Token counts use the same family of byte-pair encodings as modern OpenAI chat models (o200k_base), giving a strong estimate for English and mixed text.
Compare API costs
Multiply tokens by your provider's per-1K rates for GPT-5.x, Claude Opus, Gemini, or other LLMs. Check each vendor's pricing page for the latest numbers.
Optimize your prompts
Watch words and tokens together. Shorter system prompts, fewer examples, and tighter instructions usually reduce cost and latency.
Understanding tokenization
Large language models do not read characters the way humans do. Instead, a tokenizer splits text into tokens—short fragments that map to integers the neural network can process. The same sentence can produce different token counts on different families of models because each vendor may use its own vocabulary and merge rules.
For OpenAI-style chat models, BPE encodings such as cl100k and o200k are widely used. WiseCrew\'s calculator uses o200k_base, which tracks closely with GPT-4o-era tokenization for everyday English and code. That makes it a practical universal tokenizer estimate when you are designing prompts or comparing rough costs across providers—always confirm with the exact model you bill against when precision is critical.
A rough rule of thumb is that one token is about 4 characters or ¾ of a word in English, but short words, numbers, and emojis can deviate. For high-stakes budgeting, combine this tool with your API dashboard.
Word-to-Token Conversion Guide
Token counts vary significantly based on content type and language. Use this reference to estimate token usage before running your text through the calculator.
| Content Type | Example | Ratio | 1000 Words ≈ | Notes |
|---|---|---|---|---|
| English Text | Hello world | ~1.3 tokens/word | ~1,300–1,500 | Standard prose averages ~1.3 tokens per word. |
| Code (Python/JS) | def func(): | ~2–3 tokens/word | ~2,000–3,000 | Symbols, operators, and syntax increase token count. |
| Chinese/Japanese | 你好世界 | ~2+ tokens/char | ~2,000+ | CJK characters often split into multiple tokens. |
| Technical Writing | API endpoint | ~1.5 tokens/word | ~1,500–1,800 | Technical terms and abbreviations vary. |
| JSON/XML Data | {"key":"value"} | ~3–4 tokens/word | ~3,000–4,000 | Structural characters add significant overhead. |
Compare Token Costs
Compare API pricing across major LLM providers. Prices shown are per 1 million tokens. The calculated prices below reflect the cost for your current input text.
| Model | Provider | Context | Input/1M Tokens | Input(Cached)/1M Tokens | Output/1M Tokens | Input Price | Input(cached) Price | Output Price |
|---|---|---|---|---|---|---|---|---|
| GPT-5.4 | OpenAI | 1M | $2.50 | $0.25 | $15.00 | $0.00 | $0.00 | $0.00 |
| GPT-5 mini | OpenAI | 400K | $0.25 | $0.03 | $2.00 | $0.00 | $0.00 | $0.00 |
| GPT-4o | OpenAI | 128K | $2.50 | $1.25 | $10.00 | $0.00 | $0.00 | $0.00 |
| GPT-4o mini | OpenAI | 128K | $0.15 | $0.08 | $0.60 | $0.00 | $0.00 | $0.00 |
| o3 | OpenAI | 200K | $10.00 | $2.50 | $40.00 | $0.00 | $0.00 | $0.00 |
| o4-mini | OpenAI | 200K | $1.10 | $0.28 | $4.40 | $0.00 | $0.00 | $0.00 |
| Claude Opus 5 | Anthropic | 200K | $5.00 | $0.50 | $25.00 | $0.00 | $0.00 | $0.00 |
| Claude Sonnet 5 | Anthropic | 200K | $3.00 | $0.30 | $15.00 | $0.00 | $0.00 | $0.00 |
| Claude Haiku 4.5 | Anthropic | 200K | $1.00 | $0.10 | $5.00 | $0.00 | $0.00 | $0.00 |
| Claude Haiku 3.5 | Anthropic | 200K | $0.80 | $0.08 | $4.00 | $0.00 | $0.00 | $0.00 |
| Gemini 3 Flash | 1M | $0.50 | $0.13 | $3.00 | $0.00 | $0.00 | $0.00 | |
| Gemini 2.5 Pro | 2M | $1.25 | $0.31 | $10.00 | $0.00 | $0.00 | $0.00 | |
| Gemini 2.5 Flash | 1M | $0.30 | $0.08 | $2.50 | $0.00 | $0.00 | $0.00 | |
| Gemini 2.5 Flash-Lite | 1M | $0.10 | $0.03 | $0.40 | $0.00 | $0.00 | $0.00 | |
| Gemini 2.0 Flash | 1M | $0.10 | $0.03 | $0.40 | $0.00 | $0.00 | $0.00 | |
| Gemini 2.0 Flash-Lite | 1M | $0.08 | $0.00 | $0.30 | $0.00 | $0.00 | $0.00 | |
| Llama 4 Maverick | Meta | 1M | $0.27 | $0.00 | $0.85 | $0.00 | $0.00 | $0.00 |
| Llama 4 Scout | Meta | 128K | $0.18 | $0.00 | $0.59 | $0.00 | $0.00 | $0.00 |
| Llama 3.3 70B | Meta | 128K | $0.23 | $0.00 | $0.40 | $0.00 | $0.00 | $0.00 |
| Llama 3.1 405B | Meta | 128K | $1.00 | $0.00 | $3.00 | $0.00 | $0.00 | $0.00 |
| Llama 3.1 8B | Meta | 128K | $0.05 | $0.00 | $0.08 | $0.00 | $0.00 | $0.00 |
| DeepSeek V3 | DeepSeek | 64K | $0.27 | $0.07 | $1.10 | $0.00 | $0.00 | $0.00 |
| DeepSeek R1 | DeepSeek | 64K | $0.55 | $0.14 | $2.19 | $0.00 | $0.00 | $0.00 |
| Mistral Large 2 | Mistral AI | 128K | $2.00 | $0.00 | $6.00 | $0.00 | $0.00 | $0.00 |
| Mistral Small 3 | Mistral AI | 128K | $0.10 | $0.00 | $0.30 | $0.00 | $0.00 | $0.00 |
| Grok 3 mini | xAI | 131K | $0.30 | $0.00 | $0.50 | $0.00 | $0.00 | $0.00 |
| Command R | Cohere | 128K | $0.15 | $0.00 | $0.60 | $0.00 | $0.00 | $0.00 |
| Embed v3 English | Cohere | 512K | $0.10 | $0.00 | $0.00 | $0.00 | $0.00 | $0.00 |
| Rerank v3 | Cohere | 4K | $2.00 | $0.00 | $0.00 | $0.00 | $0.00 | $0.00 |
| text-embedding-3-large | OpenAI | 8K | $0.13 | $0.00 | $0.00 | $0.00 | $0.00 | $0.00 |
| Gemma 3 12B | 128K | $0.12 | $0.00 | $0.12 | $0.00 | $0.00 | $0.00 | |
| Ministral 8B | Mistral AI | 128K | $0.10 | $0.00 | $0.10 | $0.00 | $0.00 | $0.00 |
| Ministral 3B | Mistral AI | 128K | $0.04 | $0.00 | $0.04 | $0.00 | $0.00 | $0.00 |
| Mistral Embed | Mistral AI | 8K | $0.10 | $0.00 | $0.00 | $0.00 | $0.00 | $0.00 |
| Qwen 3 72B | Alibaba | 128K | $0.90 | $0.00 | $0.90 | $0.00 | $0.00 | $0.00 |
| Qwen 3 32B | Alibaba | 128K | $0.40 | $0.00 | $0.40 | $0.00 | $0.00 | $0.00 |
| QwQ 32B | Alibaba | 128K | $0.90 | $0.00 | $0.90 | $0.00 | $0.00 | $0.00 |
| Qwen 3 14B | Alibaba | 128K | $0.15 | $0.00 | $0.15 | $0.00 | $0.00 | $0.00 |
| Llama 3.2 3B | Meta | 128K | $0.06 | $0.00 | $0.06 | $0.00 | $0.00 | $0.00 |
| DeepSeek R1 Distill Llama 70B | DeepSeek | 128K | $0.88 | $0.00 | $0.88 | $0.00 | $0.00 | $0.00 |
| o1 | OpenAI | 200K | $15.00 | $7.50 | $60.00 | $0.00 | $0.00 | $0.00 |
| o1-mini | OpenAI | 128K | $1.10 | $0.55 | $4.40 | $0.00 | $0.00 | $0.00 |
| o3-mini | OpenAI | 200K | $1.10 | $0.55 | $4.40 | $0.00 | $0.00 | $0.00 |
| text-embedding-3-small | OpenAI | 8K | $0.02 | $0.00 | $0.00 | $0.00 | $0.00 | $0.00 |
| Claude Opus 4 | Anthropic | 200K | $15.00 | $1.50 | $75.00 | $0.00 | $0.00 | $0.00 |
| Claude Sonnet 4 | Anthropic | 200K | $3.00 | $0.30 | $15.00 | $0.00 | $0.00 | $0.00 |
| Claude 3.5 Haiku | Anthropic | 200K | $0.80 | $0.08 | $4.00 | $0.00 | $0.00 | $0.00 |
| Gemini 3 Pro | 2M | $2.50 | $0.63 | $15.00 | $0.00 | $0.00 | $0.00 | |
| Gemma 3 27B | 128K | $0.27 | $0.00 | $0.27 | $0.00 | $0.00 | $0.00 | |
| Gemma 3 4B | 128K | $0.04 | $0.00 | $0.04 | $0.00 | $0.00 | $0.00 | |
| Llama 3.1 70B | Meta | 128K | $0.68 | $0.00 | $0.88 | $0.00 | $0.00 | $0.00 |
| Llama 3.2 11B Vision | Meta | 128K | $0.18 | $0.00 | $0.18 | $0.00 | $0.00 | $0.00 |
| Llama 3.2 90B Vision | Meta | 128K | $0.90 | $0.00 | $0.90 | $0.00 | $0.00 | $0.00 |
| Mistral Large 2411 | Mistral AI | 128K | $2.00 | $0.00 | $6.00 | $0.00 | $0.00 | $0.00 |
| Mixtral 8×22B | Mistral AI | 64K | $1.20 | $0.00 | $1.20 | $0.00 | $0.00 | $0.00 |
| Mixtral 8×7B | Mistral AI | 32K | $0.24 | $0.00 | $0.24 | $0.00 | $0.00 | $0.00 |
| Codestral | Mistral AI | 256K | $0.30 | $0.00 | $0.90 | $0.00 | $0.00 | $0.00 |
| DeepSeek R1 Distill Qwen 32B | DeepSeek | 128K | $0.50 | $0.00 | $0.50 | $0.00 | $0.00 | $0.00 |
| DeepSeek V2.5 | DeepSeek | 64K | $0.14 | $0.00 | $0.28 | $0.00 | $0.00 | $0.00 |
| Grok 3 | xAI | 131K | $3.00 | $0.00 | $15.00 | $0.00 | $0.00 | $0.00 |
| Grok 2 | xAI | 131K | $2.00 | $0.00 | $10.00 | $0.00 | $0.00 | $0.00 |
| Command R+ | Cohere | 128K | $2.50 | $0.00 | $10.00 | $0.00 | $0.00 | $0.00 |
| Embed English v3 | Cohere | 4K | $0.10 | $0.00 | $0.00 | $0.00 | $0.00 | $0.00 |
| Qwen 3 7B | Alibaba | 128K | $0.06 | $0.00 | $0.06 | $0.00 | $0.00 | $0.00 |
| Qwen 2.5 72B | Alibaba | 128K | $0.60 | $0.00 | $0.60 | $0.00 | $0.00 | $0.00 |
| Amazon Nova Pro | Amazon | 300K | $0.80 | $0.00 | $3.20 | $0.00 | $0.00 | $0.00 |
| Amazon Nova Lite | Amazon | 300K | $0.06 | $0.00 | $0.24 | $0.00 | $0.00 | $0.00 |
| Amazon Nova Micro | Amazon | 128K | $0.04 | $0.00 | $0.14 | $0.00 | $0.00 | $0.00 |
| Jamba 1.5 Large | AI21 Labs | 256K | $2.00 | $0.00 | $8.00 | $0.00 | $0.00 | $0.00 |
| Jamba 1.5 Mini | AI21 Labs | 256K | $0.20 | $0.00 | $0.40 | $0.00 | $0.00 | $0.00 |
| Sonar Pro | Perplexity | 200K | $3.00 | $0.00 | $15.00 | $0.00 | $0.00 | $0.00 |
| Sonar | Perplexity | 128K | $1.00 | $0.00 | $1.00 | $0.00 | $0.00 | $0.00 |
| Palmyra X5 | Writer | 1M | $6.00 | $0.00 | $24.00 | $0.00 | $0.00 | $0.00 |
| Palmyra X4 | Writer | 128K | $2.50 | $0.00 | $10.00 | $0.00 | $0.00 | $0.00 |
| Snowflake Arctic | Snowflake | 4K | $0.01 | $0.00 | $0.02 | $0.00 | $0.00 | $0.00 |
| Yi Large | 01.AI | 32K | $3.00 | $0.00 | $3.00 | $0.00 | $0.00 | $0.00 |
| FireFunction v2 | Fireworks AI | 8K | $0.90 | $0.00 | $0.90 | $0.00 | $0.00 | $0.00 |
| Inflection 3 Pi | Inflection | 8K | $2.50 | $0.00 | $10.00 | $0.00 | $0.00 | $0.00 |
| Llama 3.3 70B (Groq) | Groq | 128K | $0.59 | $0.00 | $0.79 | $0.00 | $0.00 | $0.00 |
| Llama 3.1 8B (Groq) | Groq | 128K | $0.05 | $0.00 | $0.08 | $0.00 | $0.00 | $0.00 |
| Mixtral 8×7B (Groq) | Groq | 32K | $0.24 | $0.00 | $0.24 | $0.00 | $0.00 | $0.00 |
| Gemma 3 27B (Groq) | Groq | 128K | $0.27 | $0.00 | $0.27 | $0.00 | $0.00 | $0.00 |
| Qwen 2.5 Coder 32B | Alibaba | 128K | $0.20 | $0.00 | $0.20 | $0.00 | $0.00 | $0.00 |
| DeepSeek R1 Distill Qwen 7B | DeepSeek | 128K | $0.15 | $0.00 | $0.15 | $0.00 | $0.00 | $0.00 |
| Phi-4 | Microsoft | 16K | $0.07 | $0.00 | $0.14 | $0.00 | $0.00 | $0.00 |
| Phi-4 Mini | Microsoft | 16K | $0.03 | $0.00 | $0.05 | $0.00 | $0.00 | $0.00 |
| StableLM 2 12B | Stability AI | 4K | $0.10 | $0.00 | $0.10 | $0.00 | $0.00 | $0.00 |
| Sky-T1 32B | NovaSky | 32K | $1.20 | $0.00 | $1.20 | $0.00 | $0.00 | $0.00 |
| GPT-4.5 | OpenAI | 128K | $75.00 | $37.50 | $150.00 | $0.00 | $0.00 | $0.00 |
| GPT-Image-1 | OpenAI | 128K | $5.00 | $0.00 | $40.00 | $0.00 | $0.00 | $0.00 |
| Gemini 1.5 Pro | 2M | $1.25 | $0.31 | $5.00 | $0.00 | $0.00 | $0.00 | |
| Gemini 1.5 Flash | 1M | $0.08 | $0.02 | $0.30 | $0.00 | $0.00 | $0.00 | |
| Llama 3.1 70B Turbo | Meta | 128K | $0.54 | $0.00 | $0.54 | $0.00 | $0.00 | $0.00 |
| Mistral 7B | Mistral AI | 32K | $0.10 | $0.00 | $0.10 | $0.00 | $0.00 | $0.00 |
| Pixtral 12B | Mistral AI | 128K | $0.15 | $0.00 | $0.15 | $0.00 | $0.00 | $0.00 |
| Grok 3 Mini Fast | xAI | 131K | $0.60 | $0.00 | $4.00 | $0.00 | $0.00 | $0.00 |
| Llama 3.3 70B (Cerebras) | Cerebras | 128K | $0.60 | $0.00 | $0.60 | $0.00 | $0.00 | $0.00 |
| Llama 3.1 8B (Cerebras) | Cerebras | 128K | $0.10 | $0.00 | $0.10 | $0.00 | $0.00 | $0.00 |
Last verified: 2026-08-20. Pricing changes frequently. Verify in your provider dashboard before budgeting. Data sources.
FAQ
Have more questions? Contact us