Token Calculator

Estimate token counts and LLM cost for GPT, Claude, and Gemini prompts.

Characters
0
Words
0
Est. input tokens
0
ModelInput $/1MOutput $/1MEst. cost
GPT-4o$2.50$10.00$0.00500
GPT-4o-mini$0.15$0.60$0.00030
Claude 3.5 Sonnet$3.00$15.00$0.00750
Claude 3.5 Haiku$0.80$4.00$0.00200
Gemini 1.5 Pro$1.25$5.00$0.00250

Token counts are an approximation (~4 characters per token). For exact counts use the tokenizer for your specific model.

Runs entirely in your browser — nothing you paste is sent to a server.

About this tool

Every LLM prices in tokens, not words. This calculator gives you a fast, model-aware estimate of how many tokens a prompt uses and what that costs across the major providers — useful before you fire off a batch job, tune a system prompt, or size a monthly budget.

How it works

  1. Paste the prompt (or a representative sample) into the input.
  2. The tool applies a heuristic token count roughly matching cl100k-base tokenization for English text.
  3. It then multiplies by current per-1K pricing for GPT-4o, GPT-4o-mini, Claude 3.5 Sonnet/Haiku, and Gemini 1.5.
  4. You get a per-request cost and a projected cost at your chosen monthly volume.

When to use it

  • Sizing the cost of an automated content pipeline before you turn it on.
  • Comparing whether a longer system prompt on a cheap model beats a shorter prompt on a premium one.
  • Estimating a customer's monthly spend for an internal AI feature.

FAQs

Related resources