Estimate tokens and project API costs for GPT-4o, Claude 3.5, Gemini 1.5, and more.
Paste any text or code below. Estimation uses ~4 characters per token (~0.75 words per token).
Characters
0
Words
0
Estimated tokens
0
This is an approximation. Exact tokenization varies by model and tokenizer (BPE, SentencePiece, etc.). For production-critical counts, use the official tokenizer for your provider.
Select a model to check context window fit and pricing.
Context window
128,000 tokens
Fit check
Auto-filled from your token count above. Toggle between input and output pricing.
| Volume | Per request | Per day | Per month (30 days) |
|---|---|---|---|
| Single request | $0.00 | $0.00 | $0.00 |
| 100 requests/day | $0.00 | $0.00 | $0.00 |
| 1,000 requests/day | $0.00 | $0.00 | $0.00 |
| 10,000 requests/day | $0.00 | $0.00 | $0.00 |
Approximate pricing — always check official provider pages for latest rates.
| Model | Provider | Context | Input / 1M | Output / 1M |
|---|---|---|---|---|
| GPT-4o | OpenAI | 128,000 | $2.50 | $10.00 |
| GPT-4 Turbo | OpenAI | 128,000 | $10.00 | $30.00 |
| GPT-3.5 Turbo | OpenAI | 16,385 | $0.50 | $1.50 |
| Claude 3.5 Sonnet | Anthropic | 200,000 | $3.00 | $15.00 |
| Claude 3 Opus | Anthropic | 200,000 | $15.00 | $75.00 |
| Gemini 1.5 Pro | 2,000,000 | $1.25 | $5.00 |
AI providers bill per token — sub-word units the model reads and writes. A token is roughly 4 characters or 0.75 words of English, though code, punctuation, and non-Latin scripts can shift that ratio significantly.
Input tokens cover everything you send: system prompt, conversation history, user message, tool definitions, and retrieved context. Output tokens are what the model generates. Output is typically 2–5× more expensive than input.
The context window is the hard cap on input + output tokens for a single request. Long conversations grow linearly because every prior turn is resent — caching and summarization keep costs in check.
To control spend: cap max_tokens, trim system prompts, route easy traffic to cheaper models, and cache repeated context where the provider supports it.