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.

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