LLM API Cost Comparator

Compare estimated cost across major LLM APIs for a given number of input and output tokens.

Pricing snapshot as of August 13, 2026. LLM API pricing changes frequently, verify current rates at each provider's own pricing page (linked in the table) before budgeting a production workload.
ModelProvider$/1M in$/1M outEst. cost this run
GPT-4o miniOpenAI$0.15$0.60$0.00270
GPT-4oOpenAI$2.50$10.00$0.0450
Gemini 3 FlashGoogle$0.50$3.00$0.0110
Gemini 3.1 ProGoogle$2.00$12.00$0.0440
Claude Sonnet 5Anthropic$2.00$10.00$0.0400
Claude Opus 4.6Anthropic$5.00$25.00$0.1000

Worked example

10,000 input tokens and 2,000 output tokens on GPT-4o mini costs $0.15/1M × 0.01 + $0.60/1M × 0.002 = $0.0015 + $0.0012 = $0.0027. The same call on Claude Opus 4.6 costs $5.00/1M × 0.01 + $25.00/1M × 0.002 = $0.05 + $0.05 = $0.10, roughly 37x more expensive for an identical prompt and response length.

Capability positioning, not a numeric score

This table intentionally skips a numeric leaderboard score (MMLU, Arena ELO, etc.) next to each model. Those rankings shift week to week as providers ship updates and evaluators re-baseline — the same reason this page snapshots pricing by date instead of claiming a live feed. What tends to stay stable for longer is each provider's own tier positioning: which model they built for cheap, high-volume calls versus their hardest reasoning tasks. That's what the table below reflects.

ModelPositioning
GPT-4o miniOpenAI's compact, low-cost tier — built for high-volume, latency-sensitive work (classification, extraction, simple chat), not frontier reasoning.
GPT-4oOpenAI's general-purpose multimodal flagship at this pricing snapshot — handles vision, reasoning, and coding in one model.
Gemini 3 FlashGoogle's fast, cost-efficient tier with a large context window — suited to high-throughput or long-document workloads over peak reasoning depth.
Gemini 3.1 ProGoogle's higher-capability tier — stronger multi-step reasoning and multimodal handling than Flash, at a proportionally higher cost.
Claude Sonnet 5Anthropic's balanced mid-tier — positioned for coding and agentic tool-use workloads where cost-per-call matters at scale.
Claude Opus 4.6Anthropic's highest-capability tier — reserved for the hardest reasoning/coding tasks, priced well above Sonnet accordingly.

For a live, frequently-updated numeric comparison, see LMArena's leaderboard (head-to-head human preference voting) or Artificial Analysis's MMLU-Pro leaderboard (standardized benchmark scoring) — both update far more often than a static page like this one could stay accurate.

Provider links for current pricing

Estimate cost in Python

def estimate_cost(input_tokens, output_tokens, price_in_per_1m, price_out_per_1m): return (input_tokens / 1_000_000) * price_in_per_1m + (output_tokens / 1_000_000) * price_out_per_1m # GPT-4o mini, snapshot pricing 2026-08-13 cost = estimate_cost(10_000, 2_000, price_in_per_1m=0.15, price_out_per_1m=0.60) print(round(cost, 4)) # 0.0027

Pricing is a point-in-time snapshot, not a live feed, and providers change rates without much notice. This is not a guarantee of billing accuracy. Confirm current rates directly with each provider before relying on these figures for budgeting.

Related Tools