AI Token Counter

Estimate token count and API cost for major AI models. Paste your text, see the numbers. Free. No signup.

Count Tokens

Paste or type your prompt text below.

Free & Private
0 characters

GPT-4o / GPT-4

0
$0.000
cl100k_base

Claude 4.6

0
$0.000
~similar to cl100k

Gemini 2.5

0
$0.000
SentencePiece est.

GPT-3.5

0
$0.000
cl100k_base

What are tokens?

Tokens are the units that language models use to process text. A token can be as short as one character or as long as one word. On average, 1 token ≈ 4 characters in English, or about ¾ of a word.

Why token count matters

  • API billing — most AI providers charge per token (input + output). Knowing your input token count helps estimate costs before making API calls.
  • Context window — every model has a maximum context length. GPT-4o supports 128K tokens, Claude 4.6 supports 200K-1M tokens. Exceeding the limit truncates your input.
  • Prompt optimization — shorter prompts cost less and leave more room for the model's response. Token counting helps you trim without losing meaning.

How estimation works

This tool uses a heuristic approximation based on the cl100k_base tokenizer pattern (used by GPT-4 and similar to Claude's tokenizer). For exact counts, use the provider's official tokenizer library. Our estimates are typically within 5% for English text.

Pricing reference (per 1M input tokens)

ModelInputOutput
GPT-4o$2.50$10.00
Claude Opus 4.6$15.00$75.00
Claude Sonnet 4.6$3.00$15.00
Gemini 2.5 Pro$1.25$10.00
GPT-3.5 Turbo$0.50$1.50