Token Counter & LLM Cost Calculator
Paste any prompt or document to see how many tokens it uses and what it would cost to send to Claude, GPT, or Gemini, before you make the API call.
| Model | Per call | Monthly |
|---|---|---|
| Claude Haiku 4.5Anthropic | $0.0052 | $52 |
| Gemini 1.5 FlashGoogle · cheapest | $0.0003 | $3 |
| GPT-4o miniOpenAI | $0.0006 | $6 |
| Claude Sonnet 5Anthropic | $0.0104 | $104 |
| GPT-4oOpenAI | $0.0105 | $105 |
| Claude Opus 5Anthropic | $0.0260 | $260 |
Estimates use each provider's published API prices (last reviewed August 2026) and the expected output length above. Tokenizers differ slightly per model; this page counts with the open o200k tokenizer in your browser — the prompt is never sent to an API.
FAQ
Why count tokens before sending?
LLM APIs bill per token, in and out. A prompt that "feels short" can easily be thousands of tokens once you paste in a document, and at 10,000 calls a month the difference between models is real money. Counting first turns pricing from a surprise into a decision.
What counts as a token?
Roughly 3/4 of an English word, but it varies: code, JSON, and non-English text tokenize less efficiently. That's why this tool counts your actual text instead of applying a words x 1.3 rule of thumb.
Is my prompt sent to any API to be counted?
No. Counting runs in your browser with an open tokenizer (o200k, the encoding used by GPT-4o and similar models). Your text never leaves the page. Other providers tokenize a little differently, so treat the count as a close estimate across Claude and Gemini.
Where do the prices come from?
The providers' public API price lists, reviewed monthly. The date of the last review is shown next to the table.
Does it handle system prompts and chat history?
Yes. Paste the whole conversation. For multi-turn chats, remember the full history is re-sent (and re-billed) on every call.