Token calculator: count tokens and estimate cost

Paste a prompt or a document to estimate how many tokens it is and what it costs to send it to an AI model. The text stays in your browser; nothing is uploaded.

0characters
0words
0tokens (estimate)
0tokens on Claude 4.7+ (estimate)

Cost to send this text once

ProviderModelInput cost
OpenAIgpt-5-nano$0.0000
OpenAIgpt-6-luna$0.0000
OpenAIgpt-4o-mini$0.0000
OpenAIgpt-5.6-luna$0.0000
AnthropicClaude Haiku 5.5$0.0000
AnthropicClaude Haiku 4.5$0.0000
AnthropicClaude Sonnet 5.5$0.0000
AnthropicClaude Sonnet 5$0.0000
GoogleGemini 3.1 Flash-Lite$0.0000
GoogleGemini 3.5 Flash-Lite$0.0000
GoogleGemini 3 Flash Preview$0.0000
GoogleGemini 3.8 Flash$0.0000

Prices in US dollars per 1 million tokens, standard tier, checked against the official pages on 4 December 2026: OpenAI API pricing · Claude API pricing · Gemini API pricing.

How the estimate works

The count uses the usual rule of thumb: about four characters per token for English text and code, and about one token per character for Chinese, Japanese and Korean. Real counts depend on the model's tokenizer, the language and the kind of text, so treat the number as a guide. Anthropic says Claude 4.7 and later produce about 30% more tokens for the same text, which is shown separately.

For an exact count use the provider's own tool: OpenAI's open-source tiktoken library, Anthropic's token counting endpoint, or the Gemini API's countTokens method.

Questions

How many words is 1,000 tokens?

For English, about 750 words. A token averages about four characters, which is roughly three quarters of a word.

Do output tokens count?

Yes, and they cost more. This page counts the text you send. Add the expected length of the answer, and compare models in the AI API cost calculator.

Is my text sent anywhere?

No. The count runs in your browser with a few lines of JavaScript and the text never leaves the page.