LLM Cost Calculator
Calculate what your LLM workload costs per request and per month. Compare input, cached, output, and reasoning token costs across 39 tracked models from 9 providers, with prompt caching and batch discounts applied. Not sure how many tokens you use? Count them with the AI token counter first.
TokenMath.net — AI Architecture Budget Estimate
AI Cost & API Budget Estimator
Simulate token bills with prompt caching discounts, batch API pricing, and real-world volume scaling across leading LLMs.
Reasoning models produce hidden deliberation tokens billed at output token rates.
Claude Sonnet 5
Workload Cost Comparison Across Tracked Models
Exact cost for 1,500 in + 500 out at 30,000 monthly requests.
| Model | Provider | Per Request | Per 1,000 | Monthly (30d) | Cache Support | Action |
|---|---|---|---|---|---|---|
| $0.00035 | $0.3500 | $10.50 | Yes | |||
| Mistral AI | $0.00052 | $0.5250 | $15.75 | Yes | ||
| DeepSeek | $0.00063 | $0.6300 | $18.90 | Yes | ||
| Meta / Together | $0.00080 | $0.8000 | $24.00 | Yes | ||
| OpenAI | $0.00090 | $0.9000 | $27.00 | Yes | ||
| Mistral AI | $0.00090 | $0.9000 | $27.00 | Yes | ||
| DeepSeek | $0.00105 | $1.05 | $31.50 | Yes | ||
| OpenAI | $0.00105 | $1.05 | $31.50 | Yes | ||
| xAI | $0.00140 | $1.40 | $42.00 | Yes | ||
| Mistral AI | $0.00150 | $1.50 | $45.00 | Yes | ||
| Alibaba / Qwen | $0.00159 | $1.5925 | $47.775 | Yes | ||
| $0.00170 | $1.70 | $51.00 | Yes | |||
| OpenAI | $0.00280 | $2.80 | $84.00 | Yes | ||
| $0.00300 | $3.00 | $90.00 | Yes | |||
| OpenAI | $0.00385 | $3.85 | $115.50 | Yes | ||
| Anthropic | $0.00400 | $4.00 | $120.00 | Yes | ||
| xAI | $0.00600 | $6.00 | $180.00 | Yes | ||
| OpenAI | $0.00700 | $7.00 | $210.00 | Yes | ||
Claude Sonnet 5Selected | Anthropic | $0.00800 | $8.00 | $240.00 | Yes | |
| Cohere | $0.00875 | $8.75 | $262.50 | Yes | ||
| OpenAI | $0.00900 | $9.00 | $270.00 | Yes | ||
| $0.00900 | $9.00 | $270.00 | Yes | |||
| $0.0150 | $15.00 | $450.00 | Yes | |||
| OpenAI | $0.0160 | $16.00 | $480.00 | Yes | ||
| Anthropic | $0.0200 | $20.00 | $600.00 | Yes | ||
| Anthropic | $0.0400 | $40.00 | $1,200.00 | Yes | ||
| OpenAI | $0.0400 | $40.00 | $1,200.00 | Yes | ||
| OpenAI | $0.0700 | $70.00 | $2,100.00 | No |
Real-World LLM Workload Cost Benchmarks
Estimated monthly costs for typical architectures with 50% prompt caching applied:
| Architecture Tier | Avg Prompt Tokens | Claude Sonnet 5 | GPT-5.6 Sol | Gemini 3.8 Flash | Claude Haiku 4.5 |
|---|---|---|---|---|---|
| Light Chatbot (10k req/mo) | 500 in / 200 out | $25.50 / mo | $51.00 / mo | $9.56 / mo | $12.75 / mo |
| Document Analysis (50k req/mo) | 4,000 in / 800 out | $620.00 / mo | $1,240.00 / mo | $232.50 / mo | $310.00 / mo |
| Production RAG SaaS (500k req/mo) | 8,000 in / 1,200 out | $10,400.00 / mo | $20,800.00 / mo | $3,900.00 / mo | $5,200.00 / mo |
| Autonomous Agent Loop (1M req/mo) | 12,000 in / 2,000 out | $33,200.00 / mo | $66,400.00 / mo | $12,450.00 / mo | $16,600.00 / mo |
How to Choose the Right LLM Cost Tier
Key models: Gemini 2.5 Flash-Lite, GPT-5.6 Luna, Mistral Small 4
Key models: Claude Sonnet 5, GPT-5.6 Sol, Gemini 3.8 Flash, Llama 4 Vivas
Key models: OpenAI o3, Claude Fable 5.1, o3-pro
Need a specific scenario? Try the prompt caching calculator, RAG cost calculator, or AI agent cost calculator.
LLM Cost Calculator FAQ
How is LLM API cost calculated?
Cost = (input tokens ÷ 1,000,000 × input price) + (output tokens ÷ 1,000,000 × output price). Providers bill input tokens (the prompt and context you send) and output tokens (the completion) separately. Output tokens are typically 3x to 5x more expensive because each one requires a sequential forward pass through the model.
How does prompt caching reduce my monthly API bill?
When a repeated prompt prefix (system instructions, tool definitions, or retrieved RAG context) exceeds the provider's threshold (typically 1,024 tokens), the provider caches it. On cache hits, input prices are discounted by 50% to 90%, which is the single largest saving for chat and agent workloads.
What are reasoning tokens, and why do they cost more?
Reasoning models (like OpenAI o3, o3-pro, and o4-mini) run an internal chain-of-thought before the final answer. Those hidden tokens are billed at output rates, so a short visible answer can still cost several thousand output tokens.
When should I use Batch API mode?
If you don't need a synchronous response (offline extraction, overnight evaluations, bulk summarization), major providers offer 50% discounts on both input and output tokens for jobs completed within a 24-hour window.
How many tokens is my prompt?
Roughly 1 token ≈ 0.75 English words, or about 4 characters. For an exact count per model, paste your text into the TokenMath token counter, then send the result straight into this calculator.