Skip to main content
TokenCost logoTokenCost
Free · No signup · 60+ models

Count tokens.
Compare costs.

Instant usage analysis and API cost estimation across OpenAI, Anthropic, Google, xAI, Meta, Mistral, and DeepSeek.

Try:System PromptRAG QueryChat MessageCode ReviewSummarize
0
Tokens
0
Characters
0
Words

How to Count Tokens

  1. 1

    Enter your text

    Paste or type your prompt into the text area. Pick a preset prompt if you want a quick start.

  2. 2

    View counts instantly

    Usage figures update in real time for every model. Sort by any column to find the cheapest or most cost-efficient option.

  3. 3

    Compare costs across providers

    See input and output cost for each model side by side. Filter by provider to narrow your comparison.

Why Use This Counter

  • Exact counts for OpenAI models using official cl100k_base and o200k_base tokenizers
  • 60+ models from 15 providers — OpenAI, Anthropic, Google, xAI, Meta, Mistral, DeepSeek, and more
  • Runs entirely in your browser. Your text never leaves your machine.
  • Sort by input cost, output cost, or prompt size to find the best deal
  • Shareable URLs — bookmark or send a link with your text and settings pre-filled

Common Use Cases

Prompt engineering

Check token counts as you iterate on prompts. Stay under context limits and optimize for cost.

Budget planning

Estimate API costs before committing to a provider. Compare per-token pricing across models.

Context window management

Make sure your system prompt, examples, and user input fit within the model's context limit.

Provider migration

Switching from GPT to Claude? See how token counts and costs compare before you migrate.

Related Tools

Frequently Asked Questions

Common questions about token counting and LLM pricing