Paste any prompt, document, JSON payload or code snippet. Get an instant token count estimate, real-time input/output cost calculation for your selected model, and context window utilization analysis.
Knowledge Base
Counts are estimates accurate to roughly ±15–20%. The estimator adapts to content type (prose, code, JSON) and script (CJK vs Latin). Exact counts depend on each provider's tokenizer — the model's tokenizer is shown with the results. For billing-grade numbers, use the provider's own token counting API.
For English prose, about 4 characters per token on modern tokenizers like o200k_base. Code and JSON are denser (~3.6–3.7 chars/token) because of structural symbols. Chinese and Japanese average roughly 1 token per character.
Providers like OpenAI, Anthropic, Google and DeepSeek discount input tokens reused from a previous request (prompt caching) — often 4–10× cheaper. If your workload repeats context, the cached share slider shows the savings.
Generation is computationally heavier than reading input, so providers price output tokens 2–10× higher. A GPT-5 request at $1.25/M input costs $10/M for generated tokens.