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:
CommentsEstimate 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.
Token counts are estimated locally (±3% vs official tokenizers). Text is never sent to any server.
Cheapest option at this workload
| Model | Per request | |||||
|---|---|---|---|---|---|---|
deepseekDeepSeek V3 (chat) | $0.280/M | $0.420/M | $0.000105 | $3.14 | 131K | |
deepseekDeepSeek R1 (reasoner) | $0.280/M | $0.420/M | $0.000105 | $3.14 | 131K | |
openaiGPT-4o mini | $0.150/M | $0.600/M | $0.000131 | $3.93 | 128K | |
mistralCodestral | $0.300/M | $0.900/M | $0.000202 | $6.07 | 128K | |
metaLlama 3.3 70B (Together) | $1.04/M | $1.04/M | $0.000285 | $8.55 | 131K | |
mistralMistral Large 2 | $0.500/M | $1.50/M | $0.000337 | $10.11 | 262K | |
openaiGPT-3.5 Turbo | $0.500/M | $1.50/M | $0.000337 | $10.11 | 16K | |
openaio3-mini | $1.10/M | $4.40/M | $0.000961 | $28.84 | 200K | |
openaiGPT-4o | $2.50/M | $10.00/M | $0.002185 | $65.55 | 128K | |
openaiGPT-4 Turbo | $10.00/M | $30.00/M | $0.006740 | $202 | 128K | |
openaio1 | $15.00/M | $60.00/M | $0.0131 | $393 | 200K |
litellm· last fetched 16h agoTips & 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
Prompt Template Tester
Write a prompt with {{variable}} placeholders, fill in values, and preview the final prompt. Detects every variable and flags any you left unfilled. 100% local.
Prompt Diff
Compare two versions of a prompt line by line and see the token delta between them — so you know exactly what changed and whether an edit made the prompt cheaper or more expensive. 100% local.
Embedding Cost Calculator
Estimate the cost of embedding a corpus — pick a model, enter the number of documents and average tokens each, and get the total token count and dollar cost. 100% local.
Vector Storage Calculator
Estimate how much memory or disk your embeddings need — enter vector count, dimensions, and precision (float32/float16/int8/binary) to see raw and indexed size. 100% local.
Prompt Cache Calculator
See how much prompt caching saves you. Enter your cached prefix size, per-request tokens, volume, and hit rate to compare cost with and without caching across models that support it. 100% local.
Batch API Cost Calculator
Compare real-time vs Batch API cost for a bulk job. Enter request count and per-request tokens to see how much the ~50% batch discount saves across models that support it. 100% local.