Compare self-hosting an LLM against GPT, Claude and Gemini API pricing. Break-even timelines and capacity checks for owned GPUs or rented cloud compute.
This tool answers one financial question. Given a monthly token volume, a commercial API you would otherwise call, and a specific piece of hardware you would otherwise buy or rent, how many months until the hardware has paid for itself — and can that hardware physically serve the volume at all? It puts the API bill and the self-hosting bill side by side, plots both cumulatively over 24 months, and delivers a verdict.
The honest headline, before any of the arithmetic: self-hosting wins on cost in two situations — very high sustained volume, or hardware you already own and are not paying to acquire. At hobby volumes against a cheap hosted open model, buying a GPU does not pay back within the useful life of the card. The tool is built to show you that rather than to sell you a build.
| Side | What is counted |
|---|---|
| API | Input tokens × input price plus output tokens × output price, per month, at published per-million rates |
| Self-host (owned) | Purchase price as an up-front cost, plus electricity at your rate for the hours actually computing plus an idle draw for the rest of the month |
| Self-host (rented) | Hourly cloud rate multiplied by the compute-hours the volume requires, with no up-front cost |
Volume is entered either as one of four presets or as raw monthly input and output token counts. The presets are roughly: a hobbyist at 30 million input and 9 million output tokens a month; a small app at 300 million and 90 million; a growing app at 3 billion and 900 million; and a high-volume service at 30 billion and 9 billion. The three-to-one input-to-output ratio in those presets reflects typical chat and RAG traffic, where prompts are long and answers are short. If your workload is a summariser or a code generator, override it — output tokens are the expensive ones on both sides of the comparison.
Cost per month is meaningless if the box cannot keep up. Before comparing money, the calculator estimates single-stream generation speed for the open model you have chosen on the hardware you have chosen, then works out how many compute-hours per month your volume needs. There are 730 hours in an average month; if the requirement exceeds that, you get an explicit warning that the hardware cannot serve the volume, no matter how good the break-even looks.
This bites earlier than expected. An RTX 4090 running Llama 3.3 70B generates around 14 tokens/sec single-stream. The small-app preset's 90 million output tokens a month would take roughly 2,300 compute-hours — more than three months of continuous running crammed into one month. Two used RTX 3090s in tensor-parallel roughly double the rate to around 25 tok/s and still need about 1,300 hours. The same preset against a mixture-of-experts model changes the picture completely: Qwen3 30B-A3B on one 4090 projects to about 232 tok/s and needs roughly 143 hours, comfortably inside the month.
That is the single most useful output of the tool. If your volume needs a serious dense model, single-stream self-hosting runs out of hours long before it runs out of money, and the answer is batched serving, more GPUs, or a smaller or sparser model.
The dataset includes frontier models, mid-tier and budget models, and — crucially — open models served by hosted inference providers. Choosing a frontier API as your baseline makes self-hosting look extraordinary, because you are comparing a top-end proprietary model against electricity. At the small-app preset a frontier model at $3 per million input and $15 per million output tokens costs about $2,250 a month; running Llama 3.1 8B on a 4090 you own costs roughly $17 a month in power. Of course the GPU "pays for itself in under a month". You have also swapped models, and an 8B is not a frontier model.
The apples-to-apples comparison is against a hosted version of the same open weights. Run those and the numbers become sober:
| Scenario | Hosted API | Self-host running cost | Up-front | Break-even |
|---|---|---|---|---|
| Hobbyist volume, 70B, buy an RTX 4090 | ~$24.81/mo | ~$17.14/mo | $1,800 | ~235 months — never, in practice |
| Hobbyist volume, 8B, buy an RTX 4090 | ~$2.22/mo | ~$4.07/mo | $1,800 | Never — self-hosting costs more per month |
| Small app, 8B, buy an RTX 4090 | ~$22.20/mo | ~$21.74/mo | $1,800 | Effectively never |
| Small app, 70B, two used RTX 3090s | ~$248.10/mo | ~$138.44/mo | $1,500 | ~13.7 months, but over capacity |
| Growing app, 70B, two used RTX 3090s | ~$2,481/mo | ~$1,384/mo | $1,500 | ~1.4 months, far over capacity |
| Hobbyist volume, 8B, hardware you already own | ~$24.81/mo | ~$3.17/mo | $0 | Cheaper from day one |
Read those rows together and the shape of the answer appears. Against a cheap hosted open model, a GPU bought specifically to save money is a bad trade at hobby and small-app volumes — the hosted rate for an 8B model is so low that electricity alone can exceed it. Break-even only becomes credible once volume is high enough that the monthly API bill runs into the hundreds or thousands, and precisely at that point the capacity warning starts firing and the true cost is several GPUs, not one. The one unambiguous win is the last row: if the hardware is already on your desk and already paid for, the marginal cost is a few dollars of electricity and self-hosting is cheaper immediately.
The self-hosting side offers three categories, and which one you pick changes the shape of the answer more than any other input:
Alongside the hardware you choose which open model would be running — the list spans Llama 3.1 8B, Qwen3 14B, Qwen3 30B-A3B, Qwen3 32B, a Gemma mixture-of-experts entry, Llama 3.3 70B and GPT-OSS 120B. The choice feeds the speed and capacity estimate at 4-bit quantisation, so a sparse mixture-of-experts model and a dense model of similar size produce completely different hour counts on identical hardware. The Mac Studio option is instructive here: at roughly 90 W it has by far the lowest running cost of the purchase options and enough unified memory for large models, but its bandwidth caps generation speed, so it uses more of the month's hours to deliver the same tokens.
The chart plots cumulative spend rather than monthly spend, which is the right view for a purchase decision. The API line starts at zero and climbs at a constant slope. The self-hosting line starts at the purchase price and climbs slowly. Break-even is where they cross. If they have not crossed by the right-hand edge, the hardware has not paid for itself in two years, and the tool states plainly that a payback beyond about 36 months is longer than the realistic life of the card — at which point the API is the practical choice regardless of what the arithmetic says about month 40.
For owned hardware the calculator does not simply multiply the card's rated draw by 730 hours. It charges the full load wattage only for the hours the model is actually computing, and adds a much smaller idle draw scaled from the card's power rating for the remaining hours, then multiplies the total by the rate per kilowatt-hour you enter. The default rate is $0.15/kWh; change it, because power prices vary by more than a factor of three between regions and it moves the answer materially at high utilisation. Cloud rentals are billed only for the hours needed, which assumes you are disciplined about shutting instances down — a rented GPU left running idle is charged like one under full load, and this model does not simulate that mistake for you.
Cost is the question this calculator answers, but it is often not the deciding one. Data residency — prompts that legally or contractually cannot leave your premises — makes the break-even irrelevant, because the API is not an option at any price. So does the need for predictable spend rather than a bill that scales with usage, freedom from rate limits and provider deprecations, offline operation, or running a fine-tune that no provider hosts. If one of those applies, use the tool to size the hardware and understand the running cost rather than to justify the decision.
Conversely, if none of them applies and your volume sits at hobby or small-app scale, the arithmetic here will usually tell you to keep paying per token. That is a legitimate result, and it is cheaper than finding it out after the card arrives.
API rates and cloud GPU rates move frequently, and the dataset carries the date it was last checked on screen. Used-GPU prices in particular are a moving target. Before committing to a purchase on the strength of a break-even in months, re-check the current price of the specific card and the current per-million rate of the specific API — a 20% move in either can turn a fourteen-month payback into a thirty-month one.
The break-even calculation has a structure most people get wrong:
API cost scales linearly with usage: tokens x price. Double your usage, double your bill, forever.
Self-hosting cost is mostly fixed: the hardware costs the same whether you run it 1 hour or 24 hours a day. Electricity scales with usage but is small (a 4090 at full tilt costs about 1.60 dollars/day in power).
This means there is always a crossover volume above which self-hosting wins — the only questions are whether your volume is above it, and whether the hardware can physically serve that volume (the capacity check).
The two failure modes: buying hardware for low usage (a 2,000 dollar GPU to save 10 dollars/month of API calls never pays off), and underestimating capacity needs (one consumer GPU cannot serve a production app with thousands of daily users — you need batch serving or multiple GPUs, which changes the math).
Rules of thumb from current prices:
Use a budget API (Gemini Flash-Lite, GPT-4.1 Nano, DeepSeek): for almost any volume under 1B tokens/month, these are nearly impossible to beat — under 50 dollars/month for what would require dedicated hardware to self-host.
Use open-model hosting (Groq, Together): when you specifically want open models (Llama, Qwen) without operations work. Groq serves Llama 3.1 8B at 5 cents per million input tokens — cheaper than your electricity to self-host it.
Self-host on owned hardware: when you already have the GPU (gaming PC, Mac), value privacy, or your volume against a frontier API exceeds ~200-500 dollars/month and a capable open model genuinely covers your use case.
Rent cloud GPUs: for fine-tuning runs, batch processing jobs, and validating self-hosting before buying hardware.
Pay for frontier APIs: when capability is the constraint. No amount of self-hosting math makes Llama into Claude Opus.
It depends almost entirely on volume and which API you are replacing. Low volume (under ~50M tokens/month): APIs win — even budget hardware never pays for itself. High volume against frontier APIs (Claude Opus, GPT-5.4 Pro): self-hosting can pay for itself in weeks. High volume against budget APIs (Gemini Flash-Lite, Groq-hosted Llama): APIs usually still win, because providers run hardware at near-perfect utilization and you cannot. The honest comparison is against open-model hosting (Groq/Together), not against frontier models — a self-hosted Llama is not a GPT-5 replacement.
Three components: hardware (a used RTX 3090 at ~700 dollars to a Mac Studio at ~4,700 dollars, amortized over its useful life), electricity (a 350-450W GPU running a few hours a day costs 5-25 dollars/month at typical US rates), and your time (setup, updates, debugging — the hidden cost everyone forgets). For light personal use, electricity is nearly negligible; the hardware cost dominates.
A single RTX 4090 running Llama 3.3 70B... cannot (it does not fit). Running an 8B model at ~100 tokens/sec, one 4090 can theoretically generate ~260M tokens/month running 24/7. With realistic 30% utilization, ~80M tokens/month. Production serving frameworks (vLLM) with request batching multiply this 5-10x by processing many requests simultaneously. This calculator includes a capacity check that flags when your volume exceeds what the hardware can deliver.
Rent if: your usage is bursty (training runs, batch jobs), you need datacenter GPUs (H100s cost 25K+ to buy but ~2.50/hr to rent), or you are validating an idea. Buy if: you have steady daily usage, consumer hardware covers your needs, and you will use it for 18+ months. The crossover is roughly 6-10 hours of daily use — below that, renting wins; above it, owning wins. Cloud spot/community pricing (RunPod, Vast.ai) has made renting much more competitive.
This is the elephant in the room: a self-hosted Llama 3.3 70B is roughly comparable to mid-tier API models, not to frontier models like Claude Opus or GPT-5.4 Pro. If your workload genuinely needs frontier capability, self-hosting is not an alternative — it is a different product. The fair comparisons are: self-hosting vs open-model hosting APIs (Groq, Together), or accepting the capability trade-off in exchange for privacy, control, and cost.
Privacy: prompts and data never leave your infrastructure — relevant for healthcare, legal, and anything under NDA. No rate limits: your hardware, your queue. Latency consistency: no API outages or degraded performance during peak hours. Compliance: some regulations effectively require data to stay on-premises. Predictable costs: no surprise bills from a usage spike. For many organizations these matter more than the per-token math.
API and cloud GPU prices in this calculator were verified in June 2026. LLM API prices have been falling roughly 80% year-over-year, so check provider pages for the latest. Hardware prices are street prices for new cards (used market is typically 30-50% less). We update this dataset periodically; the "as of" date is shown in the methodology note.
Detect your GPU with one click and see which LLMs your computer can actually run — ranked by whether they fit in your VRAM, need CPU offloading, or will not run at all.
Estimate LLM tokens per second from memory bandwidth, model size, quantization, and context window. Compare generation speed across GPUs and understand the memory-bandwidth bottleneck.
Calculate AWS Bedrock costs for Claude, Llama, Titan, and other AI models. Estimate input/output token costs for your workload
Compare cloud computing costs across AWS, Azure, and Oracle Cloud. Get instant pricing estimates for compute instances with real-time data.