Guide · Layer 00 · Economics
Local LLM vs API cost: the break-even model, with the hidden lines
Most comparisons of local and API inference stop at the price per million tokens, which is the one line that makes local look free. It is not. This guide sets out every line in the model, shows the volume at which the two cross, and hands you a calculator that runs on your own numbers rather than a vendor's.
- Series
- 04 of 09
- Sections
- 07
- Updated
- Sep 14, 2026
- Reading time
- 9 min
- Written for
- Developers + operators
The naive comparison, and why it misleads
The version everyone runs first: an API charges some dollars per million tokens; a local model charges zero per token; therefore local is cheaper once the hardware pays for itself. The conclusion is not wrong, but the framing hides three things. The hardware does not last forever. It draws power whether or not it is generating. And someone has to keep it running, which is a cost even when that someone is you.
Put those in and the picture changes shape. Local inference has a high fixed cost and a low marginal cost. API inference has no fixed cost and a marginal cost that never falls. The crossover exists, but where it lands depends entirely on volume, on utilization, and on the price of the API you would otherwise use, and for a lot of workloads the honest answer is that the API is cheaper.
Every line in the model
| Line | Local | API |
|---|---|---|
| Hardware | Purchase price ÷ useful life in months | None |
| Power | Watts × utilization × hours × $/kWh | None |
| Operations | Hours per month × hourly value of that time | Near zero |
| Per token | Zero | Tokens per month × price per token |
| Downtime | Your problem, at your cost | Provider's SLA |
| Quality gap | Open-weight model at your size | Frontier model, if you need it |
| Opportunity cost | Engineering time spent on infrastructure | Engineering time spent on product |
Hardware amortization
Divide the purchase price by the number of months you will realistically run it. Thirty-six months is a common assumption and a generous one for a consumer card that will be outclassed on memory within two generations. Do not use the card's physical lifespan; use the period over which it will still be the card you want to run models on.
Power
Peak draw is what the spec sheet prints; average draw is what the meter records. Inference is bursty, so a card rated at 450 W might average 30–40% of that over a day of interactive use, and far more if it is serving an application around the clock. Multiply the average by hours per month and your electricity rate. It is rarely the biggest line, but it is never zero, and at datacenter utilization it becomes significant.
Operations
Updating the runtime, swapping models, debugging a driver after an OS update, restarting a wedged server, watching the disk fill with checkpoints. For a single developer this might be a few hours a month; for a team it is a fraction of a role. Price it at what that time is worth doing something else. This is the line people zero out, and it is the line that most often decides the comparison.
Per token
Tokens per month times the blended price of the API you would otherwise call, counting both input and output. Input tokens dominate most retrieval and agent workloads because every call re-sends the context; price them separately if your provider does.
The formula
monthly_api = (tokens_per_day × 30 / 1,000,000) × price_per_million
monthly_local = hardware_price / life_months
+ watts × utilization × 730 / 1000 × price_per_kWh
+ ops_hours × hourly_rate
break-even = local wins when monthly_local < monthly_api
payback = hardware_price
/ (monthly_api − (power + ops)) -- months; undefined if ≤ 0Two properties of the formula are worth staring at. Hardware is a fixed cost, so the local line is flat against volume. API cost is linear in volume. The crossover is therefore a single volume: below it the API is cheaper every month, above it local is cheaper every month, and the payback period is the hardware price divided by the gap. If the running costs of the box (power plus ops) exceed the API bill on their own, payback is undefined: there is no volume at which local wins on cost alone.
A worked example, with the inputs labelled
The inputs below are placeholders chosen to show the arithmetic, not observations about any market. Replace every one of them with your own.
| Input | Example value | Where yours comes from |
|---|---|---|
| Tokens per day | 2,000,000 | Your API dashboard, or a log of prompts × average length |
| API price, blended | $1.50 / 1M | Your provider's current sheet, weighted by your input:output ratio |
| Hardware | $3,000 | The box you would actually buy |
| Useful life | 36 months | Your replacement expectation |
| Draw × utilization | 450 W × 35% | Spec sheet × a realistic duty cycle |
| Electricity | $0.18 / kWh | Your bill |
| Operations | 4 h × $75 | Hours you spend × what an hour is worth |
With those inputs: API is 60M tokens a month at $1.50, or $90. Local is $83 of hardware, about $21 of power, and $300 of operations, or $404. At two million tokens a day the API wins by a wide margin, and it keeps winning until the volume is roughly four and a half times higher. Change the operations line to one hour and the crossover falls from roughly nine million tokens a day to about four million. The model is that sensitive to the line everyone skips.
- API per month
- $90
- Local per month
- $404
- hardware · power · ops
- $83 · $21 · $300
- Crossover volume
- 9.0M / day
- Payback on hardware
- never
At these inputs, the API is cheaper per month.Local wins above 9.0M tokens a day. Not modelled: quality gap, privacy, and the price of your attention.
When the API wins
- Low or spiky volume. A fixed cost against a workload that runs a few hours a week is a fixed cost against nothing.
- You need a frontier model. If the task genuinely requires the best available model and an open-weight one at your memory tier does not meet the bar, the comparison is between a working product and a cheaper non-working one.
- Your time is the scarce input. A single developer building a product should be building the product. Every hour on inference infrastructure is an hour the API would have sold back for a few dollars.
- You have not measured quality yet. Until you have an evaluation set showing the local model does the job, the cost of local is unknown, because you might be paying for a model that does not work.
When local wins
- Sustained high volume. Batch processing, classification pipelines, embedding large corpora, agent loops that burn context: workloads measured in hundreds of millions of tokens a month cross the line easily.
- The data cannot leave. Regulated records, customer content under contract, source code under NDA. Here cost is not the deciding line and often not even a consideration; the privacy boundary is.
- Latency and offline. A model on the device answers in milliseconds with no network and no rate limit. For on-device products the API is not an alternative at all.
- A cost ceiling. Local spend cannot spike. For a product with unpredictable usage, a fixed cost is a feature, not a bug.
- Long-lived, stable workloads. A pipeline that will run the same model for a year has a clear payback; a prototype that changes weekly does not.
Reading the calculator honestly
The tool above computes exactly the formula on this page and nothing else. It does not know your provider's price, your electricity rate, or what your time is worth; it uses placeholders until you replace them, and it says so. Three things it deliberately does not model: the cost of the local model being worse than the API one, the value of the data never leaving, and the price of your attention. Those are the terms that decide most real cases, and a calculator that pretended to price them would be lying.