LLM cost calculator: cloud API vs local GPU
For a given workload, estimate monthly cost on a cloud API offering and the cost of running an equivalent open-weight model on your own GPU hardware, with amortisation, energy and labour made explicit. Not a benchmark: local throughput is estimated from hardware specifications with efficiency factors you can override below. All amounts in USD. EUR display
- Grok 4 Fast (Azure AI Foundry): no cache read price published, cacheHitRatio treated as 0.
- Grok 4 Fast (Azure AI Foundry): no cache read price published, cacheHitRatio treated as 0.
Breakeven and sensitivity
Breakeven volume: – tokens/month. Breakeven utilisation: –.
Monthly cost vs. tokens/month
Cloud cost scales linearly with volume; local cost steps up each time another box is needed. Log scale on tokens/month.
Assumptions
| Key | Value | Source | Overridden |
|---|---|---|---|
| hoursPerMonth | 730 | CALCULATOR_SPEC.md §2 | no |
| daysPerMonth | 30.4 | CALCULATOR_SPEC.md §3 | no |
| weightsOverheadFactor | 1.05 | CALCULATOR_SPEC.md §6.1 | no |
| fixedOverheadGb | 2 | CALCULATOR_SPEC.md §6.1 | no |
| tpEffPcie | 0.85 | CALCULATOR_SPEC.md §6.1 | no |
| tpEffNvlink | 0.95 | CALCULATOR_SPEC.md §6.1 | no |
| tpEffUnified | 1 | CALCULATOR_SPEC.md §6.1 | no |
| defaultContextTokens | 8192 | T08 default (not specified in CALCULATOR_SPEC.md) | no |
| decodeEff | 0.7 | CALCULATOR_SPEC.md §6.2 | yes |
| prefillEff | 0.5 | CALCULATOR_SPEC.md §6.2 | yes |
| batchEffK | 0.04 | CALCULATOR_SPEC.md §6.2 | yes |
| utilisation | 0.3 | CALCULATOR_SPEC.md §6.2 | no |
| maxUtilisation | 0.95 | CALCULATOR_SPEC.md §6.2 | no |
| sparesPct | 0.1 | CALCULATOR_SPEC.md §6.3 | no |
| residualPct | 0.2 | CALCULATOR_SPEC.md §6.3 | no |
| loadFactor | 0.8 | CALCULATOR_SPEC.md §6.3 | yes |
| horizonMonths | 36 | CALCULATOR_SPEC.md §6.3 | no |
| labourHours | 2 | CALCULATOR_SPEC.md §6.3 | no |
| labourRate | 60 | CALCULATOR_SPEC.md §6.3 | no |
| hostingMonth | 0 | CALCULATOR_SPEC.md §6.3 | no |
| softwareMonth | 0 | CALCULATOR_SPEC.md §6.3 | no |
| electricityUsdKwh | 0.1419 | src/data/electricity_defaults.json (US); EIA Electric Power Monthly via commercialenergyadvisors.com | no |
| latencyTargetTps | 20 | CALCULATOR_SPEC.md §3 | no |
| tokenizerSlice | blended | CALCULATOR_SPEC.md §7 | yes |