Token calculator.
Cost and context, per model.
Paste a prompt, see the real token count, and compare what it costs to run on GPT, Claude, and Gemini — including whether it fits each model's context window.
How much will my prompt cost? Paste your prompt below, set the expected reply length, and the table shows the cost per call and per 1,000 calls for every major model. Token counting happens locally with the real GPT tokenizer — nothing is uploaded.
LLM token and cost calculator
Prices per million tokens (input / output), checked October 2026 — providers change rates often, verify on their pricing pages. Counts use the o200k_base tokenizer (exact for current OpenAI models; ±10% for Claude and Gemini). Cached input and batch discounts are not included.
How to estimate LLM API costs
- Paste the prompt — system prompt plus user message; the tokenizer counts it exactly.
- Set the output size — 500 tokens is a typical chat reply; long analyses run 2,000–8,000.
- Compare models — the table shows cost per call and per 1,000 calls, plus whether the prompt fits the context window.
Rules of thumb
- Output costs 4–6× input — most of the bill comes from what the model writes, not what you send.
- 1,000 tokens ≈ 750 words — a dense page of text is roughly 500–700 tokens.
- Context limits matter — a prompt over the window is rejected outright; check the "fits" column before building a long-document pipeline.
- Caching and batch cut costs — cached input can be 10× cheaper and batch runs often 50% off; both are provider-specific and not shown here.
Good to know
Token counts differ between providers because each one splits text its own way — that is why the same paragraph can be 812 tokens on GPT and 845 on Claude. For budgeting, the ±10% difference is far smaller than the gap between model tiers. Related: token counter for plain counting and text chunker for splitting long documents into context-sized pieces.
How accurate is the token count?
The calculator uses the real GPT tokenizer (o200k_base, the one behind current OpenAI models) for exact counts on GPT-family models. Claude and Gemini tokenize slightly differently — treat their counts as accurate within roughly ±10%.
Are the prices current?
Prices are checked periodically (last check: October 2026) and shown per million tokens, input and output. Providers change prices often — verify on the provider's pricing page before committing to a budget.
Is my prompt uploaded?
No. Token counting runs entirely in your browser with a locally loaded tokenizer, and nothing you paste is sent anywhere.