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)ModelMeasured tokens/sTokens/month at 24 h€ per 1M at 24 h/dayat 8 h/dayat 2 h/day
CX23 (6.64 €)Llama 3.2 1B10.326.7M0.250.752.98
CX23 (6.64 €)Llama 3.2 3B5.815.0M0.441.335.30
CX33 (10.27 €)Llama 3.2 1B23.260.1M0.170.512.05
CX33 (10.27 €)Llama 3.2 3B13.535.0M0.290.883.52
CX33 (10.27 €)Llama 3.1 8B6.316.3M0.631.897.55
CX43 (19.35 €)Llama 3.2 1B37.597.2M0.200.602.39
CX43 (19.35 €)Llama 3.2 3B21.255.0M0.351.064.23
CX43 (19.35 €)Llama 3.1 8B9.725.1M0.772.319.24
CAX11 (7.25 €)Llama 3.2 1B1538.9M0.190.562.24
CAX11 (7.25 €)Llama 3.2 3B6.516.8M0.431.295.16
CAX21 (12.69 €)Llama 3.2 1B26.869.5M0.180.552.19
CAX21 (12.69 €)Llama 3.2 3B12.231.6M0.401.204.82
CAX21 (12.69 €)Llama 3.1 8B5.714.8M0.862.5810.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:

ServerModelGeneration
tokens/s
Prompt
tokens/s
Load timeRAM used (system)Note
Hetzner CX232 vCPU · 4 GB · x86_64Llama 3.2 1B10.3454.03.5 s2,001 MiB
Hetzner CX232 vCPU · 4 GB · x86_64Llama 3.2 3B5.8325.28.8 s3,002 MiB
Hetzner CX232 vCPU · 4 GB · x86_64Llama 3.1 8Bdid not run–––OOM-killed after ~50 s: Ollama fit check reported it would leave 1698 MiB free,
Hetzner CX334 vCPU · 8 GB · x86_64Llama 3.2 1B23.21,322.82.0 s2,205 MiB
Hetzner CX334 vCPU · 8 GB · x86_64Llama 3.2 3B13.5776.53.7 s3,068 MiB
Hetzner CX334 vCPU · 8 GB · x86_64Llama 3.1 8B6.3258.610.0 s5,941 MiB
Hetzner CX438 vCPU · 15 GB · x86_64Llama 3.2 1B37.51,910.91.7 s2,293 MiB
Hetzner CX438 vCPU · 15 GB · x86_64Llama 3.2 3B21.21,161.33.7 s3,196 MiB
Hetzner CX438 vCPU · 15 GB · x86_64Llama 3.1 8B9.7447.47.9 s6,023 MiB
Hetzner CAX112 vCPU · 4 GB · aarch64Llama 3.2 1B15.0835.54.8 s2,203 MiB
Hetzner CAX112 vCPU · 4 GB · aarch64Llama 3.2 3B6.5376.46.0 s3,214 MiB
Hetzner CAX112 vCPU · 4 GB · aarch64Llama 3.1 8Bdid not run–––llama-server process has terminated: exit status 1: ggml_aligned_malloc: insuffi
Hetzner CAX214 vCPU · 8 GB · aarch64Llama 3.2 1B26.81,427.13.2 s2,315 MiB
Hetzner CAX214 vCPU · 8 GB · aarch64Llama 3.2 3B12.2664.15.2 s3,282 MiB
Hetzner CAX214 vCPU · 8 GB · aarch64Llama 3.1 8B5.7226.512.3 s5,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 modelInput per 1MOutput per 1MSource
Llama 3.1 8B Instruct Turbo (DeepInfra)$0.02$0.04deepinfra.com/pricing
gpt-5-nano (OpenAI)$0.05$0.40OpenAI API pricing
gpt-4o-mini (OpenAI)$0.15$0.60OpenAI API pricing
Gemini 2.5 Flash-Lite (Google, paid tier)$0.10$0.40Gemini 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

PlanCPUvCPURAMDiskPer month excl. VATPer month incl. 21% VATPer hour incl. VAT
CAX11arm24 GB40 GB5.99 €7.25 €0.0116 €
CAX21arm48 GB80 GB10.49 €12.69 €0.0203 €
CAX31arm816 GB160 GB20.99 €25.40 €0.0407 €
CAX41arm1632 GB320 GB40.99 €49.60 €0.0795 €
CCX13x8628 GB80 GB42.99 €52.02 €0.0834 €
CCX23x86416 GB160 GB85.99 €104.05 €0.1667 €
CCX33x86832 GB240 GB138.49 €167.57 €0.2685 €
CCX43x861664 GB360 GB275.99 €333.95 €0.5352 €
CCX53x8632128 GB600 GB533.49 €645.52 €1.0346 €
CCX63x8648192 GB960 GB853.49 €1,032.72 €1.6550 €
CPX11x8622 GB40 GB5.49 €6.64 €0.0106 €
CPX02x8611 GB20 GB5.99 €7.25 €0.0116 €
CPX21x8634 GB80 GB9.49 €11.48 €0.0184 €
CPX12x8612 GB40 GB11.49 €13.90 €0.0223 €
CPX31x8648 GB160 GB17.49 €21.16 €0.0339 €
CPX22x8624 GB80 GB19.49 €23.58 €0.0378 €
CPX41x86816 GB240 GB32.49 €39.31 €0.0630 €
CPX32x8648 GB160 GB35.49 €42.94 €0.0688 €
CPX42x86816 GB320 GB69.49 €84.08 €0.1348 €
CPX51x861632 GB360 GB70.99 €85.90 €0.1377 €
CPX52x861224 GB480 GB100.49 €121.59 €0.1948 €
CPX62x861632 GB640 GB129.99 €157.29 €0.2520 €
CX23x8624 GB40 GB5.49 €6.64 €0.0106 €
CX33x8648 GB80 GB8.49 €10.27 €0.0165 €
CX43x86816 GB160 GB15.99 €19.35 €0.0310 €
CX53x861632 GB320 GB29.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.

Sources

  1. DeepInfra, Pricing (2026)
  2. OpenAI, API pricing (2026)
  3. Google, Gemini API pricing (2026)
  4. RunPod, GPU Pricing (2026)
  5. GEICO Tech, When cheaper LLM hosting gets expensive (2026)