Self-Hosted LLM vs API Break-Even Calculator

Compare only the costs you enter for equivalent workloads.

API minus self-hosted monthly cost -USD 856.67
Inputs
Try:
Display denomination only. No exchange-rate conversion is applied.
tokens / month
Equivalent API workload.
USD / 1M tokens
Blended rate for the same workload.
GPU-hours / month
Total GPU-hours across all cards (720 per card for a 30-day month).
USD / GPU-hour
GPU cost per hour.
USD / month
Power, hosting, support, and operations.
USD
One-time setup and hardware cost to amortize.
months
Months over which setup is allocated.
Results & Graph
API minus self-hosted monthly cost
-USD 856.67

Monthly cost difference (API minus self-hosted)

Graph 1 • Calculator-specific flow Shows the calculated components and current result from this tool.
Monthly cost difference (API minus self-hosted)API2.0kSelf-hosted2.9kAPI minus self-hosted monthly cost: -USD 856.67
Graph 2 • Modeled quantities Compares the values returned by the active calculation.
API 2.0k Self-hosted 2.9k
Graph 3 • Calculation checkpoints Displays the engine’s named calculation points in order.
0cost 1.5kcost 3.1kcost API: 2,000 cost 2.0k API Self-hosted: 2,856.667 cost 2.9k Self-hosted
Summary: API is lower by USD 856.67 at the entered workload.
Summary: API is lower by USD 856.67 at the entered workload.
⚠️ Includes only costs entered. Hardware utilization, redundancy, staffing, power, cooling, and model quality need local estimates.
Interactive chart & math engine powered by CalculatorGraph

Formula: Self-Hosted LLM vs API Break-Even Calculator

API cost = tokens × rate
hosted cost = GPU hours × rate + operations + setup cost / amortization months.
API cost = tokens × rate; hosted cost = GPU hours × rate + operations + setup cost / amortization months.
  • Inputs: All units, rates, and allowances are entered by the user.

Rounding: Displayed values are rounded for readability; package and item quantities round upward.

Frequently Asked Questions

What does a positive result mean?

A positive number means self-hosting is cheaper on the costs you entered, because the result is API cost minus self-hosted cost. The 1.5 billion token preset shows this: the answer is $143.33 and the line below reads that self-hosting is lower by that amount. A negative number, like the default minus $856.67, means the API is cheaper.

How do I combine input and output prices into one rate?

Take a month of your usage, multiply input tokens by the input price per million and output tokens by the output price per million, add the two charges, then divide by total tokens in millions. If you use cached input pricing, treat cached tokens as a third group at their own rate. The result is the blended rate this page expects.

Why does self-hosted cost stay the same when tokens change?

Because the formula charges GPU-hours, other monthly costs and amortized setup, and none of those are tied to tokens. That reflects a GPU you rent or own whether it is busy or not. The catch is capacity: more tokens may need more GPUs, and the calculator will not add them for you. Raise the total GPU-hours yourself to match the cards you would need.

How do I enter more than one GPU?

Enter the total GPU-hours for all cards in the GPU Hours field. One card running all month is 720 GPU-hours, so multiply that by the number of cards, or add up each card's actual running hours if some run only part time. Keep GPU Hourly Rate as the price of a single card per hour, so the two multiply to the cluster's monthly cost.

Should engineering time go into setup or monthly cost?

Both, split by type. The initial build, model evaluation and deployment work are one-off, so they belong in Setup Investment. Ongoing upkeep, on-call cover, upgrades and monitoring repeat every month, so they belong in Other Monthly Cost. Leaving engineering time out entirely is the most common way this comparison ends up favouring self-hosting unfairly.

Does the amortization period change the break-even volume?

Yes. A longer period lowers the monthly setup charge, which lowers total self-hosted cost and therefore the token volume needed to break even. On the defaults the API stays cheaper either way, but its lead of $856.67 shrinks at 36 months and grows by about half at 12 months. Use the period you would really keep the setup in service before rebuilding.

Is a model I host comparable to an API model?

Only if it does the job equally well. The calculator assumes equivalent workloads and cannot tell whether answers are as good. Test both on a sample of your real tasks. If the self-hosted model needs longer prompts, more retries or human correction, those extra costs belong in the comparison too.

What if my traffic is very uneven?

Uneven traffic usually favours the API, which charges only for tokens used. A self-hosted GPU must be sized for the busiest periods and sits partly idle the rest of the time, yet you pay for all its hours. If you can turn rented GPUs off during quiet hours, lower GPU Hours to the GPU-hours they actually run.

Does the calculator handle currency conversion?

No. Display Currency only changes the label on the answer. If your API is billed in one currency and your GPUs in another, convert one set of prices before entering them. Mixing currencies without conversion produces a result that looks precise but compares numbers that are not on the same scale.

How should I present this result to a team?

Show three runs: expected volume and prices, a cautious case with lower volume or cheaper API rates, and an optimistic one. List what each run excludes, such as redundancy or staffing. A single figure like minus $856.67 invites argument about inputs; a range with stated assumptions lets people see what would have to be true for each option to win.

Does the result count idle GPU time?

Yes, implicitly. GPU-hours times the hourly rate are charged in full whether the card is busy or idle, which is how rented or owned hardware really behaves. On the default 720 GPU-hours, a GPU that is busy only during working hours still costs the whole month. Lowering hours is only valid if you genuinely shut the instance down.

How a negative $856.67 should be read

The sign is the first thing to check. The result is API cost minus self-hosted cost, so a negative number means the API is cheaper and a positive one means running your own model is cheaper. On the defaults the answer is minus $856.67, and the line underneath spells it out: the API is lower by $856.67 at the entered workload.

The two sides are built like this. The API side is monthly tokens times the blended rate, divided by a million because the rate is per million tokens. One billion tokens at 2 per million is 2 thousand a month. The self-hosted side adds three things: GPU-hours times the hourly rate, which is 720 GPU-hours at 2, the other monthly cost of 1,000, and the setup investment of 10,000 spread evenly over 24 months.

Add those up and self-hosting comes to roughly 2.86 thousand a month against the API's 2 thousand. That gap of $856.67 is the answer.

Nothing else is in the comparison. The result note says so plainly: hardware utilisation, redundancy, staffing, power, cooling and model quality need local estimates. Those words matter more on this page than on most, because the hidden costs of self-hosting are usually larger than the visible ones.

Finding your blended API rate on a pricing page

API Blended Rate is one number, but almost every LLM pricing page lists at least two: a price per million input tokens and a higher price per million output tokens. Some add a third, lower price for cached input. The calculator needs you to combine them.

Start from your own traffic. Look at a usage report and find how many input tokens and how many output tokens you used over a month. Multiply each by its rate from the pricing page, add the two charges, and divide by total tokens in millions. That is your blended rate. A chat workload that sends long context and gets short answers blends close to the input price. A generation workload with short prompts and long outputs blends close to the output price.

Use the rate for the model you would actually compare against. If your self-hosted plan is a smaller open model, the fair API comparison may be a smaller hosted model too, not the provider's most capable one. Comparing a cheap local model against an expensive flagship API will flatter self-hosting.

Check also whether the pricing page offers batch or off-peak discounts, and whether any of your traffic could use them. If part of the workload can wait, the blended API rate you should enter is lower than the headline price.

Token volume is the only lever on the API side

Self-hosted cost in this calculator does not depend on tokens at all. You pay for the GPU-hours whether the model is busy or idle. The API side grows in a straight line with usage. That makes volume the deciding input.

The presets show the crossover. At 600,000,000 tokens a month the API is lower by $1,656.67 per month. At the default one billion it is lower by $856.67 per month. At 1.5 billion the result flips and self-hosting is lower by $143.33 per month. On the default rates the two sides are level at about 1.43 billion tokens a month.

Work out your own crossover by dividing total self-hosted monthly cost by the blended rate per million. Below that volume the API wins on the costs entered. Above it, the GPU starts earning its keep, provided it can actually serve that many tokens.

Be honest about the volume you enter. Use a realistic month, not the busiest day multiplied by thirty, and not a growth forecast you hope to reach next year. A break-even that depends on traffic you do not yet have is a bet on growth.

Can one GPU really serve a billion tokens?

The default enters 720 GPU-hours, which is one GPU running all day for a thirty day month. The calculator does not check whether that one GPU can generate the monthly tokens you typed. It takes your word for it.

Throughput is the missing link. A billion tokens a month works out to several hundred tokens every second, around the clock, with no gaps. Whether one card can sustain that depends on the model size, the precision you run it at, batch sizes, context length and the serving software. Many setups cannot do it on a single GPU, especially at peak hours when requests arrive together.

Measure it. Load your chosen model on the hardware you plan to rent, replay a sample of real requests, and record sustained tokens per second at an acceptable latency. Divide monthly tokens by that rate to get the GPU seconds you need, then convert to hours.

If you need more than one card, the GPU Hours field takes the total across all of them, measured in GPU-hours per month. Each card running nonstop for a thirty day month adds 720, so two cards are twice that and four cards are four times it. Keep GPU Hourly Rate at the price of one card per hour. Then the multiplication gives the true monthly bill for the whole cluster.

Setup cost and the amortization months

Setup Investment covers one-off spending: buying hardware, engineering time to build the serving stack, evaluation and tuning work. The calculator divides it by the amortization period and adds that monthly share to the self-hosted side. With 10,000 over 24 months the share is about a seventh of the total self-hosted cost. The period has to be at least one month; a blank or zero period is rejected rather than quietly dropping the setup cost.

The period you pick changes the answer. Stretching to 36 months lowers the monthly share, and the API's lead over the default shrinks by roughly a sixth. Shortening to 12 months doubles the monthly share, and the API's lead grows by about half. Remove setup entirely and the API still wins on the defaults, though by less.

Choose the period you would actually keep the system before replacing it. Hardware ages, newer models may need more memory, and a pipeline built for one model often needs rework for the next. A long amortization period makes self-hosting look cheaper on paper because it assumes nothing changes for years.

If you rent GPUs by the hour and buy nothing, setup is mostly engineering time. Still count it. Building and maintaining a serving stack is real work, and leaving it at zero hides a cost the API does not have.

Filling in Other Monthly Cost honestly

The default puts 1,000 a month here for power, hosting, support and operations. This is the field most likely to be underestimated, and it moves the result one for one. Set it to zero on the defaults and self-hosting becomes lower by $143.33 a month.

Think about who gets paged when the model server goes down at night. A fraction of an engineer's time, spread across a month, often outweighs the GPU bill. Add monitoring, logging, storage for model weights, network egress, and the cost of a standby machine if the service needs to survive a failure. An API comes with redundancy built into its price; a single self-hosted GPU has none.

If you own the hardware, include electricity and cooling, which the result note names explicitly. If you rent cloud GPUs, check whether storage and data transfer are billed separately from the hourly rate.

Put these costs in rather than leaving them out to make the answer look better. A self-hosted plan that only wins when operations are free is not really winning.

Rate changes on either side of the comparison

Prices move, and both sides of this calculator are exposed. API providers revise their per-token rates, and GPU rental rates shift with demand and with new hardware generations. A comparison made today is a snapshot.

The default result is quite sensitive to the API rate. Raise API Blended Rate from 2 to 3 per million and the default flips: self-hosting is lower by $143.33 a month. A fall in API prices would push break-even further away. Try both directions before you commit to hardware.

On the GPU side, check whether the hourly rate you entered is on-demand, reserved or spot. Reserved capacity is usually cheaper but commits you for a term. Spot capacity can be interrupted, which matters for a live service.

Run the comparison with your realistic rate, a pessimistic one, and an optimistic one. If self-hosting wins in all three, the case is solid. If it only wins at the optimistic end, it rests on prices moving your way.

Reasons to self-host that a cost figure misses

Cost is not the only reason teams run their own models. Data that cannot leave a network, a need for a fine-tuned model the API does not offer, predictable latency, or independence from a provider's rate limits and model retirements can all justify self-hosting at a loss.

The calculator cannot weigh those, and it should not try. What it can do is put a price on them. If the API is lower by $856.67 a month, that is the monthly premium you are paying for control. Some teams will happily pay it; others will not.

The reverse also applies. An API gives you access to model updates, scaling on demand and no on-call burden. If self-hosting is only lower by $143.33 a month, ask whether that saving survives a single bad outage or a quality gap your users notice.

Model quality is the hardest to price. If the self-hosted model gives worse answers, users may retry, ask follow-up questions or leave, and every retry adds tokens. Compare models on your own tasks before trusting any break-even figure.