How accurate is the token estimate?
The estimate uses an industry rule of thumb of about four characters per token for English. Real tokenization depends on the model. Your actual count may be within 5 to 15 percent of the estimate, which is enough for cost planning.
Where do the prices come from?
Prices reflect publicly listed API rates at the time this tool was built. AI providers change prices, so always confirm current rates on the provider's pricing page before relying on the number for production budgets.
Why do output tokens cost more than input tokens?
Generating new tokens uses more compute than reading existing ones, so most providers charge a higher rate for output. The exact ratio varies by model.
Does my prompt leave my browser?
No. Token estimation runs entirely in your browser. The prompt is never sent to OpenAI, Anthropic, Google, or any other service.
Is this the same as OpenAI's tiktoken?
No. tiktoken is the exact tokenizer for OpenAI models. This tool uses a fast approximation that does not require downloading a tokenizer. For exact billing, use the provider's official tokenizer.