AI Prompt Token Counter

Count tokens for GPT-4o, Claude 3.5, and Gemini 1.5. Estimate LLM API input and output costs with live word and character metrics. Free AI tool.

About this tool

AI Prompt Token Counter counts tokens and calculates estimated API costs for GPT-4o, GPT-4o-mini, Claude 3.5 Sonnet, Claude 3.5 Haiku, Gemini 1.5 Pro, and Gemini 1.5 Flash.

How to use

  1. Paste your prompt, markdown document, or source code into the text area.
  2. Select your target AI model (OpenAI, Anthropic, or Google).
  3. Inspect token count, word count, character metrics, and estimated input cost.
  4. Optimize your prompt to reduce token consumption.

FAQ

How accurate is the token counter?

The token estimation uses Byte-Pair Encoding (BPE) heuristics tailored for modern LLM tokenizers, providing accurate estimates for English, multilingual text, and code.

What models are supported?

Includes up-to-date pricing and tokenization for GPT-4o, GPT-4o-mini, Claude 3.5 Sonnet, Claude 3.5 Haiku, Gemini 1.5 Flash, and Gemini 1.5 Pro.

What does AI Prompt Token Counter do?

AI Prompt Token Counter counts tokens and calculates estimated API costs for GPT-4o, GPT-4o-mini, Claude 3.5 Sonnet, Claude 3.5 Haiku, Gemini 1.5 Pro, and Gemini 1.5 Flash.

How do I use AI Prompt Token Counter?

Open the AI Prompt Token Counter tool, then paste your prompt, markdown document, or source code into the text area.

Related tools