Estimate token costs across leading AI models
AI Token Calculator
Estimate what it costs to use GPT, Claude, Gemini, DeepSeek and more. Paste your prompt or text, set an expected output size, and compare published API prices across providers.
Pricing data is based on the latest official pricing published by each model provider.
Compare model costs
Bars show total cost per request (and monthly cost when you enter a volume). Use this view to spot the cheapest provider for the same prompt.
How to use the token calculator
-
01
Paste Your Text
Enter or paste the text you want to analyze into the text area above.
-
02
View Token Count
See an instant token count directly in your browser.
-
03
Compare API Costs
Review estimated input, cached-input, and output costs across major LLM providers.
-
04
Optimize Your Prompts
Use the token visualization to identify opportunities to reduce token usage and API costs.
What You Can Do With This AI Token Calculator
Estimate token counts and per-request API cost across leading LLM providers in seconds. Paste any text, prompt, code block, or document into the box above. The calculator instantly shows the token count and the dollar cost for the same input across the providers you select. Switch between Text Input, Word Count, and Token Count modes to enter content the way you already have it.
Set an expected output size using the presets (5% for classification, 20% for RAG and Q&A, 50% for chat, 100% for a full response, 200% for long generation) or drag the slider to any custom percentage. Each provider card shows the input cost, output cost, cached input cost, and total cost per request. Sort the cards by cheapest first, most expensive first, or default order to compare side by side.
Current API Prices for the Latest LLM Models
Pricing below reflects the latest published rates from each provider. Each model card now links to a dedicated article with detailed breakdown, tokenizer notes, and use-case guidance.
GPT-5.6 (OpenAI) Token Cost
OpenAI GPT-5.6 input tokens cost about $4 per million on the standard tier (×2 updated 2026-09). Output is $20 per million. Cached input is $0.40 per million. Context window is 272K tokens.
Claude Opus 5 (Anthropic) Token Cost
Anthropic Claude Opus 5 charges $5 per million input tokens and $25 per million output tokens. Cached input is $0.50 per million. Context window is 500K tokens.
Gemini 2.5 Pro (Google) Token Cost
Google Gemini 2.5 Pro charges about $1.25 per million input and $10 per million output under the ≤200K tier (2026-09 official price). Long-context (>200K) is $2.50 input / $15 output. Context window is 1M tokens.
Llama 4 Maverick (Meta) Token Cost
Meta Llama 4 Maverick costs $0.24 per million input and $0.97 per million output via AWS Bedrock standard tier (us-east-1). 17Bx128E MoE architecture with 1M context window. Batch pricing half of standard.
Mistral Large 3 Token Cost
Mistral Large 3 charges $0.50 per million input and $1.50 per million output at the official Mistral API price (2026-09). 675B total / 41B active parameters, multimodal granular MoE. 256K context window.
DeepSeek V4 Flash Token Cost
DeepSeek V4 Flash costs $0.22 per million input and $0.66 per million output during off-peak hours. Cached input is $0.007 per million. Peak hours (01:00-04:00 + 06:00-10:00 UTC Mon-Fri) double the rate. One of the cheapest models in production. 1M context.
Qwen3.7-Max (Alibaba) Token Cost
Alibaba Qwen3.7-Max costs $1.67 per million input and $5.00 per million output via Alibaba Cloud Model Studio (RMB→USD). 1M context window. Mixed-Think mode available for reasoning tasks.
AI Model Pricing Per 1M Tokens
Latest published official pricing from each provider, in USD per 1 million tokens (combined input + output cost).
Log scale Y-axis ($2 / $5 / $10 / $20 / $50). *Gemini 3.6 Flash: promo price (through 2026-12-31, then $1.50 / $0.15 / $7.50 standard). "—" means provider does not offer prompt caching or no public context data.
Programming Language Token Efficiency, Ranked
Different languages tokenize at different densities. English averages about 1.3 tokens per word (roughly 4 characters per token). Chinese, Japanese, and Korean text tokenizes denser, around 1.5 to 2.3 tokens per character because each CJK character usually maps to one or more dedicated tokens.
Programming language source code tends to tokenize loosely, about 3 characters per token, because of dense punctuation, brackets, and short identifiers. A 1,000-line JavaScript file costs about the same as a 500-line English article in tokens. Plan budgets accordingly when evaluating a long codebase against API costs.
FAQs
What is a token in AI?
What is a token in AI?
A token is a chunk of text that an AI model processes. One token is roughly four characters of English text, or about three-quarters of a word. Tokens are the basic unit that providers charge for, with separate rates for input (the prompt you send) and output (the model's reply).
What are tokens in AI models?
What are tokens in AI models?
Tokens in AI models are pieces of text split by a tokenizer before the model reads them. Each provider may use a different tokenizer, so the same input can produce different token counts across providers. The calculator handles each provider with its own tokenizer or estimator.
Why are input and output priced separately?
Why are input and output priced separately?
Models spend different resources reading a prompt and generating a response, so providers publish separate rates. Output generation is usually more expensive than input reading. Output tokens typically cost 3 to 10 times more than input tokens.
How is the token count calculated?
How is the token count calculated?
The calculator runs the input through the tokenizer that best matches each provider: OpenAI models use the gpt-tokenizer library loaded in your browser, open-weight models use Hugging Face transformers via WASM, and closed-source providers (Anthropic, Google) use a character-based estimator tuned to each provider's published behavior. All computation happens locally in your browser.
Are these the latest prices?
Are these the latest prices?
Every price on this page links to the provider's pricing page. Prices are checked regularly and updated when providers publish new rates. The tool runs entirely in your browser, so your text never leaves your device.
How much do AI tokens cost?
How much do AI tokens cost?
AI token costs vary widely. Cheap models like GPT-5.6 Luna or DeepSeek V4 Flash start at about 0.02 dollars per million input tokens. Mid-range models like Claude Sonnet or GPT-5.6 Terra charge around 2 dollars per million input. Premium models like Claude Opus charge 5 to 10 dollars per million input tokens. Output is usually 3 to 10 times more expensive than input.
Which AI model is cheapest for my prompt?
Which AI model is cheapest for my prompt?
Paste your text in the calculator above, set your expected output size, and the result cards will rank every selected model by total cost. Sort by Cheapest first to see the cheapest options first.
How do I calculate OpenAI API costs?
How do I calculate OpenAI API costs?
Paste your prompt into the calculator, choose the OpenAI provider card, and pick the model (GPT-5, GPT-4o, GPT-4.1, or others). The card shows input cost, output cost, and total cost per request based on the linked OpenAI pricing page.