Loading...

Cost Calculator

LLM API Cost Calculator

Estimate and compare token costs across OpenAI, Anthropic, Google, and open models for your own workload.

Updated FreeNo signup

OpenAI

Anthropic

Google

DeepSeek

xAI

Mistral

Meta

1,000 tokens

500 tokens

100,000 requests

Priced at each model's cache-read rate when supported

  • Gemini 2.5 ProCheapest
    $625.00/mo
    $0.006250 / requestin $0.001250 · out $0.005000
  • GPT-5.4
    $1,000.00/mo
    $0.0100 / requestin $0.002500 · out $0.007500
  • Claude Opus 4.8
    $1,750.00/mo
    $0.0175 / requestin $0.005000 · out $0.0125

input cost output cost. Estimates only — see methodology below.

TL;DR

At current prices, 1M input + 1M output tokens costs roughly $0.4200 on DeepSeek V4 Flash and $60.00 on Claude Fable 5. Output tokens are billed several times higher than input on nearly every model, so long responses dominate the bill. Use the calculator to price your own workload; the full per-model rate table is below (updated 2026-07-05).

Cross-provider price table

Updated Jul 5, 2026
Cross-provider LLM API pricing per 1M tokens, updated 2026-07-05
GPT-5 nanogpt-5-nanoOpenAI$0.05$0.4$0.01400K
GPT-4.1 nanogpt-4.1-nanoOpenAI$0.1$0.4$0.031.0M
GPT-4o minigpt-4o-miniOpenAI$0.15$0.6$0.08128K
GPT-5 minigpt-5-miniOpenAI$0.25$2$0.03400K
GPT-4.1 minigpt-4.1-miniOpenAI$0.4$1.6$0.11.0M
o4-minio4-miniOpenAI$1.1$4.4$0.28200K
GPT-5gpt-5OpenAI$1.25$10$0.13400K
GPT-4.1gpt-4.1OpenAI$2$8$0.51.0M
o3o3OpenAI$2$8$0.5200K
GPT-5.4gpt-5.4OpenAI$2.5$15$0.25400K
GPT-4ogpt-4oOpenAI$2.5$10$1.25128K
GPT-5.5gpt-5.5OpenAI$5$30$0.5400K
Claude Haiku 4.5claude-haiku-4-5Anthropic$1$5$0.1200K
Claude Sonnet 5claude-sonnet-5Anthropic$3$15$0.31M
Claude Sonnet 4.6claude-sonnet-4-6Anthropic$3$15$0.31M
Claude Opus 4.8claude-opus-4-8Anthropic$5$25$0.51M
Claude Opus 4.7claude-opus-4-7Anthropic$5$25$0.51M
Claude Fable 5claude-fable-5Anthropic$10$50$11M
Gemini 2.5 Flash-Litegemini-2.5-flash-liteGoogle$0.1$0.4$0.011.0M
Gemini 3.1 Flash-Litegemini-3.1-flash-liteGoogle$0.25$1.5$0.031.0M
Gemini 2.5 Flashgemini-2.5-flashGoogle$0.3$2.5$0.031.0M
Gemini 2.5 Progemini-2.5-proGoogle$1.25$10$0.131.0M
Gemini 3.5 Flashgemini-3.5-flashGoogle$1.5$9$0.151.0M
Gemini 3.1 Progemini-3.1-proGoogle$2$12$0.21.0M
DeepSeek V4 Flashdeepseek-v4-flashDeepSeek$0.14$0.28$01M
Grok 4.3grok-4.3xAI$1.25$2.51M
Mistral Small 4mistral-small-latestMistral$0.15$0.6128K
Codestralcodestral-latestMistral$0.3$0.9256K
Mistral Large 3mistral-large-latestMistral$0.5$1.5128K
Llama 3.3 70B Instruct Turbollama-3.3-70bMeta$1.04$1.04131K
Llama 3.1 405B Instruct Turbollama-3.1-405bMeta$3.5$3.5131K

How it works

For each selected model the calculator computes perRequest = (inputTokens ÷ 1e6) × inputPerM + (outputTokens ÷ 1e6) × outputPerM, then multiplies by requests per month. If you supply cached input tokens and the model offers prompt caching, those tokens are priced at the model's cache-read rate and the remainder at the standard input rate.

Scope is text token pricing for chat/completion models. Per-image, per-character, and audio pricing are out of scope, as are batch/flex discounts and tiered pricing for very large prompts (noted per model in the table). Every rate was verified against the provider's official pricing page on 2026-07-05; the table shows that date so you can judge freshness.

FAQ

How is LLM API cost calculated?
Per request, cost = (input tokens ÷ 1,000,000 × input price per 1M) + (output tokens ÷ 1,000,000 × output price per 1M). Monthly cost multiplies that by your request volume. Output tokens are billed at a higher rate than input tokens on almost every model, so responses usually dominate the bill.
Why is output pricing higher than input pricing?
Generating tokens is more compute-intensive than reading them, so providers charge more for output. On GPT-4o output is 4× the input rate ($10 vs $2.50 per 1M); on Claude Opus 4.8 it is 5× ($25 vs $5). Workloads that produce long responses cost far more than their prompt size suggests.
How much do GPT-4o, Claude, and Gemini cost per 1M tokens?
As of the updated date: GPT-4o is $2.50 input / $10 output per 1M tokens; Claude Opus 4.8 is $5 / $25; Claude Sonnet 5 is $3 / $15; Gemini 2.5 Pro is $1.25 / $10; Gemini 2.5 Flash is $0.30 / $2.50. The full table is above and updates as prices change.
Do cached (prompt caching) tokens reduce cost?
Yes. Most providers offer prompt caching that bills repeated input tokens at a large discount — often around 10% of the normal input rate. Enter your cached input tokens per request and the calculator prices them at each model's cache-read rate. Note some providers also charge a cache-write premium or hourly storage fee not captured by a single per-token number.
Why do my real costs differ from this estimate?
This tool covers text token pricing for chat/completion models. Real bills also include images, audio, tool/function-call tokens, reasoning tokens on o-series and thinking models, batch or flex discounts, and provider-specific tiered pricing for very large prompts. Treat the output as a close estimate and verify against your provider dashboard.