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 112 tracked models so you can spot the cheapest option in one glance.

0%
Output auto-calculates from input — pick a workload or switch to Manual.

Tip: type 1M, 500k or 10,000. Cached-input tokens are billed at each model's discounted cached rate.

Count tokens from text

0 tokens0 words0 chars

24 legacy models hidden —.

  • Embed v3 English
    cohere
    Total
    $0.10
    Input$0.10
    Output$0.00
  • Embed v3 Multilingual
    cohere
    Total
    $0.10
    Input$0.10
    Output$0.00
  • Llama 3.1 8b Instant
    groq
    Total
    $0.13
    Input$0.05
    Output$0.08
  • LFM2 24B A2B (Together)
    together
    Total
    $0.15
    Input$0.03
    Output$0.12
  • Gemma 3n E4B Instruct (Together)
    together
    Total
    $0.18
    Input$0.06
    Output$0.12
  • Command R7B
    cohere
    Total
    $0.1875
    Input$0.0375
    Output$0.15
  • Ministral 3B
    Mistral
    Total
    $0.20
    Input$0.10
    Output$0.10
  • GPT-OSS 20B (Together)
    together
    Total
    $0.25
    Input$0.05
    Output$0.20
  • Ministral 8B
    Mistral
    Total
    $0.30
    Input$0.15
    Output$0.15
  • Mistral NeMo
    Mistral
    Total
    $0.30
    Input$0.15
    Output$0.15
  • Pixtral 12B
    Mistral
    Total
    $0.30
    Input$0.15
    Output$0.15
  • Rnj-1 Instruct (Together)
    together
    Total
    $0.30
    Input$0.15
    Output$0.15
  • GPT OSS Safeguard 20B
    groq
    Total
    $0.375
    Input$0.075
    Output$0.30
  • Openai/gpt Oss 20b
    groq
    Total
    $0.375
    Input$0.075
    Output$0.30
  • Llama 4 Scout
    Meta
    Total
    $0.38
    Input$0.08
    Output$0.30
  • Devstral Small 2
    Mistral
    Total
    $0.40
    Input$0.10
    Output$0.30
  • Ministral 14B
    Mistral
    Total
    $0.40
    Input$0.20
    Output$0.20
  • Mistral Small 4
    Mistral
    Total
    $0.40
    Input$0.10
    Output$0.30
  • DeepSeek V4 Flash
    DeepSeek
    Total
    $0.42
    Input$0.14
    Output$0.28
  • Qwen3.5 9B (Together)
    together
    Total
    $0.42
    Input$0.17
    Output$0.25
  • GPT-5 nano
    OpenAI
    Total
    $0.45
    Input$0.05
    Output$0.40
  • Llama 4 Scout 17B 16E Instruct
    groq
    Total
    $0.45
    Input$0.11
    Output$0.34
  • Gemini 2.5 Flash-Lite
    Google
    Total
    $0.50
    Input$0.10
    Output$0.40
  • Mistral 7B
    Mistral
    Total
    $0.50
    Input$0.25
    Output$0.25
  • Command R 08-2024
    cohere
    Total
    $0.75
    Input$0.15
    Output$0.60
  • GPT-4o mini
    OpenAI
    Total
    $0.75
    Input$0.15
    Output$0.60
  • GPT-OSS 120B (Together)
    together
    Total
    $0.75
    Input$0.15
    Output$0.60
  • Llama 4 Maverick
    Meta
    Total
    $0.75
    Input$0.15
    Output$0.60
  • Openai/gpt Oss 120b
    groq
    Total
    $0.75
    Input$0.15
    Output$0.60
  • Qwen3 32B
    groq
    Total
    $0.88
    Input$0.29
    Output$0.59
  • Codestral
    Mistral
    Total
    $1.20
    Input$0.30
    Output$0.90
  • DeepSeek V4 Pro
    DeepSeek
    Total
    $1.31
    Input$0.435
    Output$0.87
  • Llama 3.3 70b Versatile
    groq
    Total
    $1.38
    Input$0.59
    Output$0.79
  • Mixtral 8x7B
    Mistral
    Total
    $1.40
    Input$0.70
    Output$0.70
  • GPT-5.4 nano
    OpenAI
    Total
    $1.45
    Input$0.20
    Output$1.25
  • MiniMax M2.7 (Together)
    together
    Total
    $1.50
    Input$0.30
    Output$1.20
  • Gemini 3.1 Flash-Lite
    Google
    Total
    $1.75
    Input$0.25
    Output$1.50
  • GPT-4.1 mini
    OpenAI
    Total
    $2.00
    Input$0.40
    Output$1.60
  • Magistral Small
    Mistral
    Total
    $2.00
    Input$0.50
    Output$1.50
  • Mistral Large 3
    Mistral
    Total
    $2.00
    Input$0.50
    Output$1.50
  • Rerank v3
    cohere
    Total
    $2.00
    Input$2.00
    Output$0.00
  • Sonar
    perplexity
    Total
    $2.00
    Input$1.00
    Output$1.00
  • Llama 3.3 70B (Together)
    together
    Total
    $2.08
    Input$1.04
    Output$1.04
  • GPT-5 mini
    OpenAI
    Total
    $2.25
    Input$0.25
    Output$2.00
  • Devstral Medium 2
    Mistral
    Total
    $2.40
    Input$0.40
    Output$2.00
  • Cogito v2.1 671B (Together)
    together
    Total
    $2.50
    Input$1.25
    Output$1.25
  • Gemini 2.5 Flash
    Google
    Total
    $2.80
    Input$0.30
    Output$2.50
  • Gemini 3 Flash
    Google
    Total
    $3.50
    Input$0.50
    Output$3.00
  • Grok 4.3
    xAI
    Total
    $3.75
    Input$1.25
    Output$2.50
  • GLM-5 (Together)
    together
    Total
    $4.20
    Input$1.00
    Output$3.20
  • Qwen3.5 397B A17B (Together)
    together
    Total
    $4.20
    Input$0.60
    Output$3.60
  • Qwen3.7-Max (Together)
    together
    Total
    $5.00
    Input$1.25
    Output$3.75
  • GPT-5.4 mini
    OpenAI
    Total
    $5.25
    Input$0.75
    Output$4.50
  • Kimi K2.6 (Together)
    together
    Total
    $5.70
    Input$1.20
    Output$4.50
  • GLM-5.1 (Together)
    together
    Total
    $5.80
    Input$1.40
    Output$4.40
  • Claude Haiku 4.5
    Anthropic
    Total
    $6.00
    Input$1.00
    Output$5.00
  • DeepSeek V4 Pro (Together)
    together
    Total
    $6.50
    Input$2.10
    Output$4.40
  • Magistral Medium
    Mistral
    Total
    $7.00
    Input$2.00
    Output$5.00
  • Mixtral 8x22B
    Mistral
    Total
    $8.00
    Input$2.00
    Output$6.00
  • Pixtral Large
    Mistral
    Total
    $8.00
    Input$2.00
    Output$6.00
  • Mistral Medium 3.5
    Mistral
    Total
    $9.00
    Input$1.50
    Output$7.50
  • GPT-4.1
    OpenAI
    Total
    $10.00
    Input$2.00
    Output$8.00
  • o3
    OpenAI
    Total
    $10.00
    Input$2.00
    Output$8.00
  • Sonar Deep Research
    perplexity
    Total
    $10.00
    Input$2.00
    Output$8.00
  • Sonar Reasoning Pro
    perplexity
    Total
    $10.00
    Input$2.00
    Output$8.00
  • Gemini 3.5 Flash
    Google
    Total
    $10.50
    Input$1.50
    Output$9.00
  • Gemini 2.5 Pro
    Google
    Total
    $11.25
    Input$1.25
    Output$10.00
  • GPT-5
    OpenAI
    Total
    $11.25
    Input$1.25
    Output$10.00
  • GPT-5.1
    OpenAI
    Total
    $11.25
    Input$1.25
    Output$10.00
  • Command A
    cohere
    Total
    $12.50
    Input$2.50
    Output$10.00
  • Command R+ 08-2024
    cohere
    Total
    $12.50
    Input$2.50
    Output$10.00
  • GPT-4o
    OpenAI
    Total
    $12.50
    Input$2.50
    Output$10.00
  • Gemini 3 Pro
    Google
    Total
    $14.00
    Input$2.00
    Output$12.00
  • Gemini 3.1 Pro
    Google
    Total
    $14.00
    Input$2.00
    Output$12.00
  • GPT-5.2
    OpenAI
    Total
    $15.75
    Input$1.75
    Output$14.00
  • Gemini 2.5 Pro (>200k tokens)
    Google
    Total
    $17.50
    Input$2.50
    Output$15.00
  • GPT-5.4
    OpenAI
    Total
    $17.50
    Input$2.50
    Output$15.00
  • Claude Sonnet 4.6
    Anthropic
    Total
    $18.00
    Input$3.00
    Output$15.00
  • Sonar Pro
    perplexity
    Total
    $18.00
    Input$3.00
    Output$15.00
  • Claude Opus 4.8
    Anthropic
    Total
    $30.00
    Input$5.00
    Output$25.00
  • GPT-5.5
    OpenAI
    Total
    $35.00
    Input$5.00
    Output$30.00
  • Claude Fable 5
    Anthropic
    Total
    $60.00
    Input$10.00
    Output$50.00
  • Claude Mythos 5
    Anthropic
    Total
    $60.00
    Input$10.00
    Output$50.00
  • o3-pro
    OpenAI
    Total
    $100.00
    Input$20.00
    Output$80.00
  • GPT-5 Pro
    OpenAI
    Total
    $135.00
    Input$15.00
    Output$120.00
  • GPT-5.2 Pro
    OpenAI
    Total
    $189.00
    Input$21.00
    Output$168.00
  • GPT-5.4 Pro
    OpenAI
    Total
    $210.00
    Input$30.00
    Output$180.00
  • GPT-5.5 Pro
    OpenAI
    Total
    $210.00
    Input$30.00
    Output$180.00
88 models · 1,000,000 in · 1,000,000 out

How do I use the AI token cost calculator?

  1. Enter expected input tokens — roughly 0.75 words or 4 characters per token. A 2,000-word prompt is ~2,700 tokens.
  2. Enter expected output tokens — model responses are usually 200–2,000 tokens unless you explicitly set max_tokens.
  3. Set monthly request volume — multiplies the single-request cost to estimate monthly spend.
  4. Compare rows — the table sorts cheapest-first. Cached-input rates drop many providers by 75–90%.
  5. 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 $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-06-11, 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 112 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 4.6 charges $3.00 input vs $15.00 output (5x). 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 112 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-06-11. 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.