AI Cost Calc

Claude vs GPT vs Gemini: API Pricing Compared (2026)

2026-07-05

Comparing LLM providers on price is harder than it looks: each one meters input, output and cache differently, and a "cheap" model can lose on a real workload. Here we run one identical workload through the current price lists (verified 2026-07-05 on each provider's official page) and look at where each provider actually wins.

The test workload

A typical assistant feature: 150,000 requests/month, ~400 input tokens and ~300 output tokens per request → 60M input + 45M output tokens monthly. No caching, no extras. Estimated token bill per model:

  • Gemini 2.5 Flash ($0.30 in / $2.50 out): ~$131/month
  • GPT-5.4 mini ($0.75 / $4.50): ~$248/month
  • Claude Haiku 4.5 ($1 / $5): ~$285/month
  • Claude Sonnet 5 ($2 / $10, introductory through 2026-08-31): ~$570/month
  • Gemini 3.1 Pro Preview ($2 / $12): ~$660/month
  • GPT-5.4 ($2.50 / $15): ~$825/month

Two orders of magnitude separate the cheapest and priciest tiers across providers — which is why model choice, not provider loyalty, is the biggest cost decision. Run your own workload in the calculator to see your ranking.

Caching changes the ranking

If your requests share a long stable prefix (system prompt, tool definitions, knowledge snippets), cached-input pricing matters as much as the sticker price:

  • OpenAI: cached input at ~10% of the input rate (e.g. GPT-5.4: $0.25 vs $2.50), applied automatically to repeated prefixes.
  • Anthropic: cache reads at 10% of input, but cache writes cost 1.25× input — caching pays off after a single reuse within the 5-minute window.
  • Google Gemini: explicit context caching at roughly 10% of input, with storage-time billing on some tiers.

An input-heavy RAG app with a 60–80% cache-hit rate can flip the comparison table entirely. Set the cache slider in the calculator to your expected hit rate and watch the ranking change.

When each provider makes sense

  • Claude (Anthropic) — long-context work, agent workflows, careful writing; Sonnet 5's introductory pricing (until 2026-08-31) makes it unusually competitive in the mid tier.
  • GPT (OpenAI) — broadest ecosystem and tooling; the mini tier is a strong price/quality default for product features.
  • Gemini (Google) — the Flash tiers are among the cheapest capable models anywhere, and integrate naturally with a Google Cloud stack.

The honest answer

There is no universally cheapest provider — there's a cheapest provider for your token shape (input-heavy vs output-heavy, cacheable vs not). Model it in two minutes with the AI API Cost Calculator, and re-check quarterly: providers reprice aggressively, and Claude Sonnet 5's intro pricing already has an expiry date. Estimates are for planning only — always verify current prices on each provider's official page.