πŸͺ™ AI Token Counter & Cost Calculator

πŸ”’ Sicher & Clientseitig

Estimate the token count of any text and the per-model API cost across GPT-4o, Claude Opus 4.7, Gemini 2.5, and more. Heuristic count (β‰ˆ4 chars/token English, β‰ˆ1.5 chars/token CJK) β€” exact tokenization needs the provider API.

Characters
0
Words
0
Est. tokens
0
Lines
0
(used for output cost column)

Cost per model

Model Input $/1M Output $/1M Input cost Output cost Total

How to use

  1. Paste the prompt, document, or transcript you want to estimate.
  2. The character/word/token/line counts update live.
  3. Adjust the estimated output tokens if you expect a long response (default 500).
  4. The cost table shows input cost, output cost, and total per popular model.

Token counting accuracy: this tool uses a fast character-based heuristic that detects CJK characters (Korean, Japanese, Chinese) and adjusts the chars-per-token ratio. Real BPE tokenization (cl100k_base, o200k_base, etc.) requires the provider API or a 1-3MB vocabulary download. For cost estimation purposes the heuristic is typically within Β±10% of the exact count.

Pricing: based on publicly listed per-million-token prices as of 2026-05. Always check the provider's pricing page before billing-critical decisions.