We buy the servers we test with our own money. Some links are affiliate links; they never change a verdict. Disclosure · How we test
The cost per million tokens on a self-hosted CPU server is the monthly price spread over everything the model writes. With our own measurements, the cheapest case was Llama 3.2 1B on a Hetzner CX33 running 24/7 at 0.17 € per million generated tokens. The most expensive full-time case was Llama 3.1 8B on the ARM CAX21 at 0.86 €. Use the server two hours a day instead and those figures rise twelvefold.
This matters now because Hetzner repriced its cloud plans in 2026, and the monthly price is half of this formula. Most pages on this topic assume a speed. We measured ours.
Tested in the Lab Hetzner CX23, CX33, CX43, CAX11, CAX21 · Nov 2026
This is part of our self-hosted LLM section. If you are still choosing hardware, read CPU vs GPU for LLM first.
Calculator
Pick a server and model we measured, set how many hours a day it actually generates, and enter an API price to compare. The calculator uses the formula below.
The API price field is in euros. Convert a dollar price yourself before you compare.
The formula
cost per 1M tokens = monthly price / (tokens/s × 3600 × hours per day × 30) × 1,000,000
24/7 case: monthly price / (tokens/s × 3600 × 24 × 30) × 1e6
Two inputs come from the Lab. Tokens/s is the generation speed we measured with Ollama, CPU only, for a 256-token answer at temperature 0. Monthly price is the Hetzner gross price (including VAT) from the Hetzner Cloud API, checked on 5 November 2026. A month is counted as 30 days.
Worked example: Llama 3.2 3B on the CX33 generated 13.5 tokens/s. 13.5 × 3,600 × 24 × 30 = 34,992,000 tokens a month. 10.27 € / 34,992,000 × 1,000,000 = 0.29 € per million.
Results for every server and model we measured
Our arithmetic, from the measured tokens/s and the monthly price of each server. Three utilisation cases: nonstop (24 h/day), a working day (8 h/day) and light use (2 h/day).
| Server (price/month) | Model | Measured tokens/s | Tokens/month at 24 h | € per 1M at 24 h/day | at 8 h/day | at 2 h/day |
|---|---|---|---|---|---|---|
| CX23 (6.64 €) | Llama 3.2 1B | 10.3 | 26.7M | 0.25 | 0.75 | 2.98 |
| CX23 (6.64 €) | Llama 3.2 3B | 5.8 | 15.0M | 0.44 | 1.33 | 5.30 |
| CX33 (10.27 €) | Llama 3.2 1B | 23.2 | 60.1M | 0.17 | 0.51 | 2.05 |
| CX33 (10.27 €) | Llama 3.2 3B | 13.5 | 35.0M | 0.29 | 0.88 | 3.52 |
| CX33 (10.27 €) | Llama 3.1 8B | 6.3 | 16.3M | 0.63 | 1.89 | 7.55 |
| CX43 (19.35 €) | Llama 3.2 1B | 37.5 | 97.2M | 0.20 | 0.60 | 2.39 |
| CX43 (19.35 €) | Llama 3.2 3B | 21.2 | 55.0M | 0.35 | 1.06 | 4.23 |
| CX43 (19.35 €) | Llama 3.1 8B | 9.7 | 25.1M | 0.77 | 2.31 | 9.24 |
| CAX11 (7.25 €) | Llama 3.2 1B | 15 | 38.9M | 0.19 | 0.56 | 2.24 |
| CAX11 (7.25 €) | Llama 3.2 3B | 6.5 | 16.8M | 0.43 | 1.29 | 5.16 |
| CAX21 (12.69 €) | Llama 3.2 1B | 26.8 | 69.5M | 0.18 | 0.55 | 2.19 |
| CAX21 (12.69 €) | Llama 3.2 3B | 12.2 | 31.6M | 0.40 | 1.20 | 4.82 |
| CAX21 (12.69 €) | Llama 3.1 8B | 5.7 | 14.8M | 0.86 | 2.58 | 10.31 |
Missing rows are missing on purpose. Llama 3.1 8B did not run on either 4 GB server: the ARM CAX11 failed at once (out of memory) and the x86 CX23 was OOM-killed after about 50 s. The measured speeds behind this table:
| Server | Model | Generation tokens/s | Prompt tokens/s | Load time | RAM used (system) | Note |
|---|---|---|---|---|---|---|
| Hetzner CX232 vCPU · 4 GB · x86_64 | Llama 3.2 1B | 10.3 | 454.0 | 3.5 s | 2,001 MiB | |
| Hetzner CX232 vCPU · 4 GB · x86_64 | Llama 3.2 3B | 5.8 | 325.2 | 8.8 s | 3,002 MiB | |
| Hetzner CX232 vCPU · 4 GB · x86_64 | Llama 3.1 8B | did not run | – | – | – | OOM-killed after ~50 s: Ollama fit check reported it would leave 1698 MiB free, |
| Hetzner CX334 vCPU · 8 GB · x86_64 | Llama 3.2 1B | 23.2 | 1,322.8 | 2.0 s | 2,205 MiB | |
| Hetzner CX334 vCPU · 8 GB · x86_64 | Llama 3.2 3B | 13.5 | 776.5 | 3.7 s | 3,068 MiB | |
| Hetzner CX334 vCPU · 8 GB · x86_64 | Llama 3.1 8B | 6.3 | 258.6 | 10.0 s | 5,941 MiB | |
| Hetzner CX438 vCPU · 15 GB · x86_64 | Llama 3.2 1B | 37.5 | 1,910.9 | 1.7 s | 2,293 MiB | |
| Hetzner CX438 vCPU · 15 GB · x86_64 | Llama 3.2 3B | 21.2 | 1,161.3 | 3.7 s | 3,196 MiB | |
| Hetzner CX438 vCPU · 15 GB · x86_64 | Llama 3.1 8B | 9.7 | 447.4 | 7.9 s | 6,023 MiB | |
| Hetzner CAX112 vCPU · 4 GB · aarch64 | Llama 3.2 1B | 15.0 | 835.5 | 4.8 s | 2,203 MiB | |
| Hetzner CAX112 vCPU · 4 GB · aarch64 | Llama 3.2 3B | 6.5 | 376.4 | 6.0 s | 3,214 MiB | |
| Hetzner CAX112 vCPU · 4 GB · aarch64 | Llama 3.1 8B | did not run | – | – | – | llama-server process has terminated: exit status 1: ggml_aligned_malloc: insuffi |
| Hetzner CAX214 vCPU · 8 GB · aarch64 | Llama 3.2 1B | 26.8 | 1,427.1 | 3.2 s | 2,315 MiB | |
| Hetzner CAX214 vCPU · 8 GB · aarch64 | Llama 3.2 3B | 12.2 | 664.1 | 5.2 s | 3,282 MiB | |
| Hetzner CAX214 vCPU · 8 GB · aarch64 | Llama 3.1 8B | 5.7 | 226.5 | 12.3 s | 5,796 MiB |
Measured by AI Hosting Lab on 2026-11-05 · 5 servers · method · raw data
What the table tells you
The mid-size x86 server is the cost winner
For every model, the 4 vCPU CX33 had the lowest cost per token. The 8 vCPU CX43 is faster (21.2 vs 13.5 tokens/s with Llama 3.2 3B) but costs 19.35 € instead of 10.27 €, and its speed did not grow as fast as its price. Pick the CX43 for shorter waits, not for cheaper tokens.
ARM is not cheaper per token here
The ARM CAX21 costs 12.69 € and generated 12.2 tokens/s with the 3B model, so it came out at 0.40 € per million against 0.29 € on the x86 CX33. On the 2 vCPU tier it is closer: the CAX11 and the CX23 are almost level with the 3B model (0.43 € vs 0.44 €), and the CAX11 wins with the 1B model (0.19 € vs 0.25 €). See Hetzner CX vs CAX for the full comparison.
Utilisation decides everything
A VPS costs the same whether the model works or sits idle. Halve the hours and you double the cost per token. A server that answers a few questions a day can end up costing more per token than any API by a wide margin. GEICO's engineering team found the same effect on rented H100 GPUs: low utilisation multiplied cost per token by 2.5 to 24 times at realistic loads.
Comparison with API prices
Official pricing pages, opened on 5 November 2026. Prices are in US dollars per 1 million tokens. Our server figures are in euros; we did not convert them.
| API model | Input per 1M | Output per 1M | Source |
|---|---|---|---|
| Llama 3.1 8B Instruct Turbo (DeepInfra) | $0.02 | $0.04 | deepinfra.com/pricing |
| gpt-5-nano (OpenAI) | $0.05 | $0.40 | OpenAI API pricing |
| gpt-4o-mini (OpenAI) | $0.15 | $0.60 | OpenAI API pricing |
| Gemini 2.5 Flash-Lite (Google, paid tier) | $0.10 | $0.40 | Gemini API pricing |
The fairest comparison is the same model. Llama 3.1 8B through DeepInfra cost $0.04 per million output tokens. Our cheapest self-hosted 8B figure was 0.63 € on the CX33 running nonstop. Even treating dollars and euros as equal, the API was more than 15 times cheaper per output token.
Against the small closed models, a fully busy CX33 running Llama 3.2 3B at 0.29 € per million is in the same range as their output prices. These are different models with different quality, so a lower price per token is not the same as a lower price per useful answer. Google also offers a free tier for Gemini 2.5 Flash-Lite.
The honest conclusion: on CPU, self-hosting does not save money per token against current API prices. People self-host for other reasons. Their data never leaves the server, the price is a fixed monthly figure, nothing is rate-limited, and the model cannot be changed or retired under them.
What the formula leaves out
- Prompt tokens. We count only generated tokens. Long inputs take time to read: 776.5 tokens/s for Llama 3.2 3B on the CX33 in our test. That time is billed by the month too.
- Parallel requests. We measured one request at a time. Ollama can handle several at once, but we have not measured whether total throughput rises on these CPUs, so we do not count on it.
- Other apps on the same server. If n8n or Supabase shares the box, part of the price belongs to them, and the model's share per token gets lower. It also has to fit in RAM: check with the VPS RAM calculator.
- Your time. Updates and monitoring are not in the per-token figure.
- GPUs. RunPod listed an RTX 4090 at $0.89 per hour on its pricing page today. We have not measured GPU throughput, so we cannot give a GPU cost per million yet. GPU tests are scheduled.
When the per-token math works in your favour
Self-hosted tokens get cheaper the more of the month the model spends writing. Three ways to get there:
- Queue the work. Collect jobs during the day (ticket tagging, summaries, classification) and let the model run through them overnight. On the CX33 with Llama 3.2 3B, our measured 13.5 tokens/s works out to about 1.17 million tokens per full day.
- Use the smallest model that does the job. On the same CX33, Llama 3.2 1B came out at 0.17 € per million at full use and Llama 3.1 8B at 0.63 €. Test the small one on your real task first.
- Share the server. If the box already runs n8n for your automations, the model uses capacity you pay for anyway. Just make sure both fit in RAM at the same time.
Skip self-hosting for cost reasons if your model only answers a handful of requests a day. At 2 hours of generation a day, even the best case in our table was 2.05 € per million, five times gpt-5-nano's listed $0.40 output price before currency conversion.
Current Hetzner prices used
| Plan | CPU | vCPU | RAM | Disk | Per month excl. VAT | Per month incl. 21% VAT | Per hour incl. VAT |
|---|---|---|---|---|---|---|---|
| CAX11 | arm | 2 | 4 GB | 40 GB | 5.99 € | 7.25 € | 0.0116 € |
| CAX21 | arm | 4 | 8 GB | 80 GB | 10.49 € | 12.69 € | 0.0203 € |
| CAX31 | arm | 8 | 16 GB | 160 GB | 20.99 € | 25.40 € | 0.0407 € |
| CAX41 | arm | 16 | 32 GB | 320 GB | 40.99 € | 49.60 € | 0.0795 € |
| CCX13 | x86 | 2 | 8 GB | 80 GB | 42.99 € | 52.02 € | 0.0834 € |
| CCX23 | x86 | 4 | 16 GB | 160 GB | 85.99 € | 104.05 € | 0.1667 € |
| CCX33 | x86 | 8 | 32 GB | 240 GB | 138.49 € | 167.57 € | 0.2685 € |
| CCX43 | x86 | 16 | 64 GB | 360 GB | 275.99 € | 333.95 € | 0.5352 € |
| CCX53 | x86 | 32 | 128 GB | 600 GB | 533.49 € | 645.52 € | 1.0346 € |
| CCX63 | x86 | 48 | 192 GB | 960 GB | 853.49 € | 1,032.72 € | 1.6550 € |
| CPX11 | x86 | 2 | 2 GB | 40 GB | 5.49 € | 6.64 € | 0.0106 € |
| CPX02 | x86 | 1 | 1 GB | 20 GB | 5.99 € | 7.25 € | 0.0116 € |
| CPX21 | x86 | 3 | 4 GB | 80 GB | 9.49 € | 11.48 € | 0.0184 € |
| CPX12 | x86 | 1 | 2 GB | 40 GB | 11.49 € | 13.90 € | 0.0223 € |
| CPX31 | x86 | 4 | 8 GB | 160 GB | 17.49 € | 21.16 € | 0.0339 € |
| CPX22 | x86 | 2 | 4 GB | 80 GB | 19.49 € | 23.58 € | 0.0378 € |
| CPX41 | x86 | 8 | 16 GB | 240 GB | 32.49 € | 39.31 € | 0.0630 € |
| CPX32 | x86 | 4 | 8 GB | 160 GB | 35.49 € | 42.94 € | 0.0688 € |
| CPX42 | x86 | 8 | 16 GB | 320 GB | 69.49 € | 84.08 € | 0.1348 € |
| CPX51 | x86 | 16 | 32 GB | 360 GB | 70.99 € | 85.90 € | 0.1377 € |
| CPX52 | x86 | 12 | 24 GB | 480 GB | 100.49 € | 121.59 € | 0.1948 € |
| CPX62 | x86 | 16 | 32 GB | 640 GB | 129.99 € | 157.29 € | 0.2520 € |
| CX23 | x86 | 2 | 4 GB | 40 GB | 5.49 € | 6.64 € | 0.0106 € |
| CX33 | x86 | 4 | 8 GB | 80 GB | 8.49 € | 10.27 € | 0.0165 € |
| CX43 | x86 | 8 | 16 GB | 160 GB | 15.99 € | 19.35 € | 0.0310 € |
| CX53 | x86 | 16 | 32 GB | 320 GB | 29.49 € | 35.68 € | 0.0572 € |
From the Hetzner Cloud API, location hel1, checked 2026-11-05. "Incl. VAT" is what our Czech (EU consumer) account pays; businesses and buyers outside the EU usually pay the price excl. VAT. Primary IPv4 is billed separately.
Next step: see how these speeds feel in use, and when a GPU becomes worth renting, in CPU vs GPU for LLM.
Hetzner prices on this page include 21% VAT, as charged to our Czech (EU consumer) account by the Hetzner API on 2026-11-05. Without VAT (businesses, most buyers outside the EU): CX23 5.49 €, CX33 8.49 €, CX43 15.99 €, CAX11 5.99 €, CAX21 10.49 € per month.
FAQ
What does 1 million tokens cost on a self-hosted CPU server?
From 0.17 € (Llama 3.2 1B on a Hetzner CX33 running 24/7) to 0.86 € (Llama 3.1 8B on a CAX21 running 24/7) in our measurements. At 2 hours of generation a day the same setups cost 2.05 € and 10.31 € per million.
Is self-hosting cheaper than an API per token?
Usually not for small models. DeepInfra listed Llama 3.1 8B Instruct Turbo at $0.04 per 1M output tokens on 5 November 2026, far below our best 8B result of 0.63 € at full use. Self-hosting is a privacy and control choice more than a per-token saving.
How do you calculate cost per million tokens?
Monthly server price divided by tokens generated per month, times one million. Tokens per month = measured tokens/s × 3,600 × hours per day × 30.
Does the cost include prompt tokens?
No. We count generated tokens only. Reading long prompts takes extra time on a CPU, so real cost per useful answer is higher than the figure shown.



