LLM API Pricing Comparison
Enter your monthly input and output token volume and see the exact per-month API cost of 26 text models — GPT, Claude, Gemini, Grok, DeepSeek, Mistral and Llama — ranked cheapest-first, with a USD→LKR toggle. No signup, no ads.
How it works
The calculator answers one question — which LLM API is cheapest for my workload— by applying each provider's published per-token rate to the exact volume you enter. Every model's price is stored as USD per 1,000,000 tokens for standard synchronous text, split into a separate input (prompt) rate and output (completion) rate, because providers bill the two differently and output is usually the larger cost.
For a model with input price pin, output price pout and cache-read price pcache, given monthly input tokens I, output tokens O and a cached input share s:
- Split input into cached and uncached tokens: uncached = I × (1 − s) and cached = I × s.
- Input cost = (uncached ÷ 1,000,000 × pin) + (cached ÷ 1,000,000 × pcache). Models with no published cache rate use pcache = pin (no discount).
- Output cost = O ÷ 1,000,000 × pout.
- Monthly cost (USD) = input cost + output cost. The table sorts ascending by this figure and flags the minimum as Best value.
- If you switch to LKR, every figure is multiplied by your editable USD→LKR rate (default Rs 305, the Central Bank of Sri Lanka indicative rate).
The result is cross-checked by an independent, algebraically-equivalent blended-rate formula that folds the cached and uncached input rates into one effective per-token price — effInput = pin × (1 − s) + pcache × s — and produces the same total to the cent. Prices are a static, verified table (last checked 2026-07-17); no live network calls are made, so the tool stays fast and never breaks on a failed price fetch. Because model prices change often, always confirm the current rate on the provider's page before committing — every source is linked below.
Worked examples
Frequently asked questions
Sources & references
- OpenAI — official API pricing (GPT models)
- Anthropic — Claude API pricing
- Anthropic — model pricing & cache-read rates (docs)
- Google — Gemini API pricing
- xAI — Grok model token rates
- DeepSeek — API pricing
- Mistral AI — model pricing
- Groq — provider-hosted Llama pricing
- Together AI — provider-hosted open-weight pricing
- Central Bank of Sri Lanka — indicative USD/LKR exchange rate
Every rate in the price table was cross-checked against these official pricing pages on 2026-07-17. Provider-hosted open-weight models (Llama, Qwen) are priced by the serving provider, not the model author. LLM prices change frequently — confirm the current figure on the provider's page before you commit to a model.
Related tools
Comments & feedback
Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.
Spotted a stale price, missing model, or edge case?
Email me at [email protected] — most fixes ship within 24 hours.