Token counter

Approximate estimate for GPT and Claude

No database: AIMRAN doesn't store your files, text or results

What is Token counter?

AI models like ChatGPT or Claude don't count words but tokens, small chunks of text. Knowing how many tokens a prompt or document has helps you stay within the model's limit and estimate how much it costs to use through the API.

Paste your text and instantly see the token count for different models, along with characters and words. You can also enter the model's price to estimate the cost.

How to use it

  1. Paste your prompt, document or code.
  2. Check the tokens for GPT-4o/GPT-5, GPT-4/3.5 and Claude.
  3. Choose the model in the cost panel.
  4. Enter your provider's price per million tokens to see the estimated cost.

Advantages

Technical details

GPT tokens are counted with gpt-tokenizer, an implementation of OpenAI's BPE: o200k_base for GPT-4o, GPT-4.1, GPT-5 and the o-series, and cl100k_base for GPT-4 and GPT-3.5 Turbo. The count runs in the background so typing isn't blocked; until it finishes, a heuristic estimate calibrated against o200k_base is shown. Anthropic does not publish the tokenizer for current Claude models, so that figure is an approximation: the cl100k count multiplied by a factor of 1.12 to 1.24 depending on the share of non-ASCII characters (accents, emojis, other alphabets). Cost is calculated as tokens times price divided by one million, using the price you enter (input or output), and is shown for the current text and for 1,000 requests.

Frequently asked questions

What is a token in ChatGPT?

A chunk of text the model processes as a unit. In English it's about three quarters of a word; in Spanish there is usually slightly more than one token per word.

How many tokens does my text have?

Paste it into the counter to see the exact figure for GPT-4o/GPT-5 and GPT-4, plus an estimate for Claude.

Is the Claude count exact?

No. Anthropic hasn't published its tokenizer, so the figure is an approximation. For GPT the count is exact.

How do I calculate the cost of a prompt?

Choose the model, enter its price per million tokens (each provider lists it) and you'll see the cost per request and per 1,000 requests.

More Prompts tools