LLM token counter & API cost calculator

Estimate token counts for any prompt and price it across GPT-5.5, Claude 4.6, Gemini 3, Llama 3.3, and Mistral Large side-by-side — input + output costs per call, plus daily and monthly projections at 1,000 calls/day. Everything is tokenised in your browser; nothing is sent to any model API.

Estimated input tokens82
Estimated output tokens0
Total tokens per call82

Estimate ± ~5–10% vs the model's actual tokenizer for English prose; wider for code or non-English text. For exact counts, run the model's tokenizer locally (tiktoken, anthropic-tokenizer, sentencepiece). Rates updated 2026-05-27.

Show families
Estimated cost per call (10 models)Sorted by total cost ascending
Gemini 3 FlashGoogle · $0.08 in / $0.30 out per 1M
$0.0000$0.0000$0.0000
Claude 4.5 HaikuAnthropic · $0.25 in / $1.25 out per 1M
$0.0000$0.0000$0.0000
GPT-5.5 MiniOpenAI · $0.30 in / $1.20 out per 1M
$0.0000$0.0000$0.0000
Llama 3.3 70B InstructLlama · $0.90 in / $0.90 out per 1M
$0.0001$0.0000$0.0001
Gemini 3 ProGoogle · $1.25 in / $5.00 out per 1M
$0.0001$0.0000$0.0001
Mistral LargeMistral · $2.00 in / $6.00 out per 1M
$0.0002$0.0000$0.0002
Claude 4.6 SonnetAnthropic · $3.00 in / $15.00 out per 1M
$0.0002$0.0000$0.0002
GPT-5.5 (general)OpenAI · $5.00 in / $15.00 out per 1M
$0.0004$0.0000$0.0004
o4 (reasoning)OpenAI · $15.00 in / $60.00 out per 1M
$0.0012$0.0000$0.0012
Claude 4.6 OpusAnthropic · $15.00 in / $75.00 out per 1M
$0.0012$0.0000$0.0012

Per-call costs only. Toggle '1,000 calls/day' above to project daily and monthly spend. API prices are quoted in USD by all providers; pick a currency converter if you need another currency.

Your text is tokenised in this browser. Nothing is sent to any model API.

How to use

  1. Paste your prompt into the Input prompt textarea. The chars / words / estimated-token counts update live as you type, so you can shape the prompt against a target token budget in real time.

  2. Paste a representative response into the Expected output textarea — or click "Set output = input length" for the common assumption that the model will respond with roughly the same volume as you sent. Output tokens are usually the dominant cost driver because output rates run 3–5× the input rate at most providers.

  3. Read the per-model cost table underneath. Each row shows input cost + output cost + total per call; the table is sorted by total ascending so the cheapest viable model is always at the top.

  4. Toggle the family chips (OpenAI, Anthropic, Google, Llama, Mistral) to narrow the comparison — useful when procurement has already restricted you to one or two providers and you only want to see those.

  5. Flip "Scale to 1,000 calls/day" to project daily and monthly spend. Use this as a steady-state upper bound for production-cost forecasts before signing a contract or committing to a model in production.

Frequently asked questions

Why is the token count called an "estimate" — isn't a token a fixed unit?
A token is a fixed unit *within* a single tokenizer, but every model family ships with its own tokenizer that splits text differently. OpenAI uses tiktoken (a BPE — Byte Pair Encoding — with the cl100k or o200k vocabulary), Anthropic uses a proprietary BPE, Google's Gemini uses SentencePiece, and Llama/Mistral use their own SentencePiece BPE variants. Each vocab assigns slightly different chunks to a single token: "thanksgiving" might be 1 token in one vocab and 3 in another, and a Sinhala or Tamil character might be 1 token in a model trained heavily on Indic text and 8 in one that isn't. To call the *real* tokenizer this tool would have to ship the vocab files for every supported model — several megabytes per model — so instead it uses a well-published heuristic: take the max of (characters ÷ 4) and (words ÷ 0.75). That's accurate to roughly 5–10% for English prose, wider for code or non-English text. For exact billing-grade counts, run the model's own tokenizer locally — tiktoken for OpenAI, anthropic-tokenizer for Claude, sentencepiece for Gemini and Llama.
Why are input and output prices so different?
Output tokens cost more than input tokens at every commercial provider — typically 3–5× more — because they're more expensive to *produce*. Input tokens go through the model once, in a single batched forward pass that GPUs handle extremely efficiently; output tokens are generated one at a time autoregressively, each one requiring a full forward pass conditioned on every previous token. That sequential generation is harder to batch across requests, eats more GPU memory bandwidth, and burns more wall-clock time per token. For reasoning models (o-series, Claude thinking modes) the ratio widens further because the model emits a long internal reasoning trace that's billed as output even though you never see it. Practical consequence: if you want to cut a bill, cutting the *length* of the response (with shorter prompts, max_tokens caps, or structured output) usually saves more than cutting the prompt size.
What's a "context window" and how do I know if my prompt fits?
The context window is the maximum number of tokens — input plus output combined, in most APIs — that a model can process in a single call. GPT-5.5 and Claude 4.6 ship with 200k–1M token windows; Gemini 3 Pro can go to 2M; Llama and Mistral models vary by deployment. The estimated-token figure in the stats card is the right number to compare against the model's published context window: if your input is 180,000 tokens and the model's window is 200,000, you have roughly 20,000 tokens of headroom for the response — and crucially, the model's quality often degrades on the last 10–20% of its window even when it technically fits. Rule of thumb: aim to stay under 70–80% of the published limit for any task where you care about answer quality, not just "does it fit."
When does fine-tuning beat just sending a longer prompt?
Send a longer prompt for one-off or low-volume tasks; fine-tune when the same context would otherwise be re-sent thousands of times. The crossover point depends on the prompt length, the call volume, and the fine-tuning provider's pricing, but a useful rule of thumb is: if your fixed instructions / examples / few-shots run to more than ~2,000 tokens and you'll make more than ~500,000 calls, fine-tuning usually wins on a 12-month total cost basis. The numbers cross faster at higher call volumes — at ~1M calls per year against a 5k-token system prompt, fine-tuning typically pays back in 2–3 months even after factoring in the training cost itself. Fine-tuning also reduces output latency (smaller payload per call) which matters for user-facing products.
Why are these prices in USD, and how often do they change?
Every major commercial LLM provider quotes pricing in USD — that's the unit they bill in regardless of the customer's billing country. We chose not to add a currency converter to v1 because the live FX rate is a separate variable that goes stale faster than the API rates themselves do, and showing a converted number gives a false sense of precision. The rates here are surfaced with a "rates updated [date]" line at the top because providers cut prices on no schedule — OpenAI alone has cut prices 4× in 18 months, Anthropic has rolled out Haiku tiers at meaningfully lower rates, and Gemini Flash has cut its input rate dramatically. Treat the dollar figures in the table as a *planning* estimate; before any procurement decision over a few hundred dollars per month, check the provider's own pricing page on the day you decide.

Need AI implementation? Book a call.

We’re the studio behind these tools — eight productized AI engagements for SMBs (leads, automation, receptionist, support, content, more). If you want something built for production, we’ll quote it.

Schedule A Call