AI Token Counter
Estimate token count and LLM API cost for any text. Paste content and get instant token estimates with per-model pricing breakdown and token visualization.
Paste any text to estimate its token count and see what it costs to send as input across major LLM providers. Everything runs in your browser — nothing is sent anywhere.
Input
How tokens work
LLMs don't read text character-by-character or word-by-word — they read tokens, which are chunks of text produced by a byte-pair encoding (BPE) algorithm trained on a large corpus.
A few rules of thumb for English text:
- ~4 characters per token — the most common estimate for prose
- ~¾ words per token — short common words are usually 1 token; longer or rarer words split
- Whitespace is absorbed into the following token —
" hello"(with leading space) is typically a single token, not two - Code and symbols tokenize denser —
{,;,->are often 1 token each regardless of length - Numbers vary —
42is usually 1 token, but long integers like198732may split at 3-digit boundaries
The counter above uses the 4 chars/token approximation. For exact counts, use Tiktokenizer with the specific model's tokenizer.
Why token count matters
| Use case | Why it matters |
|---|---|
| Prompt engineering | Longer prompts = higher cost per call |
| Context window limits | GPT-4o caps at 128K tokens; Claude at 200K |
| Batching decisions | 1M tokens at once vs 1K calls of 1K tokens each |
| RAG chunk sizing | Chunk size in tokens affects retrieval quality |
| Fine-tuning budgets | Training cost is usually quoted per token |
Pricing notes
Prices shown are for input tokens only. Output tokens are billed separately at a higher rate (typically 3–4× input price). The table shows the output rate for reference.
Prices change frequently — treat the table as a relative comparison tool, not a billing guarantee.