Free tool · runs in your browser · prices checked Oct 17, 2026
Token counter.
Know exactly how many tokens your prompt is, and what it costs, before you send it. OpenAI counts are exact: the real o200k_base and cl100k_base tokenizers run on this page, so you get the number the API counts, not a word-count guess. Claude and Gemini get clearly marked estimates with the rule we used, and every count is priced on 24 models. Your text never leaves your browser.
- Exact GPT counts, real tokenizer
- Claude + Gemini estimates, labelled
- Cost on 24 models
- Nothing uploaded
Your text
Paste a prompt, a document or a whole chat. Counting runs on this page.
The OpenAI tokenizer (about 1 MB from jsDelivr) loads the first time you type.
Cost of one request
Your text as the input. Set how long the reply is. Prices checked Oct 17, 2026.
| Model | Input tokens | Per request | Per 1,000 |
|---|
Cheapest first. ≈ = estimated count (see below). Standard prices, no batch or cache discounts.
How the counts are made
- OpenAI: exact. The page loads gpt-tokenizer 3.4.0 from jsDelivr, a JavaScript port of OpenAI's tiktoken with the same o200k_base and cl100k_base vocabularies. OpenAI's own tiktoken model map assigns o200k_base to GPT-4o, GPT-4.1, GPT-5 and the o-series, and cl100k_base to GPT-4 and GPT-3.5. tiktoken does not list GPT-6 models yet, so their rows assume o200k_base. Special tokens such as
<|endoftext|>in your text are counted as plain text. - Chat messages cost a few more. The API wraps each chat message in formatting tokens: OpenAI's cookbook counts 3 per message plus 3 to prime the reply. This page counts the text itself.
- Claude: estimate. Anthropic does not publish its tokenizer. Its glossary says a token is about 3.5 English characters on models before Claude Opus 4.7, and its token counting docs say Opus 4.7 and later produce about 30% more tokens for the same text. So: characters ÷ 3.5, then × 1.3 for the newer models. For an exact count, call the free count_tokens endpoint with your model.
- Gemini: estimate. Google's Gemini token docs put a token at about 4 characters, so: characters ÷ 4. Gemini's API also has a countTokens method for exact numbers.
- Estimates drift on code and non-English text, which usually take more tokens per character than English prose. Compare with the exact GPT count above to see how your text behaves.
Sources
All checked Oct 23, 2026 unless noted. Prices are the same table as our LLM API cost calculator.
- OpenAI API pricing, checked Oct 17, 2026
- Anthropic API pricing, checked Oct 17, 2026
- Google API pricing, checked Oct 17, 2026
FAQ
How do I count tokens for ChatGPT or the OpenAI API?
Paste your text above. The count uses the real o200k_base tokenizer that GPT-4o, GPT-4.1 and GPT-5 models use, so it matches what tiktoken gives you. Add about 3 tokens per chat message for formatting.
How do I count tokens for Claude?
For an exact count, call Anthropic's count_tokens API with the model you plan to use; it is free and rate limited. This page gives a quick estimate from character count, clearly marked with ≈.
Why does the same text cost more tokens on newer Claude models?
Anthropic says Claude Opus 4.7 and later use a newer tokenizer that produces about 30% more tokens for the same text. Do not reuse counts measured on older models when you budget.
How many words is 1,000 tokens?
In English, roughly 600 to 800 words: Google puts it at 60 to 80 words per 100 tokens. Paste your own text to see the exact GPT number, since code and other languages differ.
Is my text uploaded anywhere?
No. The tokenizer file is downloaded from jsDelivr, then all counting happens in your browser. Nothing you paste is sent to us or anyone else.
What is a token?
A chunk of text the model reads and writes: often a word, part of a word, a space plus a word, or a punctuation mark. Turn on Show tokens above to see exactly where the GPT tokenizer splits your text.
Know your AI bill for a whole month, not one request
The LLM API Cost Calculator for Google Sheets and Excel prices your traffic per request, month and year across 26 models side by side, and keeps your own numbers. $7 once. Guaranteed: if it doesn't give you the number you need, email support@tensorust.com and we fix it.
Get the spreadsheet, $7 →