Local vs API Cost Calculator
Compare the real cost of running an LLM locally versus calling a hosted API: hardware amortization, electricity, and token pricing — with a break-even point.
Cost assumes 75% input / 25% output tokens. Only models with a same-model hosted API appear here — that's the only apples-to-apples comparison.
Hosted API
$6.6
deepinfra · meta-llama/Meta-Llama-3.1-8B-Instruct · $0.28/mo
- groq: $0.58/mo
Run locally
$400
rtx-3060-12gb · 7.5 GB
- Hardware (reference price): $180
- Amortized hardware: $7.5/mo
- Electricity: $9.18/mo
Verdict
We don't push either answer. Local wins at sustained high volume; for bursty or light usage the API almost always wins. Privacy and offline use are separate reasons to go local that this calculator doesn't price.
Estimates. API prices verified monthly from official pricing pages; hardware prices are manual reference prices; electricity assumes 50% average GPU load. Local speed/quality differences vs hosted APIs are not priced.