Count tokens, estimate costs for GPT-4, Claude, Gemini, Llama & more
| Model | Input | Output | Your Cost (Input) |
|---|---|---|---|
| GPT-4o | $2.50 | $10.00 | $0.000000 |
| GPT-4 Turbo | $10.00 | $30.00 | $0.000000 |
| GPT-4 | $30.00 | $60.00 | $0.000000 |
| GPT-3.5 Turbo | $0.50 | $1.50 | $0.000000 |
| Claude 3.5 Sonnet | $3.00 | $15.00 | $0.000000 |
| Claude 3 Opus | $15.00 | $75.00 | $0.000000 |
| Claude 3 Haiku | $0.25 | $1.25 | $0.000000 |
| Gemini 1.5 Pro | $1.25 | $5.00 | $0.000000 |
| Gemini 1.5 Flash | $0.07 | $0.30 | $0.000000 |
| Llama 3.1 70B | $0.88 | $0.88 | $0.000000 |
| Mistral Large | $3.00 | $9.00 | $0.000000 |
What is a token? Tokens are chunks of text that LLMs process. A token can be a word, part of a word, or punctuation. On average, 1 token ≈ 4 characters or ≈ 0.75 words in English.
Why does this matter? API pricing is based on tokens. Understanding token counts helps you estimate costs and stay within context limits (e.g., GPT-4 Turbo: 128K tokens).
Note: This is an estimate. Actual token counts vary by model tokenizer. Use official tools for exact counts (e.g., OpenAI Tokenizer, Anthropic Token Counter).
Approximately 1,333 tokens. The general rule is 1 word ≈ 1.33 tokens for English text.
GPT-4 Turbo is faster, cheaper, and has a larger context window (128K vs 8K tokens) compared to standard GPT-4.
Gemini 1.5 Flash is currently one of the cheapest at $0.075/1M input tokens. Claude 3 Haiku is also very affordable at $0.25/1M.
Yes! Code typically uses more tokens due to special characters. Non-English languages (especially non-Latin scripts) can use 2-3x more tokens.