Home › Guides › Counting tokens
Updated December 2026
English text averages ~0.75 words per token (≈4 characters). Useful for napkin math; wrong enough to matter. Code, non-English text and emojis tokenize far less efficiently — German text can cost 30–50% more tokens than the same English sentence.
tiktoken library encodes your exact string locally.usage object returns exact prompt_tokens / completion_tokens — log it from day one.Each call bills input + output. A 5-word question over a 10,000-token system prompt costs 10,005 tokens' worth of input. This is why context-window discipline — trimming history, deduplicating instructions — saves more than reply-length limits do.
Request-capped tiers (Groq, OpenRouter) mostly care about call counts; token-capped tiers (Cerebras daily tokens) need real counts. Our tokens explainer covers the fundamentals, and the Access Pack tells you which providers cap which way.