{T}
TokenMath.net
Live Pricing EngineUpdated 2026-10-02 18:28 UTCCLI: npx @tokenmath/tokenmath calc

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.

AI Cost & API Budget Estimator

Prices last updated: 2026-10-02 18:28 UTC

Simulate token bills with prompt caching discounts, batch API pricing, and real-world volume scaling across leading LLMs.

Workload Parameters
Presets:
Tier 1 Quota (Free-Tier): 1,000 RPM · 200k TPMModel Specs
tokens
tokens
None (0)

Reasoning models produce hidden deliberation tokens billed at output token rates.

0%
Batch API Mode (50% Off where supported)
24h asynchronous execution discount
Apply Diurnal Off-Peak (DeepSeek 50% Off-Peak)
Special scheduled discounts for nocturnal batch & high-throughput pipelines
Calculated Projection

Claude Sonnet 5

Anthropic
Single Request
$0.00800
$8.00 / 1k reqs
Daily Cost
$8.00
1,000 reqs/day
Monthly (30d)
$240.00
30,000 reqs/mo
Yearly Run-Rate
$2,880.00
Annual projection
Input Tokens (1,500)$0.00300 / req
Output Tokens (500)$0.00500 / req
Total Monthly Volume30,000 requests
Rates verified directly against official API docs.Docs

Workload Cost Comparison Across Tracked Models

Exact cost for 1,500 in + 500 out at 30,000 monthly requests.

ModelProviderPer RequestPer 1,000Monthly (30d)Cache SupportAction
Google$0.00035$0.3500$10.50Yes
Mistral AI$0.00052$0.5250$15.75Yes
DeepSeek$0.00063$0.6300$18.90Yes
Meta / Together$0.00080$0.8000$24.00Yes
OpenAI$0.00090$0.9000$27.00Yes
Mistral AI$0.00090$0.9000$27.00Yes
DeepSeek$0.00105$1.05$31.50Yes
OpenAI$0.00105$1.05$31.50Yes
xAI$0.00140$1.40$42.00Yes
Mistral AI$0.00150$1.50$45.00Yes
Alibaba / Qwen$0.00159$1.5925$47.775Yes
Google$0.00170$1.70$51.00Yes
OpenAI$0.00280$2.80$84.00Yes
Google$0.00300$3.00$90.00Yes
OpenAI$0.00385$3.85$115.50Yes
Anthropic$0.00400$4.00$120.00Yes
xAI$0.00600$6.00$180.00Yes
OpenAI$0.00700$7.00$210.00Yes
Anthropic$0.00800$8.00$240.00Yes
Cohere$0.00875$8.75$262.50Yes
OpenAI$0.00900$9.00$270.00Yes
Google$0.00900$9.00$270.00Yes
Google$0.0150$15.00$450.00Yes
OpenAI$0.0160$16.00$480.00Yes
Anthropic$0.0200$20.00$600.00Yes
Anthropic$0.0400$40.00$1,200.00Yes
OpenAI$0.0400$40.00$1,200.00Yes
OpenAI$0.0700$70.00$2,100.00No

Real-World LLM Workload Cost Benchmarks

Estimated monthly costs for typical architectures with 50% prompt caching applied:

Architecture TierAvg Prompt TokensClaude Sonnet 5GPT-5.6 SolGemini 3.8 FlashClaude 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

Ultra Low-Cost ($0.05 - $0.30 / 1M)
High-volume classification, extraction, routing

Key models: Gemini 2.5 Flash-Lite, GPT-5.6 Luna, Mistral Small 4

Balanced Workhorse ($0.75 - $4.00 / 1M)
Coding agents, full-stack engineering, production RAG

Key models: Claude Sonnet 5, GPT-5.6 Sol, Gemini 3.8 Flash, Llama 4 Vivas

Deep Reasoning ($2.00 - $20.00 / 1M)
Complex mathematical proofs, security audits, architecture design

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.