AI
LocalAI Calc
VRAM + cost per token

Local inference vs an API: which is actually cheaper?

A GPU is a fixed cost. An API is a variable cost. The answer depends on how many tokens you actually generate — so put in your own numbers.

Cost comparison
Updates as you type. Nothing leaves your browser.
Usable memory is capped below the sticker number: 90% on NVIDIA, 85% on a 128GB Mac.
3.00
1.0
4h
0.12
Local—
Hardware (depreciated)—
Electricity—
Local cost per 1M tokens—
Break-even—
Cloud API—
Hardware pays back when monthly token volume is high enough to amortize the card.
All amounts in USD. Hardware prices are US retail and will change.

Why the break-even is further out than it looks

The GPU is paid once but depreciates every year, and it draws power whether or not you are generating. At low volume the fixed cost dominates: a $1,799 card producing 978M tokens over three years works out to about $2.08 per million tokens — competitive with cheap APIs, far above the cheapest ones.

Annual electricity = TDP(kW) × hours/day × 365 × price/kWh Annual depreciation = hardware price / depreciation years Tokens per year (M) = tok/s × 3600 × hours/day × 365 / 1,000,000 Cost per 1M tokens = (annual depreciation + annual electricity) / tokens per year

Run your own numbers

Change the API price, daily volume and hardware on the calculator page. Every assumption is visible and editable.

Calculator →  ·  Read the hardware guide →

All throughput figures are estimates derived from memory bandwidth and published measurements. VRAM figures are computed from model architecture and quantization assumptions. Verify against your own runtime before buying hardware.