What does it cost to run?

4 min readMarkdown

Electricity for a home machine is cheap per tokenTokenA chunk of text, usually part of a word. Models read and write in tokens.Read more. A machine that writes fast and draws little costs very little per million tokens. The bigger costs are the purchase price and the hours it sits idle.

Watts under load per tier

Power draw rises steeply with each tier. A laptop draws about as much as a desk lamp. An eight-GPU server draws as much as a few electric ovens.

TierTypical draw under loadIdleWhat sets it
Entry laptopTens of wattsA few wattsChip power limit
Strong laptop or MacTens of watts to about 150 WA few wattsChip tier, and whether it is plugged in
Desktop consumer GPU350 to 575 W for the card, plus the rest of the PCTens of wattsGPU board power
Unified-memory workstationAbout 100 to 300 WLowThe box's power supply
Pro GPU workstation600 W to a few kWAbout 100 W or moreNumber of cards
On-prem serverAbout 10 kW for an eight-GPU nodeSeveral hundred watts or moreEight datacenter GPUs

The GPU figures are published board power for the RTX 3090, 4090 and 5090. Real draw during inference is often lower, because decodeDecodeThe phase where the model writes its answer one token at a time. Limited by memory bandwidth.Read more waits on memory rather than running every core flat out. PrefillPrefillThe phase where the model reads your prompt. Limited by compute.Read more and batched serving run closer to the limit.

Measure your own machine. A plug-in power meter at the wall is the most honest figure. Software readings help too.

shell
sudo powermetrics --samplers cpu_power,gpu_power -i 1000
PowerShell
nvidia-smi --query-gpu=power.draw --format=csv -l 1
shell
nvidia-smi --query-gpu=power.draw --format=csv -l 1

These print power once a second while a model runs. The Mac command shows CPU and GPU power. The nvidia-smi line shows the card only, so the whole PC draws more.

Cost per million tokens at home

Three numbers give the electricity cost of a million tokens: the machine's power draw, its speed, and your price per kWh.

hours for 1M tokens  = 1,000,000 / (tokens per second × 3,600)
kWh for 1M tokens    = watts / 1,000 × hours
cost per 1M tokens   = kWh × price per kWh
 
Shortcut:  cost per 1M tokens = watts × price per kWh / (3.6 × tokens per second)

Enter your own figures below. Use the power you measured at the wall and the speed your runtimeRuntimeThe software that loads a model file and runs it.Read more reports on your own prompts.

Hardware share
4.76
Electricity
0.63
Per million tokens
5.38

The API is cheaper at this level of use. More hours per day or a faster model moves the line. Same currency as your inputs.

Speed matters as much as power. A machine that draws twice the power and writes three times faster costs less per token. That is why a fast GPU can be cheaper per token than a frugal laptop.

Rule of thumb

Halve the speed and you double the cost per token. A model too big for your machine is the most expensive way to run it.

The catch

This counts tokens you generate one at a time. A server answering many users at once writes far more tokens per watt, because it batches them. For one person the formula above is right, and What changes when many people use one model? covers teams.

Idle draw adds up. A desktop left on all day draws power whether or not it is writing.

Multiply its idle watts by 24 hours and 30 days for a monthly figure, and compare that with what you spend on tokens. Sleep or power off the machine when you do not need it.

Compared with API prices

Electricity alone almost always beats API prices for a model you can run at home. That comparison hides two costs.

The first is the machine. Divide its price by the tokens you will generate over its working life.

For one person using it a few hours a day, the purchase usually costs far more per token than the power. For a team using it all day, the share drops fast.

The second is quality. A hosted frontier model is not the same product as a local mid-class model. Compare against the API price of a model of similar quality, not the cheapest or the best one.

Home machine

Pay up front, then electricity. Cheap per token if you use it a lot, private and offline. Limited to the models your memory holds.

API

Pay per token, nothing up front. Cheaper if you use it a little, with access to the largest models. Prices change, and your data leaves the building.

API prices change often, so we do not type them here. The What does a million tokens cost me? tool page has the full comparison with every assumption visible, and When is local cheaper than an API? works through break-even for teams and servers. Local or cloud: which should I use? covers the reasons beyond cost.

Try it

Run a long answer on your usual model and note the tokens per second your runtime reports. Read the wall meter at the same time. Put both into the calculator with your electricity price.

Go deeperThat's enough

Why decode draws less than you expect

During decode, the GPU's cores spend most of the time waiting on memory. They draw less than their rated power, and a power cap barely slows them. Prefill and batched serving keep the cores busy and draw close to the limit.

That is why a power limit is a cheap win for one user. How do I build a multi-GPU rig? shows how to set one.

Heat is the same number

Every watt the machine draws ends up as heat in the room. A 1 kW rig is a 1 kW heater. In winter that is a bonus, and in summer you pay again to cool the room, which can add a large share to the real running cost.

What the calculator leaves out

It does not count the machine's price, its resale value, your time maintaining it or the power used by the rest of your network. The What does a million tokens cost me? page lets you add the purchase price and a lifetime, which changes the answer more than electricity does.