Token counter
Token Counter & AI Cost Estimator
Estimate tokens, words, characters, per-request cost, and monthly API spend for OpenAI, Claude, and Gemini-style LLM workloads.
Count tokens and estimate cost
OpenAI token planning
Estimate prompt size and API cost before sending repeated ChatGPT or OpenAI API calls.
Claude prompt budgets
Check whether long context prompts are likely to become expensive at production volume.
Gemini cost estimates
Compare token cost assumptions across lower-cost and higher-capability model choices.
How this token estimate works
The calculator estimates token count from text length, word-like segments, punctuation, and CJK characters. It then applies the selected model's input and output price per million tokens.
Estimated request cost is calculated as input tokens * input price + output tokens * output price. Monthly cost multiplies that per-request estimate by monthly request volume.
| Use case | Best page | What to estimate |
|---|---|---|
| Claude token planning | Claude Tokenizer | Estimate Claude prompt size, cache pricing impact, and API cost. |
| OpenAI tokenizer | OpenAI Token Calculator | Use tiktoken-compatible encodings for OpenAI raw text token counts. |
| Monthly API spend | LLM Cost Calculator | Users, requests, input tokens, output tokens, and cached input. |
| RAG prompts | RAG Cost Calculator | Embedding, storage, retrieval context, and answer generation cost. |
| Long repeated prompts | Prompt Caching Savings Calculator | Uncached input, cached input, cache write, and repeated prompt savings. |
FAQ
Is this an exact tokenizer?
No. This page is a browser-side estimate for cost planning. Exact token counts depend on each provider's tokenizer and model family.
Why estimate output tokens?
Most API pricing charges input and output separately. A short prompt can still become expensive if the model returns long answers at high request volume.
Sources
Model prices are stored in the site pricing data and were last checked on 2026-07-02. Pricing can change, so verify official provider sources before final budgeting.