AI Token Cost Calculator
Compare equivalent model generations and tiers across API-only and self-hostable options. Last updated:
Need list rates instead? Browse the API price table. Comparing metered APIs with your own hardware or a rented GPU? Run the local AI vs API calculator.
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 — current flagship models appear first by default; switch to lowest-cost sorting whenever price is the priority.
- 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.
For models with a structured longContext tier in our daily pricing data, the calculator switches input, cached-input, and output rates when the entered input crosses the provider's threshold. The higher rate applies to the full request where the official rate card specifies request-wide tiering.
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 $180.00 per million output tokens on flagship reasoning models like GPT-5.5 Pro. 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-08-31, 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 opens with active flagship models first and lets you switch to lowest-cost sorting in one click.
How do I calculate AI API costs?
Multiply your input tokens by the applicable input rate, multiply your output tokens by the applicable output rate, then divide each by 1,000,000. Check for a long-context threshold before doing the math: crossing it can move the full request to a higher rate tier. The calculator handles published long-context tiers automatically.
Do long prompts and large context windows cost more per token?
Sometimes. Every longer prompt costs more in total because it contains more billable input tokens. Some providers also raise the per-token rate after a threshold: current tiered OpenAI models switch above 272,000 input tokens, while supported Google Pro and xAI models use a 200,000-token boundary. This higher tier can apply to every input and output token in the request, not only the tokens above the boundary. Claude 4.6 and later are different: Anthropic says the full 1M-token context window uses the standard per-token rate.
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.6 Terra charges $2.00 per million input tokens vs $12.00 per million output (6x). Claude Sonnet 5 charges $2.00 input vs $10.00 output (5x); Anthropic says this is now its standard price. 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 220 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-08-31. 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.