How Long Until Buying the Hardware Beats Paying Per Token
Researched
Seeded with published specifications and cited sources rather than results measured here. Every seeded figure links to where it came from.
Owning the hardware costs less after 8.2 years, and saves $-1,265.48 over 36 months. That counts the purchase and the electricity, and nothing else.
This calculator needs JavaScript. Every formula it uses is written out below.
Runs in your browser. Nothing you type here is uploaded, logged or sent anywhere. The page is a static file and the arithmetic happens on your machine. Same principle as the rest of the site.
How this is calculated
Two running costs and one purchase price. The purchase price only appears on one side, which is the entire reason the answer is ever "never".
hours generating per day = tokens per day ÷ (tokens/sec × 3600)
local monthly = electricity at that duty cycle
cloud monthly = tokens per day ÷ 1,000,000 × API price × 30.44
break-even months = hardware cost ÷ (cloud monthly − local monthly)
local total = hardware cost + local monthly × months
cloud total = cloud monthly × months
When cloud monthly is less than or equal to local monthly, the subtraction is zero or negative and there is no break-even point at all. The tool reports that as never rather than as a large number, because a large number reads like a long wait and never is not a wait.
| Constant | Value | Why |
|---|---|---|
| Days per month | 30.4375 | 365.25 divided by 12, so months do not drift against years |
| Seconds per hour | 3600 | Converts a token rate into a duty cycle |
| API price | Your input | Never hardcoded. Provider pricing changes faster than this page could track it |
| Hardware residual value | Not modelled | Counted as zero, which favours the cloud column. Stated rather than hidden |
Worked example, the one above: 500,000 tokens a day at 20 tokens per second is 6.94 hours of generation. That duty cycle costs $25.25 a month in electricity. The same tokens from an API at $3 per million cost $45.66 a month. The $20.40 monthly difference pays back $2,000 in 98.0 months.
What this can't know
- Everything it leaves out of the local column makes local look better than it is. No maintenance time, no storage for the models, no network gear, no cooling, no failed drive, no replacement power supply. Add any of them and break-even moves further away.
- Hardware residual value is counted as zero. That cuts the other way and favours the cloud. A machine sold on after three years recovers some of the purchase price, and nothing here models that.
- One API price is a blend you have to make yourself. Input and output tokens are priced differently, often by several times. Caching, batching and volume tiers move the effective rate again.
- It assumes today's prices hold for the whole horizon. API prices have moved fast and mostly downward. A break-even three years out is a statement about a market that will not sit still.
- It cannot weigh the reasons that are not money. Privacy, offline operation, latency, and running a model nobody offers as a service are all real and none of them appear in this arithmetic.
- The tokens per second figure is yours to supply. Nothing on this bench has been measured yet, so the tool cannot tell you what your hardware would actually manage.
Sources
- The electricity half is the definition of the kilowatt hour and shares its implementation with the power cost calculator.
- API prices are not published here. Take the current rate from the provider you would actually use, and blend input and output rates in the proportion your workload uses them.
- No figure on this page came off the bench, including the tokens per second. When runs are published, this tool gains a machine picker and is re-badged Measured. The method those runs will be held to is on the methodology page.
FAQ
Is running AI locally actually cheaper than the API?
Often it is not, and the honest answer depends almost entirely on how much you generate. Electricity for a machine like the one loaded above runs about $25.25 a month, against $45.66 a month of API calls at that volume. The gap has to pay back the purchase price before local wins, which at these numbers takes 98 months. Light and occasional use almost never pays back. Heavy sustained use often does.
What is not counted in the local column?
Quite a lot, and all of it in the same direction. The tool counts the purchase price and the electricity, and nothing else. It excludes your time setting the machine up and keeping it running, the storage the models sit on, network gear, cooling, the replacement of a failed drive or power supply, and the residual value of the hardware at the end. Add those and the break-even point moves further out, not closer.
What is not counted in the cloud column?
One price per million tokens is a simplification. Providers charge different rates for input and output tokens, often several times apart, and prompt caching, batch discounts and volume tiers all move the effective rate. If your workload is prompt-heavy, blend the two rates in proportion to your actual usage before typing a figure in. It also assumes the price holds, which for a market this young is an assumption rather than a fact.
Why does the answer depend on tokens per second?
Because it decides how many hours a day the machine spends drawing load power rather than idle power. A faster machine finishes the same work sooner and spends more of the day idling, which lowers the electricity bill for identical output. It also sets a ceiling: if your daily token target needs more than 24 hours of generation, no amount of arithmetic makes it achievable on one machine, and the tool says so rather than quietly returning a number.
When is buying the hardware clearly right anyway?
When the reason is not cost. Data that cannot leave the building, work that must continue without a network, latency that a round trip cannot meet, or a model nobody offers as a service are all reasons that this calculator cannot weigh and should not. If cost is genuinely the deciding factor and the number below says never, then the number below is the answer.
Where to go next
- Before the cost question, the will-it-even-load question: the model fit calculator.
- The electricity side on its own, in more detail: the power cost calculator.
- What a given tokens-per-second figure feels like to sit in front of: the speed simulator.