Free AI Token & Cost Calculator
Count tokens and estimate API cost for GPT, Claude, and Gemini models, entirely in your browser.
0
Tokensexact
0
Characters
0
Chars / token
Cost if used as input
$0.00
at $2.5 / 1M input tokens
Cost if used as output
$0.00
at $10 / 1M output tokens
Token count is exact, computed with the model's real tokenizer. Pricing is illustrative — check the provider's current pricing page before relying on it.
How to use this tool
Paste your prompt, document, or conversation into the box and pick a model. The token count updates instantly, along with the estimated cost if that text were used as input or as output for that model.
GPT model counts are computed with OpenAI's real tokenizer, so they're exact. Claude and Gemini counts are a close estimate, since those providers don't publish an offline tokenizer.
FAQ
- Is my text sent to any AI provider?
- No. Tokenization and cost calculation both happen entirely in your browser. Your text is never sent to OpenAI, Anthropic, Google, or any server.
- Why is the token count exact for GPT models but an estimate for Claude and Gemini?
- OpenAI publishes the exact tokenizer their models use, so GPT counts are computed with the real algorithm. Anthropic and Google don't publish an offline tokenizer for their current models, so Claude and Gemini counts use a documented approximation of about 4 characters per token.
- Is the pricing up to date?
- Pricing is illustrative based on published rates and may not reflect the latest changes. Always check the provider's current pricing page before making decisions based on cost.
- What is this useful for?
- Estimating API costs before sending a request, checking whether a prompt fits within a model's context window, and understanding how your text translates into tokens.