Free calculator · 16 models

What does an LLM API actually cost?

The LLM cost calculator is the model-by-model version of the AI cost calculator. Pick any hosted LLM, plug in your tokens, and see the real monthly bill — with every other model ranked next to it.

LLM cost calculator

Estimate your AI bill, model by model.

Pick an LLM, plug in your token mix and monthly calls, and see the real bill — ranked against every other model we track.

Current monthly cost$65
Cheapest alternative$65−99%
Model$ / M input$ / M outputMonthlyvs. current
GPT-5 nanoOpenAI$0.05$0.40$65−99%
Mistral Small 3.1Mistral$0.10$0.30$80−98%
Gemini 2.5 Flash-LiteGoogle$0.10$0.40$90−98%
Qwen 2.5 72BAlibaba · OpenRouter$0.40$0.40$240−95%
DeepSeek V3DeepSeek$0.27$1.10$245−95%
GPT-5 miniOpenAI$0.25$2.00$325−94%
Gemini 2.5 FlashGoogle$0.30$2.50$400−92%
Llama 3.1 70BMeta · Together$0.88$0.88$528−89%
Claude Haiku 4.5Anthropic$1.00$5.00$1,000−80%
Mistral Large 3Mistral$2.00$6.00$1,600−68%
GPT-5OpenAI$1.25$10.00$1,625−68%
Gemini 2.5 ProGoogle$1.25$10.00$1,625−68%
GPT-4.1OpenAI$2.00$8.00$1,800−64%
Claude Sonnet 5Anthropic$2.00$10.00$2,000−60%
Claude Sonnet 4.5Anthropic$3.00$15.00$3,000−40%
Claude Opus 4.8Anthropic$5.00$25.00$5,000+0%

Prices reflect typical 2026 list pricing and may change. Verify with each provider before you commit to a budget.

Price alone doesn't tell you if a cheaper model can safely replace yours.

Read the model evaluation guide →

How the estimate is calculated

monthly cost = calls × input tokens × ($input / 1M) + calls × output tokens × ($output / 1M)

Worked example. At the default reference workload of 100,000 calls per month (5,000 input / 1,000 output tokens), Claude Sonnet 4.5 costs$3,000 per month at list price. The calculator applies the same formula to every model in the registry and ranks the results cheapest first.

Limitations

  • The estimate is a planning estimate, not a bill: prompt caching, batching, free tiers, image token multipliers and negotiated enterprise rates are not modeled.
  • Prices are published list prices in USD per 1M tokens; DeepSeek peak/off-peak differences are shown at the off-peak rate with a caveat.
  • A cheaper model is not a better deal if it fails more tasks — compare cost per successful task via the cost-per-successful-task methodology.
  • The calculator runs entirely in your browser; no workload is sent to or logged by Harpd.

Pricing source & data

List prices come from each provider's official pricing page and were last verified 2026-08-18. The same registry powers the LLM pricing table, themachine-readable dataset (/data/llm-pricing.json) and theHarpd evidence register. How the prices are collected and kept current:model pricing methodology.

LLM cost calculator, answered

What is the cheapest LLM API in 2026?
Hosted open-weight models (Llama 3.1 8B, Qwen 2.5 72B) on Together / OpenRouter / Fireworks are typically the cheapest. For proprietary models, GPT-4o mini and Gemini 2.5 Flash dominate the budget tier. The calculator ranks every model we track, cheapest first.
How is the LLM cost calculated?
Monthly cost = (calls × input tokens × $input per 1M) + (calls × output tokens × $output per 1M). No prompt caching, no batching, no enterprise discounts — just list price.
Does Claude cost more than GPT?
At list price, Claude Sonnet 4 ($3 / $15 per 1M) is roughly comparable to GPT-4.1 ($2 / $8). Claude Opus 4 ($15 / $75) is 3–4× GPT-4.1 on output tokens. The calculator shows the exact numbers for your workload.
Is DeepSeek really cheaper than Claude?
For raw token price, yes — DeepSeek V3 is around $0.27 / $1.10 per 1M, which is roughly 10× cheaper than Claude Sonnet on input. The catch is quality on hard tasks, which you should measure against your own reference answers before switching.
What about Gemini pricing?
Gemini 2.5 Flash is around $0.30 / $2.50 per 1M, which makes it one of the cheapest proprietary models. Gemini 2.5 Pro is roughly comparable to Claude Sonnet on input, more expensive on output.
Can I get the pricing data?
The page renders the same data the calculator uses. The full list is the single source of truth in marketing/src/lib/pricing-registry.ts and is also exported as machine-readable /data/llm-pricing.json and .csv for any benchmark or research page.