LLM Token Calculator

Paste text or enter token counts. See costs across every major model instantly.

Count tokens in your text and see what it would cost to process across all major LLM providers. Supports GPT-5.4, Claude Opus 4.6, Gemini 3.1 Pro, Grok 4.1, DeepSeek, and more. Exact token counts for OpenAI models. Estimates for all others.

Content type:

Characters

0

Words

0

Estimated Tokens

0

Quick examples

Cost Comparison

ProviderModelInput CostOutput CostTotal Cost
OpenAIGPT-5.4$0.00$0.00$0.00
OpenAIGPT-5.4 Pro$0.00$0.00$0.00
OpenAIGPT-5.3 Codex$0.00$0.00$0.00
AnthropicClaude Opus 4.6$0.00$0.00$0.00
AnthropicClaude Sonnet 4.6$0.00$0.00$0.00
GoogleGemini 3.1 Pro$0.00$0.00$0.00
GoogleGemini 3.1 Flash Lite$0.00$0.00$0.00
OpenAIGPT-5.2$0.00$0.00$0.00
GoogleGemini 3 Flash$0.00$0.00$0.00
OpenAIGPT-5.2 Pro$0.00$0.00$0.00
DeepSeekDeepSeek V3.2$0.00$0.00$0.00
DeepSeekDeepSeek V3.2 Reasoner$0.00$0.00$0.00
MistralMistral Large 3$0.00$0.00$0.00
MistralDevstral 2$0.00$0.00$0.00
AmazonNova 2 Lite$0.00$0.00$0.00
OpenAIGPT-5.1$0.00$0.00$0.00
AnthropicClaude Opus 4.5$0.00$0.00$0.00
xAIGrok 4.1 Fast$0.00$0.00$0.00
AnthropicClaude Haiku 4.5$0.00$0.00$0.00
AnthropicClaude Sonnet 4.5$0.00$0.00$0.00
xAIGrok Code Fast$0.00$0.00$0.00
MistralMagistral Medium$0.00$0.00$0.00
MistralMistral Medium 3.1$0.00$0.00$0.00
OpenAIGPT-5$0.00$0.00$0.00
OpenAIGPT-5 Pro$0.00$0.00$0.00
OpenAIGPT-5 mini$0.00$0.00$0.00
OpenAIGPT-5 nano$0.00$0.00$0.00
MistralCodestral$0.00$0.00$0.00
xAIGrok 4$0.00$0.00$0.00
OpenAIo3 Pro$0.00$0.00$0.00
MistralMistral Small 3.2$0.00$0.00$0.00
AnthropicClaude Sonnet 4$0.00$0.00$0.00
GoogleGemini 2.5 Flash Lite$0.00$0.00$0.00
OpenAIo3$0.00$0.00$0.00
OpenAIo4 mini$0.00$0.00$0.00
OpenAIGPT-4.1$0.00$0.00$0.00
OpenAIGPT-4.1 mini$0.00$0.00$0.00
OpenAIGPT-4.1 nano$0.00$0.00$0.00
GoogleGemini 2.5 Flash$0.00$0.00$0.00
MetaLlama 4 Maverick$0.00$0.00$0.00
MetaLlama 4 Scout$0.00$0.00$0.00
GoogleGemini 2.5 Pro$0.00$0.00$0.00
CohereCommand A$0.00$0.00$0.00
xAIGrok 3$0.00$0.00$0.00
xAIGrok 3 mini$0.00$0.00$0.00
AmazonNova Premier$0.00$0.00$0.00
OpenAIo3 mini$0.00$0.00$0.00
OpenAIo1$0.00$0.00$0.00
AmazonNova Pro$0.00$0.00$0.00
AmazonNova Lite$0.00$0.00$0.00
AmazonNova Micro$0.00$0.00$0.00
CohereCommand R7B$0.00$0.00$0.00
MistralPixtral Large$0.00$0.00$0.00
AnthropicClaude Haiku 3.5$0.00$0.00$0.00
CohereCommand R$0.00$0.00$0.00
OpenAIGPT-4o mini$0.00$0.00$0.00
MistralMistral Nemo$0.00$0.00$0.00
OpenAIGPT-4o$0.00$0.00$0.00

Showing costs for 0 input tokens across 58 models.

How Token Counting Works

Large language models process text as tokens — small chunks of text that typically represent about 4 characters in English. The exact tokenization varies by model because each provider uses a different tokenizer algorithm. For OpenAI models, this calculator uses the official tiktoken library to provide exact token counts. For other providers, we use calibrated character-ratio estimates clearly marked as approximate. One thousand tokens is roughly equivalent to 750 words of English text.

Understanding Input vs Output Tokens

LLM API pricing is split into input tokens (what you send to the model, including your prompt and any context) and output tokens (what the model generates in response). Output tokens are typically 2-5x more expensive than input tokens. When estimating costs, consider both sides: a chatbot that sends long system prompts with short user messages will have high input costs, while a content generator producing long articles will have high output costs.

Cached and Batch Pricing

Most providers offer discounted pricing for cached inputs and batch processing. Cached input pricing applies when you resend the same prompt prefix across multiple requests — the provider caches the processed tokens and charges less for repeated content. Batch pricing applies when you submit requests in bulk for asynchronous processing, accepting higher latency in exchange for 50% cost savings. Toggle these options in the calculator to see the impact on your costs.

Frequently Asked Questions

How many tokens is 1,000 words?
In English text, 1,000 words is approximately 1,333 tokens. The exact count depends on word length and the specific tokenizer used by each model. Technical text with long variable names may use more tokens per word.
Why do different models have different token counts?
Each LLM provider uses a different tokenizer algorithm to split text into tokens. OpenAI uses tiktoken (BPE-based), Anthropic and Google use their own tokenizers. A paragraph that is 500 tokens on GPT-5.4 might be 480 or 520 tokens on Claude. The differences are usually within 10%.
Are the token counts on this calculator exact?
For OpenAI models (GPT-5.4, GPT-4o, etc.), yes — we use the official tiktoken library for exact counts. For other providers, we provide calibrated estimates marked with a tilde (~) symbol. For production budgeting, we recommend using your provider's official tokenizer to verify exact counts.
How much does it cost to process a 10-page document?
A 10-page document is roughly 5,000 words or about 6,700 tokens. At GPT-5.4 pricing ($2.00 per million input tokens), processing it as input costs approximately $0.013. At Claude Opus 4.6 pricing ($5.00 per million), it costs approximately $0.034. Output costs depend on how much text you ask the model to generate in response.
What counts as a token in code?
Code typically uses more tokens per character than prose because variable names, syntax characters, and whitespace are tokenized differently. A rough estimate for code is 1 token per 3.5 characters. A 10,000-line codebase with an average of 40 characters per line would be approximately 114,000 tokens.

Token estimates for non-OpenAI models use character-ratio approximations and may differ from exact counts by up to 10%. For production cost planning, verify with your provider's official tokenizer.