AI Token Cost Calculator
Enter your expected token usage and instantly see costs across all major AI providers. Last updated:
How do I calculate AI API costs? Multiply your input tokens by the provider's input rate and your output tokens by the output rate, then divide by 1 million. For example, 500,000 input + 100,000 output on GPT-5.4 ($2.50/$15.00 per 1M) = $1.25 + $1.50 = $2.75 per request cycle. This calculator runs that math across all 129 tracked models so you can spot the cheapest option in one glance.
How do I use the AI token cost calculator?
- Enter expected input tokens — roughly 0.75 words or 4 characters per token. A 2,000-word prompt is ~2,700 tokens.
- Enter expected output tokens — model responses are usually 200–2,000 tokens unless you explicitly set
max_tokens. - Set monthly request volume — multiplies the single-request cost to estimate monthly spend.
- Compare rows — the table sorts cheapest-first. Cached-input rates drop many providers by 75–90%.
- Click a model to jump to its provider page for context, FAQ, and rate-limit details.
Methodology
All prices come from the official API pricing pages of each provider, checked daily. The formula for a single request is:
cost = (input_tokens / 1,000,000 * input_rate) + (output_tokens / 1,000,000 * output_rate)
When the cached-input slider is above 0%, the input portion splits into cached and non-cached fractions, each multiplied by the respective rate. Models without a published cached rate use the standard input rate for both.
Frequently asked questions about AI token costs
How much do AI tokens cost in 2026?
AI token prices in 2026 range from $0.00 per million output tokens on budget models like Embed v3 English up to $50.00 per million output tokens on flagship reasoning models like Claude Mythos 5. Most general-purpose APIs sit in the $0.50–$15.00 per million output token range. Input tokens are typically 2–8x cheaper than output tokens, and cached input drops costs another 75–90% on providers that support it.
What is the cheapest AI API in 2026?
As of 2026-07-17, the cheapest mainstream AI API is Embed v3 English at $0.10 per million input tokens and $0.00 per million output tokens. DeepSeek and Google Gemini Flash are also extremely competitive for general workloads, while xAI Grok mini and Anthropic Claude Haiku offer the best price-to-quality on fast, low-latency requests. The calculator above ranks all 129 tracked models cheapest-first so you can see today's leader at a glance.
How do I calculate AI API costs?
Multiply your input tokens by the provider input rate, multiply your output tokens by the provider output rate, then divide each by 1,000,000. For example, 500,000 input + 100,000 output tokens on GPT-5.4 ($2.50 / $15.00 per 1M) costs (500,000 × $2.50 / 1,000,000) + (100,000 × $15.00 / 1,000,000) = $1.25 + $1.50 = $2.75 per request. Multiply by your monthly request volume for an estimated monthly bill.
How many tokens are in 1,000 words?
Roughly 1,330 tokens for English text — the OpenAI rule of thumb is 1 token ≈ 0.75 words, or about 4 characters. Code, JSON, and non-Latin scripts tokenize differently: code is usually denser (1 token ≈ 3.5 chars), and languages like Japanese or Arabic can cost 2–3x more tokens per character than English. For exact counts, use the tokenizer published by your provider (e.g., tiktoken for OpenAI, the Anthropic token counting endpoint, or Google AI Studio).
Are input tokens and output tokens priced the same?
No. Output tokens are almost always more expensive than input tokens — typically 2x to 8x more. For example, GPT-5.4 charges $2.50 per million input tokens vs $15.00 per million output (6x). Claude Sonnet 5 currently charges $2.00 input vs $10.00 output during launch pricing (5x), rising to $3.00/$15.00 on September 1, 2026. DeepSeek V3 is one of the few providers with closer parity at $0.27 input vs $1.10 output. The output multiplier is why optimizing prompt length matters less than capping response length for cost control.
What does cached input pricing mean?
Cached input pricing is a discount applied to prompt tokens the provider has already processed in a recent prior request — typically the system prompt, conversation history, or RAG context. OpenAI, Anthropic, and Google offer cached input rates at 25–10% of the standard input rate (a 75–90% discount). If you reuse the same long context across many calls (e.g., chat with system prompt, agent loops, long documents), enable caching and your effective bill drops dramatically. The calculator includes a cached-input slider to model this.
How accurate is this AI token cost calculator?
All 129 model prices in this calculator come from the official API pricing pages of each provider, checked every few hours by our automated pipeline. The last full refresh ran at 2026-07-17. We track 10+ providers including OpenAI, Anthropic, Google, DeepSeek, xAI, Meta, Mistral, Cohere, Perplexity, and Together. If a price shown here ever differs from the provider's page, the provider's page is authoritative and we'll have it corrected within hours.
Why is OpenAI more expensive than DeepSeek for the same task?
DeepSeek (and other lower-priced challengers like Mistral, Together-hosted Llama, and Groq) run on smaller GPU clusters, charge less margin, and in some cases serve open-weight models that have no licensing layer. OpenAI prices in brand, latency SLOs, enterprise support, broad ecosystem integrations, and continuous frontier-model R&D. For straightforward chat, summarization, or extraction, DeepSeek V3 typically delivers ~90% of GPT-5.4 quality at <10% of the cost. For complex reasoning, code generation under time pressure, or agentic workflows, the premium models still pull ahead.