LLM Cost Calculator
Compare OpenAI, Anthropic, Gemini, and DeepSeek API costs from tokens or pasted text. Free, no signup.
July 2026 (approximate public list prices)
Privacy: Prompt text and calculations stay in your browser.
Providers
| Model | Provider | In / 1M | Out / 1M | Input $ | Output $ | Total | / req |
|---|---|---|---|---|---|---|---|
| DeepSeek V4 Flash | DeepSeek | $0.1400 | $0.2800 | $2.10 | $1.40 | $3.50 | $0.000350 |
| GPT-5.4 nano | OpenAI | $0.2000 | $1.25 | $3.00 | $6.25 | $9.25 | $0.000925 |
| DeepSeek V4 Pro | DeepSeek | $0.4350 | $0.8700 | $6.52 | $4.35 | $10.88 | $0.001087 |
| Gemini 3.1 Flash-Lite Matches Instant Tools high-volume default | $0.2500 | $1.50 | $3.75 | $7.50 | $11.25 | $0.001125 | |
| Gemini 3 Flash | $0.5000 | $3.00 | $7.50 | $15.00 | $22.50 | $0.002250 | |
| GPT-5.4 mini | OpenAI | $0.7500 | $4.50 | $11.25 | $22.50 | $33.75 | $0.003375 |
| Claude Haiku 4.5 | Anthropic | $1.00 | $5.00 | $15.00 | $25.00 | $40.00 | $0.004000 |
| Gemini 3.5 Flash | $1.50 | $9.00 | $22.50 | $45.00 | $67.50 | $0.006750 | |
| Gemini 3.1 Pro ≤200K context tier; higher above that | $2.00 | $12.00 | $30.00 | $60.00 | $90.00 | $0.009000 | |
| GPT-5.4 | OpenAI | $2.50 | $15.00 | $37.50 | $75.00 | $112.50 | $0.0112 |
| Claude Sonnet 4.6 | Anthropic | $3.00 | $15.00 | $45.00 | $75.00 | $120.00 | $0.0120 |
| Claude Opus 4.8 | Anthropic | $5.00 | $25.00 | $75.00 | $125.00 | $200.00 | $0.0200 |
| GPT-5.5 | OpenAI | $5.00 | $30.00 | $75.00 | $150.00 | $225.00 | $0.0225 |
How to Use
- 1Pick tokens or paste a typical prompt to estimate input size.
- 2Set expected completion size and how many requests you run per month.
- 3Toggle providers, cache hit rate, and batch if your workload qualifies.
- 4Sort is automatic (cheapest first)—spot the best price/performance tier.
Example scenarios
Support chatbot
1,500 in · 400 out · 50,000 req/moOften won by Flash-Lite / mini / DeepSeek Flash tiers.
Code agent
8,000 in · 2,000 out · 5,000 req/moMid tiers (Sonnet / GPT-5.4 / Gemini Flash) trade cost for quality.
Tips
- •Output tokens usually dominate cost — constrain response length when you can.
- •Prompt caching only helps when a large stable prefix is reused.
- •Batch APIs are great for offline jobs; not for interactive chat latency.
- •Re-check provider pricing pages before locking a budget — list rates move.
Frequently Asked Questions
How accurate is this LLM cost calculator?
It multiplies your token counts by published list prices (USD per 1M tokens). Real bills also depend on caching, batch/flex tiers, long-context surcharges, image tokens, and provider promotions. Treat results as planning estimates and verify on official pricing pages.
How do you estimate tokens from text?
We use a rough English heuristic of ~4 characters per token. Exact counts differ by tokenizer (OpenAI, Anthropic, Gemini). For billing-critical work, count with the provider’s tokenizer.
What does cache hit rate mean?
If your provider supports prompt caching, repeated prompt prefixes can bill at a lower cached-input rate. The slider blends standard vs cached input rates for the estimated input portion.
What is the batch discount?
Many providers offer ~50% off for asynchronous Batch APIs. Enabling Batch halves both input and output cost in this calculator as a simple approximation.
Does my prompt leave the browser?
No. Token estimates and cost math run entirely client-side.
Is the calculator free?
Yes. No signup and no API calls required to compare models.
Related Tools
JSON to Schema
Infer Zod schemas for structured LLM outputs
OpenAPI to Tool Schemas
Turn APIs into function-calling schemas
MCP Tool Checker
Score agent tool schemas before shipping
AI Content Detector
Check if text looks AI-generated
llms.txt Generator
Help AI crawlers find your product pages
Prompt & Rules Linter
Score system prompts and agent rules for clarity