DevKits

AI API Cost Calculator (GPT-4o, Claude, Gemini, DeepSeek)

Estimate monthly LLM API cost across GPT-4o, Claude 3.5, Gemini, DeepSeek and 100+ models. Compare providers side-by-side with prompt-caching and batch discounts. Free, no signup — prices refreshed daily from the public LiteLLM catalog.

Last updated:

Comments

Estimate the cost of an OpenAI / Anthropic / Google API call by choosing a model and entering token counts (input, output, cache read, batch). Compare multiple models side-by-side. Pricing is fetched daily from the public LiteLLM catalog.

273 chars · 9 lines

Token counts are estimated locally (±3% vs official tokenizers). Text is never sent to any server.

Cheapest option at this workload

GPT-5 nano$2.51/mo· $0.000084 per request · ~74 in / 200 out tokens
ModelPer request
openaiGPT-5 nano
$0.050/M$0.400/M$0.000084$2.51272K
googleGemini 2.5 Flash Lite
$0.100/M$0.400/M$0.000088$2.631049K
deepseekDeepSeek (chat)
$0.280/M$0.420/M$0.000105$3.14131K
deepseekDeepSeek (reasoner)
$0.280/M$0.420/M$0.000105$3.14131K
anthropicClaude Haiku 5.5
$0.100/M$0.500/M$0.000108$3.241000K
mistralMistral Small
$0.150/M$0.600/M$0.000131$3.93262K
openaiGPT-4o mini
$0.150/M$0.600/M$0.000131$3.93128K
metaLlama-4-Scout-17B-16E (Together)
$0.180/M$0.590/M$0.000131$3.941049K
mistralCodestral
$0.300/M$0.900/M$0.000202$6.07128K
deepseekDeepSeek V4 Flash
$0.300/M$1.20/M$0.000262$7.871000K
openaiGPT-5.4 nano
$0.200/M$1.25/M$0.000265$7.94272K
metaLlama-3.3-70B (Together)
$1.04/M$1.04/M$0.000285$8.55131K
openaiGPT-4.1 mini
$0.400/M$1.60/M$0.000350$10.491048K
openaiGPT-5 mini
$0.250/M$2.00/M$0.000419$12.56272K
mistralDevstral
$0.400/M$2.00/M$0.000430$12.89256K
mistralMistral Large
$0.700/M$2.10/M$0.000472$14.151049K
googleGemini 2.5 Flash
$0.300/M$2.50/M$0.000523$15.681049K
googleGemini 3.5 Flash Lite
$0.300/M$2.50/M$0.000523$15.681049K
googleGemini 3.8 Flash
$0.750/M$3.75/M$0.000807$24.211049K
deepseekDeepSeek V4 Pro
$1.32/M$3.96/M$0.000890$26.691000K
openaiGPT-5.4 mini
$0.750/M$4.50/M$0.000956$28.67272K
openaio4-mini
$1.10/M$4.40/M$0.000961$28.84200K
anthropicClaude Haiku 4.5
$1.00/M$5.00/M$0.001079$32.37200K
xaiGrok 4.5
$2.00/M$6.00/M$0.001348$40.44500K
xaiGrok 4.6
$2.00/M$6.00/M$0.001348$40.44500K
xaiGrok 4.7
$2.00/M$6.00/M$0.001348$40.44500K
mistralMistral Medium 3.5
$1.50/M$7.50/M$0.001611$48.33262K
openaiGPT-4.1
$2.00/M$8.00/M$0.001748$52.441048K
openaio3
$2.00/M$8.00/M$0.001748$52.44200K
googleGemini 3.5 Flash
$1.50/M$9.00/M$0.001914$57.421049K
openaiGPT-5
$1.25/M$10.00/M$0.002093$62.78272K
googleGemini 2.5 Pro
$1.25/M$10.00/M$0.002095$62.851049K
anthropicClaude Sonnet 5
$2.00/M$10.00/M$0.002158$64.741000K
anthropicClaude Sonnet 5.5
$2.00/M$10.00/M$0.002158$64.741000K
openaiGPT-4o
$2.50/M$10.00/M$0.002185$65.55128K
googleGemini 3.1 Pro
$2.00/M$12.00/M$0.002552$76.561049K
openaiGPT-5.4
$2.50/M$15.00/M$0.003185$95.551050K
anthropicClaude Sonnet 4.5
$3.00/M$15.00/M$0.003237$97.11200K
anthropicClaude Sonnet 4.6
$3.00/M$15.00/M$0.003237$97.111000K
anthropicClaude Opus 5.5
$4.00/M$20.00/M$0.004316$1291000K
anthropicClaude Opus 4.8
$5.00/M$25.00/M$0.005395$1621000K
anthropicClaude Opus 5
$5.00/M$25.00/M$0.005395$1621000K
openaiGPT-5.5
$5.00/M$30.00/M$0.006370$1911050K
openaiGPT-5.6
$5.00/M$30.00/M$0.006370$191922K
Pricing source: litellm· last fetched 7h ago

What is AI Cost Calculator?

LLM APIs bill per token, and input and output tokens are priced differently — output is usually 3–5× more expensive than input. That makes the true cost of a feature hard to eyeball, especially once prompt caching and the Batch API enter the picture. This calculator lets you pick a model, enter the input, output, cached-read, and batched token counts for a typical request, and see the exact dollar cost — then line up several models side by side so you can choose the cheapest one that meets your quality bar. Prices come from the public LiteLLM model catalog and are refreshed daily, so the numbers track provider changes without manual updates.

How to estimate LLM API cost

  1. 1Pick the model you're pricing (GPT, Claude, Gemini, etc.).
  2. 2Enter the tokens for a representative request — input, expected output, and any cached-read or batched tokens.
  3. 3Read the per-request cost, and add more models to compare them side by side.
  4. 4Multiply by your expected request volume to project monthly spend.

Key Concepts

What is a token
The unit LLMs bill and measure in — roughly 4 characters of English. See the full guide on how tokenization works.
Prompt caching
Caching a repeated prompt prefix bills those tokens at a steep discount (often ~10% of input price) on later requests.
Batch API
Asynchronous processing at ~50% off, for work that can tolerate results within a target window (often 24h).

Tips & Best Practices

  • ▸Input tokens are typically 3-5× cheaper than output tokens; long system prompts hurt total cost most when the response is short.
  • ▸Cache reads (Anthropic / OpenAI prompt caching) can cut input cost by 90%+ for repeated system prompts.
  • ▸Batch API (OpenAI) is 50% cheaper but responses are delivered asynchronously within 24 hours.

Frequently Asked Questions

Where do the prices come from?

Prices are refreshed daily from the BerriAI/litellm public pricing catalog, which itself mirrors each provider's official pricing page. When our automated fetch fails we fall back to a manually maintained snapshot so the tool never shows blank values.

How accurate is the token count?

Token counts use a fast statistical estimator that matches official tokenizers within ±3% for typical English/code prompts. For billing-critical estimates, verify with the provider's own tokenizer.

Does the calculator support prompt caching and batch discounts?

Yes. Toggle 'Cached input' to price the input tokens at the cache-read rate (available on GPT-4o, Claude 3.5, DeepSeek and others). Toggle 'Batch API' to apply the 50%-off batch rate where the provider supports it.

Is my prompt sent to any server?

No. Token estimation runs entirely in your browser. The tool only fetches the public pricing catalog from our server; your prompt text never leaves the tab.

Try Next

Text Chunker

Split long text into overlapping chunks for embedding and RAG pipelines. Preview recursive, paragraph, sentence, or fixed strategies with live token counts. Runs 100% in your browser.

Related Tools

Reference & Guides