Self-Host vs API Cost Calculator (LLM Break-Even)

Compare the monthly cost of an LLM API with running the model yourself on a rented or owned GPU, and see the token volume where self-hosting breaks even. Free, and it runs in your browser.

Updated November 19, 2026. Not financial advice. This calculator is for education and rough estimates only. It relies on simplified models and your inputs, ignores taxes and many real-world costs, and past or modelled results do not guarantee future outcomes. Consult a licensed professional before making financial decisions.

API

Input plus output tokens per month.

The rest is output.

Example value. Check your provider's current price.

Self-hosted setup

GPU

All GPUs together, billed 730 hours a month. Default is an example H100 rate; see the GPU rental calculator for sources.

Hosting, bandwidth, ops. 0 to ignore.

Aggregate across concurrent requests, input and output together.

Average share of peak throughput you actually use.

Result

API per month
$3,300.00
$6.600 per 1M tokens blended
Self-host per month
$1,963.70
1 always-on setup; $0.747 per 1M tokens when full
Break-even volume
297.5M tokens/mo
Self-hosting is cheaper above this volume.
Cheaper option
Self-host
by $1,336.30 per month

Blue: API. Red: self-host (steps up when volume needs another setup). Dashed: your volume. Horizontal axis 0 to 3.15B tokens a month, vertical axis 0 to $20,814.

Monthly cost at different token volumes
Tokens / monthAPISelf-hostCheaper
125.0M$825.00$1,963.70API
250.0M$1,650.00$1,963.70API
500.0M$3,300.00$1,963.70Self-host
1.00B$6,600.00$1,963.70Self-host
2.00B$13,200.00$1,963.70Self-host

Assumptions used

  • Blended API price = 70% × $3.00 + 30% × $15.00 = $6.600 per 1M tokens. No caching, batch or volume discounts.
  • Rented: $2.69/hour × 730 hours = $1,963.70/month, always on.
  • Other monthly cost $0.00. One setup costs $1,963.70/month whether busy or idle.
  • Capacity of one setup = 2,000 tokens/s × 50% utilization × 2,628,000 s = 2.63B tokens/month. Above that, another setup is added.
  • Same model quality on both sides, constant prices, steady load, no engineer time, no idle-GPU scaling to zero.

How to use the self-host vs API calculator

  1. Enter your monthly token volume, the input share, and the API prices per 1M tokens (see the LLM API cost calculator for provider rates).
  2. Choose a rented GPU (hourly) or owned hardware (price, amortization, power, electricity).
  3. Enter throughput and utilization. Estimate speed with the tokens per second calculator and check the model fits with the LLM VRAM calculator.
  4. Read the monthly costs, the break-even volume and the table. Rental rates: GPU rental cost calculator.

Worked example

500M tokens a month, 70% input, at $3 input and $15 output per 1M tokens: blended price = 0.7 × 3 + 0.3 × 15 = $6.60 per 1M, so the API costs 500 × 6.60 = $3,300 a month. A rented H100 at $2.69 an hour costs 2.69 × 730 = $1,963.70 a month. At 2,000 tokens/s and 50% utilization one GPU serves 2.63B tokens a month, so one setup is enough. Break-even is 1,963.70 ÷ 6.60 ≈ 297.5M tokens a month: below that the API wins, above it self-hosting does. The prices and throughput here are examples, not quotes.

See also

Frequently Asked Questions (FAQ)

When is self-hosting an LLM cheaper than using an API?

When your steady monthly token volume is high enough to keep the GPU busy. A GPU costs the same whether it is idle or full, while an API charges only per token. The break-even volume in this calculator is the point where the always-on GPU cost equals what the API would charge for the same tokens. Below it, the API is cheaper; above it (up to the GPU's capacity), self-hosting is.

How is the break-even volume calculated?

Break-even tokens = monthly self-host cost ÷ blended API price per token. The blended price weights your input and output prices by your input/output mix. If one GPU running at your utilization would still cost more per token than the API, there is no break-even and the calculator says so.

What utilization should I enter?

Utilization is the share of the GPU's peak throughput you can actually use on average over the month. Traffic is bursty and you need headroom for peaks, so 30–60% is common for production serving. Batch jobs that can run any time can reach 80% or more. Lower utilization raises your cost per token.

Where do I get a tokens-per-second figure?

Use aggregate throughput (all concurrent requests together) measured on your model and inference engine, such as vLLM. A single-stream speed is much lower than batched throughput. The LLM tokens per second calculator on this site gives a rough single-stream estimate from memory bandwidth, which is a conservative starting point.

What does this calculator leave out?

Engineer time, monitoring, redundancy, model quality differences, cached-input and batch discounts, volume discounts, prompt caching, price changes and taxes. API prices change often and self-hosted open models are not equal to frontier models, so treat the result as a rough first check rather than a quote.

Do I need the model to fit in GPU memory?

Yes. Weights plus KV cache must fit in VRAM across the GPUs you count in your setup. Use the LLM VRAM calculator to check this before trusting any cost comparison, and enter the hourly price or hardware cost for all GPUs in the setup.