AI token counters
Estimate prompt size and model cost before sending an AI request.
What you can do
Count tokens for OpenAI, Anthropic, DeepSeek, and Llama models, then estimate OpenAI API costs. Use these calculators before a request to compare context limits and budget.
- Check whether a prompt fits a context window
- Compare token counts across model families
- Estimate API spend before a batch run
Choose a tool
Pick the input and output that match your current task.
OpenAI Token Counter
Count tokens for OpenAI models and estimate API costs
Anthropic Token Counter
Count tokens for all Claude models and estimate API costs
Deepseek Token Counter
Count tokens and estimate costs for Deepseek models
Llama Token Counter
Count tokens and estimate costs for Llama models
OpenAI Cost Calculator
Calculate OpenAI API costs based on token usage and model selection
How to choose
Models read tokens rather than characters. A token count helps you check whether a prompt and expected response fit within a model's context window before you send the request.
Tokenizers differ between model families, so the same text can produce different counts. Use the calculator for the model you plan to call, then use its current pricing when estimating spend.