AI economics · Free calculator

Self-Host vs API LLM Cost Calculator

Find the crossover point where running your own model on rented GPUs beats paying per token — including utilisation, engineering time, and the idle hours nobody budgets for.

Disclaimer: Model prices move constantly. Every rate here is an editable input, not a quote — pull the current price page for your provider before you lock a margin model. Token counts are estimates (~0.75 words per token) and vary by tokenizer and language.

800
200
0
1
2
2
35%

You pay for 100% of the hours you rent.

1,200
20
95
Try it like this

Tap a scenario to load realistic numbers, then tweak the sliders.

New here? Watch it work in 2 seconds — then tweak it for you.
Advertisement
Formula used

GPU hours vs per-token pricing

The API bill scales with usage; the self-host bill is fixed whether you serve one request or a million. That's why utilisation decides everything — a GPU idling at 10% costs the same as one saturated at 95%.

Self-host = GPUs × $/hr × 730 + eng hours × rate; API = M_in × P_in + M_out × P_out
GPU hours in a month
730
Typical self-host crossover
1–10B tokens / month
Realistic production utilisation
25–60%
Open-weight throughput (mid GPU)
600–2,000 tok/s
Backlink-friendly embed

Embed this calculator

Free to embed on any site. Inputs preserved, link back to RevenueLab. Each format trades polish for SEO juice.

<iframe src="https://www.revenuelab.fyi/embed/self-host-vs-api-llm-calculator?monthlyInputTokens=800&monthlyOutputTokens=200&apiInputPrice=0.3&apiOutputPrice=1.2&gpuCount=2&gpuHourly=2.2&utilisationPct=35&throughputTps=1200&engineerHours=20&engineerRate=95" width="100%" height="680" style="border:0;border-radius:12px;max-width:100%" loading="lazy" title="Self-Host vs API LLM Cost Calculator"></iframe>
<p style="font:12px/1.4 system-ui;color:#666;margin:6px 0 0">Calculator by <a href="https://www.revenuelab.fyi/self-host-vs-api-llm-calculator?monthlyInputTokens=800&monthlyOutputTokens=200&apiInputPrice=0.3&apiOutputPrice=1.2&gpuCount=2&gpuHourly=2.2&utilisationPct=35&throughputTps=1200&engineerHours=20&engineerRate=95" target="_blank" rel="noopener">RevenueLab</a></p>

Easiest to install — passes referral traffic and a referring-domain signal.

Cite this calculator

Writing about this topic? Grab a citation — every link helps keep these tools free.

APA
RevenueLab. (2026). Self-Host vs API LLM Cost Calculator. Retrieved from https://www.revenuelab.fyi/self-host-vs-api-llm-calculator
HTML
<p>Source: <a href="https://www.revenuelab.fyi/self-host-vs-api-llm-calculator" target="_blank" rel="noopener">Self-Host vs API LLM Cost Calculator — RevenueLab</a> (2026).</p>
Markdown
Source: [Self-Host vs API LLM Cost Calculator — RevenueLab](https://www.revenuelab.fyi/self-host-vs-api-llm-calculator) (2026).

Utilisation is the whole argument

You rent GPUs by the hour, not by the token. At 100% utilisation a rented GPU is extraordinarily cheap per token; at 10% it's four to ten times worse than an API. Real production traffic is spiky — nights and weekends are near-idle — so honest utilisation for a single-tenant deployment is usually 25–40% unless you're running batch workloads that can soak up the trough.

The costs that don't appear on the GPU invoice

Engineering time to deploy, monitor, patch, and upgrade. On-call for a service that now has no vendor SLA. Model evaluation every time you consider a new open-weight release. Redundancy so a single node failure isn't an outage. At small scale these dwarf the compute line, which is exactly why early-stage teams should stay on APIs.

  • Batch and offline jobs are the best self-host candidates — they fill idle capacity.
  • Spot/preemptible instances cut GPU cost 40–70% if your workload tolerates interruption.
  • Quantised models (int8/int4) can double throughput per GPU.
  • Keep an API fallback path for burst traffic instead of over-provisioning.

When self-hosting wins for reasons other than money

Data residency and compliance, guaranteed model version stability, no per-request rate limits, custom fine-tuned weights, and predictable fixed costs. These are legitimate reasons to self-host at volumes where the pure cost comparison is a wash — just be honest that you're buying control, not savings.

FAQ

At what volume does self-hosting an LLM become cheaper?

Typically somewhere between 1 and 10 billion tokens per month, depending on GPU pricing, utilisation, and which API tier you're comparing against. Below roughly 100 million tokens/month, APIs almost always win once you count engineering time.

How much does it cost to run an open-source LLM?

Two mid-range GPUs at $2.20/hour is about $3,200/month in rental alone, regardless of usage, plus engineering time. That fixed cost only makes sense if you're pushing enough tokens through it to beat the equivalent API bill.

What GPU utilisation should I assume?

25–40% for a single-tenant production service with normal daily traffic patterns. 60–80% is achievable if you can backfill idle hours with batch work. Assuming 90%+ is how self-hosting business cases get built and then quietly fail.

Does self-hosting include fine-tuning cost?

Not in this calculator — training is separate. Self-hosting does remove the hosted fine-tune inference premium, though, which can make a custom model considerably more attractive at volume.

What about spot instances?

Spot or preemptible GPUs cut rental cost 40–70%, but can be reclaimed with little notice. Great for batch inference and training, risky for user-facing latency-sensitive serving unless you have a fallback.

Should I self-host for data privacy?

It's a valid reason, but check the alternatives first — most major providers offer zero-retention and enterprise data-processing terms that satisfy common compliance requirements at a fraction of the operational burden.

How this calculator is built

Independently maintained

Written by Sam Doshi and the RevenueLab editorial team. We don't sell the data feeds this tool is built on.

Sourced from primary data

Benchmarks come from public AdSense / Stripe / IRS disclosures and reader-submitted data — never third-party "$X per view" claims. Full methodology.

Last editorial review

Reviewed on a rolling quarterly cycle. Dated reviews are published on the methodology record for each calculator.

Editorial standards

See our editorial policy and disclaimer. Results are estimates, not advice.