Token counter

Multi-model AI token counter

Count tokens for 32 frontier models across GPT, Claude, Gemini, and Llama. Runs entirely in your browser. Nothing is uploaded.

Tokens
0
Characters
0
Words
0
Cost / 1k calls
$0.00

Cost estimate assumes 1,000 calls of this prompt as input plus 200 output tokens per call. Tokenizer for non-OpenAI models is approximated with cl100k_base or char/4, typically within 5 to 15% of true count. Claude models from Opus 4.7 onward (including Opus 5, Sonnet 5, and the Fable family) use a newer tokenizer that produces roughly 30% more tokens for the same text, so counts for those models may run low. Pricing data last verified 2026-09-15.

What a token actually is

Tokens are the units a language model "sees." Each model has its own tokenizer, a function that splits text into pieces. A 100-character prompt might be 25 tokens for GPT-4o and 30 for Llama, depending on the encoding.

How accurate are these counts

For OpenAI models we use the official o200k_base tokenizer (the same one OpenAI's API uses), so counts are exact.

For Claude, Gemini, Llama, and Grok, the official tokenizers aren't easily runnable in a browser. We approximate using cl100k_base for Claude and Llama, o200k_base for Grok (typically within 5 to 10% of true count), and a character-based estimate for Gemini. For exact counts on these, use each provider's own count-tokens API.

About the cost estimate

The cost estimate assumes 1,000 calls of your prompt as input plus 200 output tokens per call, priced at each model's input/output rate. Tweak this assumption to fit your actual workload on the cost calculator.