Arrakis / Blog / Costs, startups and teams
Self Hosted LLM Cost per Million Tokens: The Math
Self-hosted LLM cost per million tokens is your GPU's hourly price divided by the millions of tokens it serves in that hour. If one H200 at the October 2026 market median of $5.70 an hour sustains 1,000 tokens a second, its tokens cost about $1.58 per million. If it sits idle nine hours in ten, the same tokens cost ten times that.
The whole game is utilization. Here is the math, a way to measure your own inputs in an afternoon, and the line where self-hosting beats an API.
The formula
tokens per hour = tokens per second x 3,600
cost per million tokens = hourly price / (tokens per hour / 1,000,000)
= hourly price x 277.8 / tokens per second
real cost per million = cost per million / share of paid hours the GPU is busyTwo rules keep the comparison honest:
- Count the tokens your API bill counts. Most APIs price input and output tokens differently. Compare output with output, or totals with a blended price.
- Use throughput across all requests, not per request. A GPU serving dozens of conversations at once produces far more tokens per second than any single conversation sees. Batching is where self-hosting earns its keep.
A worked table
Inputs: one H200 at $5.70 per GPU-hour (uvik.net GPU price index, October 2026 median, on demand). The throughputs are example inputs, not benchmarks; your model and your settings decide yours.
| Sustained throughput | Tokens per hour | Busy 100% | Busy 50% | Busy 10% |
|---|---|---|---|---|
| 250 tokens/s | 0.9 million | $6.33 | $12.67 | $63.33 |
| 1,000 tokens/s | 3.6 million | $1.58 | $3.17 | $15.83 |
| 4,000 tokens/s | 14.4 million | $0.40 | $0.79 | $3.96 |
Compare two cells. The 4,000 tokens/s GPU that's busy one hour in ten costs $3.96 per million; a GPU a quarter as fast that never stops costs $1.58. Utilization moves the result as much as raw speed does.
Your hourly price comes from memory
The hourly price is set by the smallest setup that holds your model. The memory figures come from our model pages; the prices are the lowest listings right now:
| Model | Precision | GPU memory | Smallest setup | Lowest price now |
|---|---|---|---|---|
| Qwen3.8-27B | 4-bit | 17 GB | 1x RTX 4090 | the live price per GPU-hour |
| Qwen3.8-27B | 16-bit | 67 GB | 1x A100 | the live price per GPU-hour |
| gpt-oss-120b | 8-bit | 140 GB | 1x H200 | the live price per GPU-hour |
| GLM-5.3 | 8-bit | 904 GB | 4x B300 | the live price per GPU-hour, times four |
Lower precision means a cheaper GPU, but check quality on your own prompts before you commit to 4-bit. The rules behind the memory numbers are in the GPU memory guide, and the Qwen model is covered in depth in Qwen3.8-27B GPU requirements.
Measure your throughput in an afternoon
Deploy the model on the GPU you picked, then replay prompts that look like your traffic at the concurrency you expect. The endpoint speaks the OpenAI API and reports token counts in every answer's usage, so counting is easy:
import asyncio, time
from openai import AsyncOpenAI
client = AsyncOpenAI(base_url="http://<your endpoint>/v1", api_key="sk-...")
PROMPTS = ["Summarize this support ticket: ...", "Draft a reply to: ..."] # use real ones
async def one(prompt):
r = await client.chat.completions.create(
model="Qwen/Qwen3.8-27B",
messages=[{"role": "user", "content": prompt}],
max_tokens=400,
)
return r.usage.completion_tokens
async def main(concurrency=32, rounds=5):
start, total = time.time(), 0
for i in range(rounds):
batch = [PROMPTS[(i + j) % len(PROMPTS)] for j in range(concurrency)]
total += sum(await asyncio.gather(*(one(p) for p in batch)))
seconds = time.time() - start
print(f"{total} output tokens in {seconds:.0f} s = {total / seconds:.0f} tokens/s")
asyncio.run(main())Raise the concurrency until latency gets worse than your product allows; the throughput at that point is your number. The free plan call, POST /v1/deploy/plan, also gives a rough speed for one request on each GPU the model fits on. Use it to shortlist GPUs, then measure the batched number yourself.
A batch job, start to finish
Batch work is where the formula is easiest to trust, because you set the concurrency and the queue never runs dry. Example inputs: one million support tickets to summarize at about 300 output tokens each, so 300 million output tokens. Say your load test showed one H200 sustaining 2,000 output tokens a second at full concurrency. That's 7.2 million tokens an hour, so the job takes about 41.7 hours, which bills as 42 started hours. At the $5.70 October median that's $239.40, about $0.80 per million output tokens, with the GPU busy for almost every minute you paid for. Stop the machine when the queue empties and the bill stops with it.
Costs the formula leaves out
- Start-up minutes. After the machine starts, the engine downloads and loads the model before it answers, usually a few minutes. Keep a server up for long stretches rather than restarting it per job.
- Rounding. Each started hour counts in full, so a 61-minute job pays for two hours.
- Storage. Datasets and outputs kept on a volume are billed per GB-month of data held.
- Attention. An endpoint you run is an endpoint you watch. Set a removal time so a forgotten one stops by itself.
When self-hosting wins
- Steady traffic. The machine costs its hourly price however many requests it serves, so a GPU that stays busy pushes the cost per token down every hour.
- Batch jobs. Summarize a million documents at full concurrency, then stop the machine. You pay for hours, not tokens.
- Models no API serves. Your own fine-tune, a fresh open release, or an exact version you need to pin. Big ones too: GLM-5.3 in 8-bit fits on four B300s.
- Your own engine options. You choose the engine and its flags, from context length to prefix caching.
Self-hosting doesn't mean owning, and in 2026 owning means a big check up front. New 8-GPU B300 nodes were appraised at $400,000 to $520,000 in October 2026 (amcompute.com). At a hypothetical $50 an hour for that machine, $400,000 pays for 8,000 hours of it, about 11 months round the clock. An owned GPU counts every hour of its life as a paid hour, so the busy share in the formula is set by your traffic alone. Rented, you stop the machine when the work stops and the paid hours stop with it. Full math: rent vs buy GPUs in 2026.
When the API wins
- A few requests a day. Each started hour is charged in full. A GPU that answers ten requests an hour is mostly idle time you paid for.
- Spiky traffic with long quiet stretches. Per-token billing scales to zero; a rented GPU doesn't.
- Work that needs an SLA. Arrakis has none during early access.
The break-even in one line
Self-hosting wins when the throughput you sustain beats this:
break-even tokens per second = hourly price x 277.8 / (API price per million x busy share)Example inputs: an H200 at $5.70 an hour, busy half the time, against an API that charges $2.00 per million output tokens. 5.70 x 277.8 / (2.00 x 0.5) is about 1,583 output tokens per second. Sustain more than that across your traffic and your own GPU is cheaper; sustain less and the API is. Put your real API price and your measured throughput in, and you have your answer.
Run the numbers on a real GPU
Deploy your model, load-test it for an hour, and decide with your own data instead of someone else's benchmark. Start on the deploy page or rent a GPU from the console.
New here? Use code FIRST25 for $25 off your first deposit of $50 or more, until 31 December 2026.
Rent the GPUs in this post
- H200the live price /GPU-hourRent
- A100the live price /GPU-hourRent
- RTX 4090the live price /GPU-hourRent
- B300the live price /GPU-hourRent
New here? Use code FIRST25 for $25 off your first deposit of $50 or more, until 31 December 2026.
Lowest price now, per GPU-hour. Billed per started hour; stop any time.