JEDI.
← All field notes

AI ECONOMICS / A BUILDER’S PERSPECTIVE

The real cost of AI:
API vs. local LLMs.

Don’t buy cheaper tokens. Buy better economics. A framework—and an interactive calculator—for deciding what to own, what to rent, and what to leave in the cloud.

I wanted the answer to be “buy the hardware.” Owning the machine feels like escaping the meter. But the meter is only one part of the bill.

In my original essay on running frontier AI locally, I argued that replacing demanding cloud workflows with owned hardware often fails the financial test for a small team. The more useful follow-up is not another verdict. It is a way to find the point where that verdict changes for your workload.

Here is my starting position: the right unit of comparison is cost per accepted result, delivered at a useful speed. For large language models (LLMs), token prices, GPU prices, and subscription fees each describe a different purchase. Treating them as interchangeable is how an attractive spreadsheet becomes an expensive system.

THE DECISION LAB / 01

LLM cost & ROI calculator

Put your workload through the math. Every assumption is yours to change.

USD · no sign-up

Original article: $52k/year API bill, $300k server, $20k/year operations. Labor excluded until you add it.

01 / Your API baseline
02 / Own the hardware
Power & operating labor
03 / Rent the GPUs

Team default: 8 × H100 SXM at $3.99/GPU-hour from Lambda, checked Nov 2, 2026. Other presets use hypothetical rates. Billing follows allocation, not how busy the GPUs are. No rental setup fee modeled.

04 / Cost per useful result
OWNED VS API / 36 MONTHS

$204,000additional cost

Simple payback112.5 months
Return on upfront cost-68.0%

Payback falls beyond your comparison period. Hardware life and future prices remain unmodeled.

Cumulative cash outlay

Upfront purchase included at month zero.

Managed APIOwned + fallbackRented + fallback
Cumulative AI spending over 36 monthsAt month 36: managed API $156,000, owned hardware including API fallback $360,000, rented GPUs including fallback $838,858. Exact monthly values are in the expandable data table below.$0$226.5K$453K$679.5K$906KNowMonth 18Month 36
API $156,000Owned $360,000Rented $838,858

Where the monthly cost goes

Upfront costs spread over 36 months for comparison; not a cash payment schedule.

Managed API$4,333

API $4,333

Owned + fallback$10,000

Upfront / months $8,333 · Operations $1,667 · API fallback $0

Rented + fallback$23,302

Rental + operations $23,302 · API fallback $0

Your break-even hurdle

To recover the purchase in 36 months, your baseline API bill must reach $10,000.00/month at 100% replacement and these operating costs.

View exact totals, unit costs & monthly chart data
36-month comparison · USD
MeasureAPIOwned + fallbackRented + fallback
Total cash outlay$156,000.00$360,000.00$838,857.60
Cost / accepted task*$0.4333$1.00$2.3302
Month 0$0.00$300,000.00$0.00
Month 1$4,333.33$301,666.67$23,301.60
Month 2$8,666.67$303,333.33$46,603.20
Month 3$13,000.00$305,000.00$69,904.80
Month 4$17,333.33$306,666.67$93,206.40
Month 5$21,666.67$308,333.33$116,508.00
Month 6$26,000.00$310,000.00$139,809.60
Month 7$30,333.33$311,666.67$163,111.20
Month 8$34,666.67$313,333.33$186,412.80
Month 9$39,000.00$315,000.00$209,714.40
Month 10$43,333.33$316,666.67$233,016.00
Month 11$47,666.67$318,333.33$256,317.60
Month 12$52,000.00$320,000.00$279,619.20
Month 13$56,333.33$321,666.67$302,920.80
Month 14$60,666.67$323,333.33$326,222.40
Month 15$65,000.00$325,000.00$349,524.00
Month 16$69,333.33$326,666.67$372,825.60
Month 17$73,666.67$328,333.33$396,127.20
Month 18$78,000.00$330,000.00$419,428.80
Month 19$82,333.33$331,666.67$442,730.40
Month 20$86,666.67$333,333.33$466,032.00
Month 21$91,000.00$335,000.00$489,333.60
Month 22$95,333.33$336,666.67$512,635.20
Month 23$99,666.67$338,333.33$535,936.80
Month 24$104,000.00$340,000.00$559,238.40
Month 25$108,333.33$341,666.67$582,540.00
Month 26$112,666.67$343,333.33$605,841.60
Month 27$117,000.00$345,000.00$629,143.20
Month 28$121,333.33$346,666.67$652,444.80
Month 29$125,666.67$348,333.33$675,746.40
Month 30$130,000.00$350,000.00$699,048.00
Month 31$134,333.33$351,666.67$722,349.60
Month 32$138,666.67$353,333.33$745,651.20
Month 33$143,000.00$355,000.00$768,952.80
Month 34$147,333.33$356,666.67$792,254.40
Month 35$151,666.67$358,333.33$815,556.00
Month 36$156,000.00$360,000.00$838,857.60

*Uses the same accepted-task volume for each option. Include all retries in the baseline bill and any human repair in operations. This does not establish equivalent model performance.

Read the methodology

Planning model, not a benchmark. Constant demand and prices, 730 hours/month. Excludes tax, financing, resale, downtime losses, hardware replacement, and future price changes. Values stay in this browser unless you share the scenario URL. No live pricing feed.

01 / START WITH THE OUTCOME

The cheapest token can produce the most expensive result.

A useful comparison starts with a task someone will accept: a support answer that resolves the issue, an extraction that passes validation, or a code change that survives review. A million generated tokens is activity. It is not necessarily a million tokens of value.

Consider a deliberately simplified example. One system spends $0.10 per attempt and another spends $0.04. If 90% of the first system’s attempts pass your acceptance test, its inference cost per accepted result is about $0.11. If only 30% of the second system’s attempts pass, its cost is about $0.13. The cheaper token lost before you priced the human cleanup.

THE METRIC THAT MATTERS

Cost per accepted result =
total delivery cost ÷ accepted results

That example is arithmetic, not a benchmark or a retry prediction. Real failures are often correlated: repeating the same prompt may simply repeat the same mistake. Measure the entire workflow, including retries, tool calls, review, and repair. Then ask whether the result arrives fast enough to be useful.

This changes the purchasing conversation. Instead of “How much VRAM can we afford?”, start with “What work do we need to complete, at what quality and volume?” Hardware follows the answer.

02 / SEPARATE THE PURCHASES

API, rented GPUs, and local hardware are three operating models.

What you are actually paying for
OptionMain cost driverWhat you take on
Managed model APIBillable usage and service-specific feesIntegration, evaluation, rate-limit handling, provider dependency
Rented GPUsAllocated GPU-hours, plus operationsServing, scaling, model updates, reliability
Owned hardwareUpfront capital, plus ongoing operationsAll of the above, plus physical infrastructure and asset risk

Open weights describe access to a model. They do not require you to become its infrastructure provider. A managed API can serve an open-weight model; renting a GPU still leaves the serving work with you. Keep model choice and hosting choice separate.

A subscription is not a token budget.

A chat or coding subscription buys access under a product’s plan and usage rules. It is not a promise of a dedicated endpoint or interchangeable API capacity. If your team is comparing a subscription with hardware, first document the workflow and limits you are actually replacing. This calculator uses metered API spending as its baseline.

Memory is a gate, not a business case.

The ideal weight storage of a model is parameter count × bits per parameter ÷ 8. A hypothetical 70-billion-parameter model at 4 bits needs 35 GB for weights alone, using decimal GB. Quantization metadata, runtime buffers, and attention state add to that. Sparse activation in a mixture-of-experts model reduces computation per token; it does not make all the inactive experts disappear from storage.

Getting the weights to load is the first milestone. The next is serving the intended context length and concurrency at acceptable latency. vLLM’s optimization guide describes how cache capacity and serving settings affect that tradeoff. A purchase spreadsheet cannot establish it.

03 / MAKE THE ASSUMPTIONS VISIBLE

The $300,000 question.

Start with the team-server scenario from my original essay: $1,000 a week in API usage, or $52,000 a year; a $300,000 hardware purchase; and $20,000 a year to operate it. These are illustrative assumptions, not a minimum specification or a vendor quote.

If the server eliminates the entire API bill, it saves $32,000 a year after operations. Simple payback is $300,000 ÷ $32,000, or 9.4 years. Dividing the purchase price by the API bill alone gives 5.8 years—and silently assumes free operations.

Three-year cash outlay · original team scenario
OptionThree-year cost
API: $52,000 / year$156,000
Owned: $300,000 + $20,000 / year$360,000
Rented: 8 × H100 SXM, continuously allocated$838,858

The rental example uses Lambda’s listed $3.99 per GPU-hour for the eight-GPU H100 SXM instance, checked November 2, 2026: 8 × $3.99 × 8,760 hours × 3 years. It is an infrastructure price example, not an equivalent-performance claim or a minimum hardware recommendation. Taxes and rental operating labor are excluded here; add your own costs in the calculator.

To recover the owned server within three years, the setup must eliminate $120,000 in annual API spending: $100,000 toward the purchase and $20,000 toward operations. That means $10,000 a month, provided it can actually serve the workload.

The operator’s time moves the line.

Four hours a week at $100 an hour adds $20,800 a year. Annual savings then fall to $11,200, stretching simple payback to 26.8 years. That is not a hardware lifespan prediction. It is evidence that this scenario fails the purchase test.

Try it above: open “Power & operating labor,” set operating hours to 17.3333 per month and labor to $100 an hour. Then change the workload or hardware price. The conclusion is allowed to change with the evidence.

04 / THE TWO TESTS A SPREADSHEET MISSES

Utilization is not the same as useful demand.

Owning a server converts a variable bill into a commitment. The hardware consumes capital while it is waiting for your next request. Rental changes the financing, but an allocated, idle GPU is still rented.

The tempting response is to keep the machine busy. But additional inference creates savings only when it replaces something you would otherwise pay for—or creates value you can demonstrate. Generating extra output to improve a utilization chart is not an economic win.

The goal is not to maximize GPU utilization.
It is to minimize the cost of work you actually need done.

Average demand is also a poor stand-in for peak capacity. A server that covers most daily tokens can still fail when several people submit long prompts at once. Measure prompt processing, output throughput, time to first token, tail latency, and concurrency on representative requests. Budget for the service level people will experience.

Partial replacement is often the honest answer.

A smaller local model may handle classification, extraction, or other bounded work while harder tasks remain on a remote model. That can be an excellent architecture. It also means the API bill does not disappear.

The calculator’s replacement slider represents the percentage of API dollars eliminated, not the percentage of prompts routed locally. Those can differ dramatically. Moving 80% of inexpensive requests may remove only a small fraction of spending. Both self-hosted options retain the remainder as an API fallback cost.

Validate the replacement rate with a pilot. Include routing overhead, monitoring, model updates, and repair work in operations. Hybrid infrastructure deserves the same scrutiny as a full migration.

05 / A BETTER BUYING PROCESS

Buy evidence before you buy infrastructure.

  1. Measure a representative week.

    Collect input and output volume, the complete bill, accepted tasks, retries, review time, peak concurrency, and latency. Separate a busy week from a typical week.

  2. Try to lower the managed baseline.

    Evaluate a less expensive model, shorter context, caching, or asynchronous batching where the workflow permits it. Use your actual provider terms. A smaller baseline changes the hardware hurdle.

  3. Benchmark the proposed replacement.

    Run the same acceptance tests against the exact model, quantization, hardware, and serving stack you would deploy. Include long prompts and busy periods, not just the easiest demo.

  4. Price the whole operating model.

    Get a real bill of materials or rental quote. Add power, support, storage, deployment time, ongoing labor, and the residual API bill. Decide what happens when the endpoint fails.

  5. Stress-test the conclusion.

    Reduce the API baseline. Increase labor. Lower the share of spend replaced. Shorten the useful hardware life. If the purchase works only in the optimistic case, preserve the option to wait.

When local can win.

Local inference can make sense when an affordable model already passes a valuable, repeatable workload; when volume is predictable; when suitable hardware is already available; or when offline operation and control over data processing are requirements. Those requirements can justify a cost premium. Name that premium instead of disguising it as savings.

Infrastructure ROI is only one layer of AI ROI.

This calculator asks whether owning infrastructure beats an API baseline. It does not prove that the AI project itself is valuable. Business ROI needs a second comparison: the process with AI versus the process without it.

Price time recovered only when it can be put to useful work. Add review and integration costs. Attribute revenue conservatively. A system can cut inference spending while increasing total delivery cost; a more expensive model can pay for itself by resolving a harder problem.

My conclusion is still conditional. For a small team replacing demanding, general-purpose AI workflows, hardware ownership faces a high bar. For a focused workload with the right model and enough demand, the result can flip. I want the machine on my desk to win. I want the evidence to decide.

06 / OPEN MATH

Methodology, assumptions & sources.

The calculator uses constant monthly demand and prices. It compares undiscounted cash outlay, not accounting depreciation or net present value. A month is 730 hours, making a year 8,760 hours. All figures are US dollars.

Monthly API cost
Actual monthly bill, or input million tokens × blended input rate + output million tokens × output rate. Blended input rate weights ordinary and cached-input prices by the cache percentage.
Monthly owned cost
Wall power in kW × powered hours × electricity price + other operations + labor hours × labor rate + remaining API bill.
Monthly rental cost
GPU count × price per GPU-hour × billed hours + rental operations + remaining API bill.
Simple payback
(Hardware + one-time setup) ÷ (API monthly cost − owned monthly cost). No payback when monthly savings are zero or negative. No upfront cost and positive savings means immediate savings.
Owned-hardware ROI
((API monthly cost − owned monthly cost) × months − upfront cost) ÷ upfront cost × 100%. Undefined when upfront cost is zero.
Break-even baseline API bill
(Upfront cost ÷ months + owned operations) ÷ share of API spend replaced. Undefined at zero replacement.

The model excludes tax, financing, resale value, replacement hardware, future pricing changes, and downtime losses. It assumes any displaced workload can be handled by the proposed setup. It does not estimate GPU capacity or infer quality from hardware price. The two self-hosted options use the same replacement percentage for comparability; change it when evaluating a different plan.

Default operations of $20,000/year already cover the original example’s operating estimate, so power and labor start at zero to avoid double counting. The workstation and existing-hardware presets are hypothetical starting points. Their rental rates and API token rates are illustrative. Replace them with your own invoice, quote, and measurements.

Published and sources checked November 2, 2026. This page does not fetch live prices. Verify current quotes before making a purchase.

COMMON QUESTIONS

AI cost comparison, without the shortcuts.

Is running an LLM locally cheaper than using an API?

It can be, especially for a narrow workload on hardware you already own. Compare the API spend you actually eliminate with hardware, setup, power, support, labor, and any remaining API bill. If monthly operating costs exceed the spending eliminated, there is no simple financial payback. Equal model quality and sufficient serving capacity must be tested separately.

How do I calculate LLM API costs?

Multiply monthly input tokens in millions by the input price per million, then add output tokens in millions multiplied by the output price per million. Price cached input separately when applicable. Include retries, billed reasoning tokens, and any tool, cache-write, or storage charges. The calculator’s token mode covers input, output, and cached-input charges; bill mode can capture the full invoice.

What is the difference between GPU utilization and billed hours?

Utilization describes how much work the hardware is doing. Billed hours measure how long you have rented it. An allocated GPU can be idle and still cost money. Lowering rental hours saves money only if the service can tolerate the reduced availability, startup time, and changed capacity.

Does this calculator compare equivalent model performance?

No. It compares the cash costs of your assumptions. Benchmark model quality, context length, latency, concurrency, and accepted-task throughput before treating any option as a replacement. A configuration that loads a model is not automatically a usable production endpoint.

How should I measure AI ROI?

Separate infrastructure savings from business value. This calculator’s owned-hardware ROI is net savings versus the API baseline divided by the upfront hardware and setup cost. Business ROI also needs evidence of time recovered, revenue created, or losses avoided, less integration, review, and operational costs. Time saved is not automatically cash saved.

Jedidiah Weller

ABOUT THE AUTHOR

Jedidiah “Jedi” Weller

Founder, mobile product strategist, speaker, and hands-on maker. Writing about the decisions behind useful technology.

More about Jedi →

MAKE THE NEXT DECISION A BETTER ONE

Bring the numbers.
Challenge the assumptions.

Try your own scenario ↑Talk AI & product strategy →