Contents
What the model is
The calculator estimates what it costs to serve tokens from a machine you own, and compares that with renting GPUs by the hour or paying a per-token API price. It is a model of cost, not a measurement of anything. Every output follows from the inputs you give it by the formulas below, which are the same formulas the calculator runs, and which are covered by automated tests.
All money is in one currency at a time. When you switch currency, amounts are converted with the exchange rates described at the end of this page.
Symbols
| Symbol | Meaning |
|---|---|
| Server cost: the complete machine, GPUs included | |
| GPU share of the server cost (used only for performance-per-cost figures) | |
| Depreciation period in months | |
| Residual value after months, as a fraction of | |
| Electricity price per kWh | |
| , | Idle power and inference power, in watts |
| Utilisation: the share of all hours spent serving, from 0 to 1 | |
| Hosting, networking and maintenance per month | |
| Hours per month, fixed at 730 () | |
| Aggregate output (decode) tokens per second at the stated concurrency | |
| Aggregate uncached input (prefill) tokens per second | |
| Input tokens per output token | |
| Share of input tokens served from the prefix cache, 0 to 1 | |
| Concurrency at which and were measured |
Self-hosting
Time and energy
Busy hours and idle hours in a month:
Energy used in a month, in kWh:
Throughput
Serving one output token also requires processing uncached input tokens. If was measured on a workload that already includes prefill, the effective output rate is . Otherwise it is the reciprocal of the time spent per output token on decode plus prefill:
The share of busy time spent on prefill is
and the decode speed each of concurrent streams sees, assuming an even split, is .
Monthly cost
Here is straight-line depreciation, is operating cost (electricity plus hosting) and is the fully loaded monthly cost.
Tokens served per month
These are output, input, cached input and uncached input tokens.
Cost per million tokens
The electricity-while-serving figure ignores idle time, hosting and depreciation, so it is a floor, not a price.
Splitting the fully loaded cost between input and output by time share gives the allocated costs:
Efficiency figures
Alternatives
Per-token API
The same monthly volume priced at an API’s input, cached-input and output rates (, , per million tokens):
Rented GPUs
With GPUs at an hourly price per GPU, always-on billing charges every hour and busy-hours-only billing charges only the hours spent serving:
Comparing
Break-even utilisation
Each option’s monthly cost is a straight line in utilisation, . For self-hosting, with and the energy terms above:
For the API, and is the API cost of the volume served at full utilisation. The two lines cross at
The calculator reports a crossover only if lies between 0 and 100 per cent. Otherwise one option is cheaper at every utilisation, and it says which.
Payback
shown only when . It ignores resale value, interest and any change in prices.
Total cost of ownership
Over months, self-hosting costs the depreciation consumed plus operating cost:
where is the straight-line book value. The alternatives cost .
What the model leaves out
- Throughput is an input. Use measured figures with their evidence labels, such as those on the benchmark pages, at a concurrency that matches your workload. A preliminary result gives a preliminary cost.
- No tax, financing or insurance, no staff time, and no replacement of failed parts.
- Power is two numbers, idle and inference. Real draw varies with load, and data-centre overheads such as cooling are not modelled unless you include them in the figures you enter.
- Straight-line depreciation to a residual value you choose. Used GPU prices can move quickly.
- API and rental prices are inputs you type. The calculator does not fetch live prices. Check them at the source on the day you decide.
- Quality is not priced. Two systems that serve the same number of tokens may not serve the same quality, and tokenisers differ between models.
- Utilisation is assumed constant, with no peaks, queueing or latency targets.
Exchange rates
Amounts are converted using the reference rates published by the European Central Bank, with the rate date shown beside every conversion. The conversion from currency to currency uses rates quoted against the euro:
Rates are a fixed snapshot in the site data and are refreshed by hand, so they can be several days old. They are for orientation: do not use them for invoicing or accounting.