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.

Two cost curves
The API grows with every token; local starts at the hardware price and grows with power and hours. A sketch, not to scale.
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

LineLocalAPI
HardwarePurchase price ÷ useful life in monthsNone
PowerWatts × utilization × hours × $/kWhNone
OperationsHours per month × hourly value of that timeNear zero
Per tokenZeroTokens per month × price per token
DowntimeYour problem, at your costProvider's SLA
Quality gapOpen-weight model at your sizeFrontier model, if you need it
Opportunity costEngineering time spent on infrastructureEngineering time spent on product
Table 01 Lines in the model, not values. Only the first four are numeric; the last three are judgments the numbers cannot make for you.

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

cost-modeltext
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 ≤ 0

Two 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.

InputExample valueWhere yours comes from
Tokens per day2,000,000Your API dashboard, or a log of prompts × average length
API price, blended$1.50 / 1MYour provider's current sheet, weighted by your input:output ratio
Hardware$3,000The box you would actually buy
Useful life36 monthsYour replacement expectation
Draw × utilization450 W × 35%Spec sheet × a realistic duty cycle
Electricity$0.18 / kWhYour bill
Operations4 h × $75Hours you spend × what an hour is worth
Table 02 Placeholder inputs for illustration only. None of these is a claim about current prices.

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.

Local vs API · break-evenplaceholder inputs
Workload
The box
Operations
API per month
$90
Local per month
$404
hardware · power · ops
$83 · $21 · $300
Crossover volume
9.0M / day
Payback on hardware
never
$0.00$7,273$14,5450m12m24m36m
API, cumulativeLocal, cumulative

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.

Formula only · the cost guide prints itPlaceholders — replace every value

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.

Questions people ask about this.

Answered in full, in plain text — the same words the page's structured data carries.

  1. At what volume does self-hosting an LLM become cheaper than an API?

    It depends on four numbers you have to supply: the API price you would otherwise pay, the hardware cost and its useful life, the power draw at your electricity rate, and the hours of operations time per month. The crossover is the daily token volume at which the API bill equals the box's monthly running cost plus its amortized purchase. For a single developer with a consumer GPU it typically lands in the millions of tokens per day; against a very cheap open-weight API it can be far higher. Run the calculator with your own inputs rather than trusting a published figure.

  2. Is running an LLM locally free once the hardware is paid off?

    No. The card draws power at idle and under load, the runtime and models need maintenance, and the hardware will be replaced eventually. Marginal cost per token is close to zero, which is genuinely the point, but the monthly cost of keeping the box useful is not. Zeroing out operations time is the most common way this comparison goes wrong.

  3. Should a solo developer self-host to save money?

    Usually not for cost alone. The operations line is paid in the developer's own hours, and those hours are the scarcest input a solo product has. Self-hosting makes sense for a solo developer when privacy, offline operation, latency, or a hard cost ceiling is the requirement, or when the developer is building expertise in local AI as the product. The strategy guide for independent developers covers that decision in full.

Next step

Send the stack you have.

Describe the model, the data and the hardware in a few lines. Strygon replies with what the architecture likely needs, before any talk of price.