AI Cost Calculator / Comparison

Claude Sonnet 5 vs Gemini 3.1 Pro — API Cost Comparison

Which is cheaper for your workload: Claude Sonnet 5 or Gemini 3.1 Pro? Both are scored against the same three canonical workloads below using per-1M-token list pricing as of 2026-08-15. Claude Sonnet 5 is cheaper in 3 of 3 workloads — but your own token mix decides, so open the calculator with your numbers.

Projected monthly cost by workload

WorkloadClaude Sonnet 5Gemini 3.1 ProCheaperTry it
Chat assistant
1.2K input / 400 output tokens per call, light prompt caching, 500 calls/day.
$98.40/mo$110.40/moClaude Sonnet 5Open in calculator
Long-context RAG
100K input / 500 output tokens per call, heavy cache reads, 200 calls/day.
$1302.00/mo$1308.00/moClaude Sonnet 5Open in calculator
Bulk classification
3K input / 20 output tokens per call, no caching, 100K calls/day.
$18600.00/mo$18720.00/moClaude Sonnet 5Open in calculator

Per-1M-token list prices

ModelInput /1MOutput /1MCache read /1MCache write /1MContextSource
Claude Sonnet 5
frontier
$2.00$10.00$0.200$2.501,000,000Anthropic
Gemini 3.1 Pro
frontier
$2.00$12.00$0.2001,048,576Google

Cache rates of — mean the provider has not published that tier. Batch API discounts (typically 50%) and negotiated rates are not included — toggle Batch mode in the calculator for those.

Run this comparison with your own workload

Token mix, caching, and volume flip the ranking constantly. Enter your real numbers and compare Claude Sonnet 5 vs Gemini 3.1 Pro side by side — free, no account, runs in your browser.

Open the LLM Cost Calculator →