LLM Token Counter
Count tokens for GPT, Claude and Gemini and compare API costs across 30+ models. Exact OpenAI counts, labelled estimates for Claude and Gemini, current prices.
See the tokens
How OpenAI's o200k_base tokenizer splits your text. Each colour is one token.
Cost
List prices per 1M tokens, checked 2026-11-15. Promotional prices switch to the regular price on their end date.
The model's reply (thinking counts as output)
e.g. per day or per month
Prompt caching bills repeated prefixes at the cached rate
| Model | Input tokens | $ / 1M in | $ / 1M out | Per request | × 1,000 |
|---|---|---|---|---|---|
GPT-6 Astra OpenAI · gpt-6-astra | … | $10 | $50 | … | … |
GPT-6.1 Sol OpenAI · gpt-6.1-sol | … | $2 | $10 | … | … |
GPT-6.1 Terra OpenAI · gpt-6.1-terra | … | $1 | $5 | … | … |
GPT-6 Luna OpenAI · gpt-6-luna | … | $0.10 | $0.50 | … | … |
GPT-5.6 Sol OpenAI · gpt-5.6-sol · Promotional price until 30 Nov 2026. | … | $4 | $20 | … | … |
GPT-5.6 Terra OpenAI · gpt-5.6-terra | … | $2 | $12 | … | … |
GPT-5.6 Luna OpenAI · gpt-5.6-luna | … | $0.20 | $1.20 | … | … |
GPT-5.5 OpenAI · gpt-5.5 | … | $5 | $30 | … | … |
GPT-5.4 OpenAI · gpt-5.4 | … | $2.50 | $15 | … | … |
GPT-5.4 mini OpenAI · gpt-5.4-mini | … | $0.75 | $4.50 | … | … |
GPT-5.4 nano OpenAI · gpt-5.4-nano | … | $0.20 | $1.25 | … | … |
GPT-5 mini OpenAI · gpt-5-mini | … | $0.25 | $2 | … | … |
GPT-5 nano OpenAI · gpt-5-nano | … | $0.05 | $0.40 | … | … |
GPT-4.1 OpenAI · gpt-4.1 | … | $2 | $8 | … | … |
GPT-4o OpenAI · gpt-4o | … | $2.50 | $10 | … | … |
GPT-4o mini OpenAI · gpt-4o-mini | … | $0.15 | $0.60 | … | … |
o3 OpenAI · o3 | … | $2 | $8 | … | … |
Claude Fable 5.2 Anthropic · claude-fable-5-2 | … | $8 | $40 | … | … |
Claude Opus 5.5 Anthropic · claude-opus-5-5 | … | $4 | $20 | … | … |
Claude Sonnet 5.5 Anthropic · claude-sonnet-5-5 | … | $2 | $10 | … | … |
Claude Haiku 5.5 Anthropic · claude-haiku-5-5 | … | $0.10 | $0.50 | … | … |
Claude Opus 5 Anthropic · claude-opus-5 | … | $5 | $25 | … | … |
Claude Sonnet 5 Anthropic · claude-sonnet-5 | … | $2 | $10 | … | … |
Claude Opus 4.8 Anthropic · claude-opus-4-8 | … | $5 | $25 | … | … |
Claude Sonnet 4.6 Anthropic · claude-sonnet-4-6 | … | $3 | $15 | … | … |
Claude Haiku 4.5 Anthropic · claude-haiku-4-5 | … | $1 | $5 | … | … |
Gemini 4 Argon Google · gemini-4-argon · Introductory price until 30 Nov 2026, then $4 / $20. | ≈110 | $2 | $10 | $0.00522 | $5.22 |
Gemini 4 Carbon Google · gemini-4-carbon · Introductory price until 30 Nov 2026, then $4 / $20. | ≈110 | $2 | $10 | $0.00522 | $5.22 |
Gemini 4 Hydrogen Google · gemini-4-hydrogen | ≈110 | $1.50 | $7.50 | $0.00392 | $3.92 |
Gemini 3.8 Flash Google · gemini-3.8-flash · Introductory price until 31 Dec 2026, then $1.50 / $7.50. | ≈110 | $0.75 | $3.75 | $0.00196 | $1.96 |
Gemini 3.1 Pro (preview) Google · gemini-3.1-pro-preview | ≈110 | $2 | $12 | $0.00622 | $6.22 |
Gemini 3.5 Flash-Lite Google · gemini-3.5-flash-lite | ≈110 | $0.30 | $2.50 | $0.00128 | $1.28 |
Gemini 3 Flash (preview) Google · gemini-3-flash-preview | ≈110 | $0.50 | $3 | $0.00155 | $1.55 |
Gemini 2.5 Flash-Lite Google · gemini-2.5-flash-lite | ≈110 | $0.10 | $0.40 | $0.00021 | $0.211 |
Your own price (counted with o200k_base; cache at 10%) | … | … | … |
Standard tier list prices in USD. Batch APIs usually cost about half; regional endpoints, priority/fast modes and taxes cost more. ≈ marks estimated token counts.
How accurate are the counts?
- OpenAI: exact for GPT-4o, GPT-4.1, GPT-5 (mini, nano) and o3, which use o200k_base. For GPT-5.x and GPT-6 models OpenAI hasn't published the tokenizer, so the same count is shown as ≈.
- Claude: Anthropic has no public tokenizer. OpenAI's tokenizer undercounts Claude by about 15–20% on English and more on code and other languages, so the estimate scales up with your text. For the exact number, use Anthropic's free token-counting endpoint:
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic();
const { input_tokens } = await client.messages.countTokens({
model: "claude-opus-5-5",
messages: [{ role: "user", content: text }],
});Gemini: estimated at about 4 characters per token (Google's guidance), adjusted for code and non-Latin scripts. The Gemini API's countTokens method gives the exact figure.
About this tool
Paste a prompt, a document or a chat log to count its tokens with OpenAI's o200k_base tokenizer, see how the text is split into tokens, and get estimated counts for Claude and Gemini, whose tokenizers aren't public. Then compare what a request costs across current OpenAI, Anthropic and Google models: set the reply length, the number of requests and how much of the prompt is served from cache, and sort by price. Long-context rates and promotional prices that expire are handled, and you can add a model with your own prices. The tokenizer loads in your browser and your text is never sent anywhere.
How to count tokens and estimate cost
Count a prompt's tokens and compare model prices.
- 1
Paste your text
Paste a prompt, a document or a conversation.
- 2
Set the usage
Enter the expected reply length, the number of requests and how much of the prompt is cached.
- 3
Compare models
Read the cost per request and in total for each model, or sort cheapest first.