LLM Token Counter

Estimate tokens, context usage and API cost for any prompt, right in your browser.

This is an estimate. Exact token counts depend on each model's tokenizer. English text averages about 4 characters or 0.75 words per token; code, numbers and non-English text usually use more. Use the provider's own token-counting API for billing-grade figures.

Prices are indicative list prices in USD per million tokens as of November 2026, taken from public price comparisons. Providers change prices and have tiers (batch, cached input, long context), so edit any row to match your own pricing page.

LLM token counter and cost estimator

Paste a prompt, document or code and see an estimated token count, word and character counts, how much of common context windows it fills, and what a request would cost on popular models. Everything runs in your browser and nothing you paste is sent to our servers.

What is a token?

Language models read text as tokens: chunks that may be a whole word, part of a word, a number or punctuation. In English a token is roughly four characters or three quarters of a word. Source code, JSON, URLs and non-English languages split into more tokens per word.

How accurate is the estimate?

It is a fast approximation using character and word counts, so expect it to be within roughly 10-20% for ordinary English prose and further off for code or other languages. Each provider uses a different tokenizer. If you need exact numbers for billing or limits, use the official token-counting endpoint of your provider.

Estimating API cost

Cost = input tokens ÷ 1,000,000 × input price + output tokens ÷ 1,000,000 × output price. Output tokens usually cost three to six times more than input tokens, so a short prompt with a long answer can cost more than a long prompt with a short answer.

Keeping prompts within the context window

If your text fills most of a model's context window, split the document, summarise earlier parts or use retrieval. Remember the model's reply and any system prompt count against the same window.

Frequently asked questions

How many tokens is 1,000 words?

About 1,300 tokens in typical English text.

Is this the exact token count?

No. It is an estimate; exact counts depend on each model's tokenizer.

Is my text uploaded?

No. The count runs in your browser.

Why do output tokens cost more?

Generating tokens takes more compute than reading them, so providers charge a higher rate.

Are the prices current?

They are indicative and editable on the cost calculator. Always confirm on the provider's pricing page.

More in AI Tools