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

Calculated locally in your browser. Token counts are estimates and may differ from provider tokenizers.
Estimated input tokens0
Input cost per request$0.00
Total cost per request$0.00
Monthly input tokens0
Estimated monthly cost$0.00
Words0
Characters0
Chars per token0
Planning estimate: provider tokenizers can count text differently. Use this page for budgeting and compare final numbers against the provider API before committing spend.
OpenAI

OpenAI token planning

Estimate prompt size and API cost before sending repeated ChatGPT or OpenAI API calls.

Claude

Claude prompt budgets

Check whether long context prompts are likely to become expensive at production volume.

Gemini

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 caseBest pageWhat to estimate
Claude token planningClaude TokenizerEstimate Claude prompt size, cache pricing impact, and API cost.
OpenAI tokenizerOpenAI Token CalculatorUse tiktoken-compatible encodings for OpenAI raw text token counts.
Monthly API spendLLM Cost CalculatorUsers, requests, input tokens, output tokens, and cached input.
RAG promptsRAG Cost CalculatorEmbedding, storage, retrieval context, and answer generation cost.
Long repeated promptsPrompt Caching Savings CalculatorUncached 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.