Local AI vs cloud API cost calculator
Is running Llama or Mistral locally cheaper than paying for ChatGPT or Claude? Enter your setup to find your break-even point. For worked scenarios, read or browse .
Cloud API
Pay-per-token pricing
| Model / provider | Input /1M tokens | Output /1M tokens |
|---|---|---|
| GPT-5.5 OpenAI | $5.00 | $30.00 |
| GPT-5.4 OpenAI | $2.50 | $15.00 |
| Claude Opus 5 Anthropic | $5.00 | $25.00 |
| Claude Sonnet 5 Anthropic | $2.00 | $10.00 |
| Claude Haiku 4.5 Anthropic | $1.00 | $5.00 |
| Gemini 3.1 Pro Google | $2.00 | $12.00 |
| Llama 3.1 405B Meta (Together.ai) | $1.79 | $1.79 |
| Llama 3.1 8B Meta (Together.ai) | $0.18 | $0.18 |
| Mistral Large 2 Mistral AI | $2.00 | $6.00 |
| Mistral Small 3 Mistral AI | $0.10 | $0.30 |
| DeepSeek V3 DeepSeek | $0.27 | $1.10 |
| DeepSeek R1 DeepSeek | $0.55 | $2.19 |
Cloud pricing last verified 2026-07-30. Flagship-tier rates shown; mini and flash tiers cost far less for lightweight tasks, which narrows local’s savings.
Methodology and assumptions
Local cost formula
Monthly electricity = (Watts ÷ 1000) × hours/day × 30 × rate/kWh
Watts and hardware cost come from the selected GPU’s database entry (TDP and launch price). Amortization spreads hardware cost evenly over the depreciation period. The break-even uses electricity only (running cost), since hardware is a sunk cost after purchase.
Cloud cost formula
Monthly = (input ÷ 1M × price_in + output ÷ 1M × price_out) × 30
Cloud pricing last verified 2026-07-30 (USD flagship-tier rates; sources in lib/cloudPrices.ts), converted to EUR at a fixed rate of 0.92.
Not included in local cost: internet bandwidth, cooling overhead (~10–15% of GPU TDP), maintenance and opportunity cost of capital. These typically add 5–20% to local costs.