Local LLM Cost Calculator
Find what running an AI model on your own GPU costs in electricity, the cost per million tokens and whether it beats paying an API.
Rated board power from makers' spec sheets, not checked here. Real draw while writing is often lower; the rest of the PC adds more.
Best measured at the wall with a plug-in power meter.
While it's switched on but not writing.
Not sure? Estimate it with the tokens per second calculator.
Enter your provider's current price. The box starts with an example only.
Time the model is actually producing text.
Includes the writing hours. 24 if it's never off.
Find it on your bill as the unit rate or energy charge.
What the GPU or PC cost you (example to start). 0 if you already own it.
Your provider's current price. Blank = leave input out.
Prompt, chat history and documents you send. Chats are often 2–10.
PUE 1.2 = 20%. Add some if AC removes the heat.
Cost over time: home vs API
Total paid so far, month by month. At home you pay for the hardware on day one, then electricity; the API is paid as you go.
Show the table
| Month | At home | API | Difference |
|---|
How your cost is worked out
Power × time gives energy; energy × your price gives the cost, then we set it beside the API.
- 1
Energy a million
0.3 kW × 5.56 h
= 1.667 kWh - 2
Cost a million
1.667 × $0.15
= $0.25 / M - 3
Your month
0.96 kWh × $0.15
× 30.42 days
= $4.38 - 4
Against the API
10.95M × $10.00
= $109.50
you save $105.12
Read more: the formula, a worked example and notes
Running a model on your own machine costs electricity: the power it draws multiplied by how long it runs. Divide that by the tokens it writes and you get a cost per million tokens you can set beside an API price. In Advanced, the price of the hardware is spread over its life too.
The formula
kWh per million tokens = watts × (1 + overhead) × 1,000,000 ÷ tokens a second ÷ 3,600 ÷ 1,000
cost per million tokens = kWh per million × price per kWh
kWh a day = (watts × hours writing + idle watts × (hours on − hours writing)) ÷ 1,000 × (1 + overhead)
electricity a month = kWh a day × price per kWh × 30.42 days (365 ÷ 12)
tokens a month = tokens a second × 3,600 × hours writing × 30.42
API a month = tokens a month ÷ 1,000,000 × (output price + input tokens per output × input price)
hardware a month = hardware cost ÷ lifetime in months
break-even tokens a month = fixed monthly cost ÷ (API cost per token − extra electricity per token)
pays for itself in = hardware cost ÷ (API a month − electricity a month)
Worked example
A PC drawing 300 W while it writes and 60 W idle, writing 50 tokens a second for 2 hours a day and switched on 8 hours a day, with electricity at 0.15 per kWh and an API at 10 per million output tokens (amounts in any one currency):
- Time for a million tokens: 1,000,000 ÷ 50 = 20,000 seconds = 5.56 hours.
- Energy for a million tokens: 300 × 1,000,000 ÷ 50 ÷ 3,600 ÷ 1,000 = 1.6667 kWh.
- Cost for a million tokens while writing: 1.6667 × 0.15 = 0.25.
- Energy a day: (300 × 2 + 60 × 6) ÷ 1,000 = 0.96 kWh, costing 0.96 × 0.15 = 0.144 a day.
- A month: 0.144 × 365 ÷ 12 = 4.38, or 0.144 × 365 = 52.56 a year.
- Tokens: 50 × 3,600 × 2 = 360,000 a day, × 30.4167 = 10,950,000 a month.
- With idle included: 0.144 ÷ 0.36 million tokens = 0.40 per million.
- The API for the same tokens: 10.95 × 10 = 109.50 a month, so home saves 109.50 − 4.38 = 105.12 a month on running costs.
In Advanced, add hardware costing 2,000 that lasts 3 years: 2,000 ÷ 36 = 55.56 a month, or 55.56 ÷ 10.95 = 5.07 per million tokens. All-in, home costs 4.38 + 55.56 = 59.94 a month (5.47 per million). The fixed part each month is 55.56 + 0.06 kW × 8 h × 30.4167 × 0.15 = 57.75; each token above idle adds 0.24 kW × 0.15 ÷ 180,000 tokens an hour = 0.20 per million, against 10 per million for the API, so break-even is 57.75 ÷ (10 − 0.20) × 1,000,000 ≈ 5.89 million tokens a month. Paid up front, the 2,000 is won back in 2,000 ÷ 105.12 = 19.0 months.
Things that change the answer
- Like for like. Compare with an API model of similar quality. A small local model is often closer to a cheap API model than a top one.
- Reading the prompt (prefill) also takes GPU time. It is usually much faster than writing and is left out of the local cost here; very long prompts make home cost a little more.
- Batches. Serving several chats at once can multiply total tokens a second for little extra power, which cuts the cost per million a lot.
- Resale value of the GPU lowers the true hardware cost; subtract it from the hardware cost if you plan to sell.
- Heat. In winter the heat may replace some heating; in summer AC has to remove it (use the overhead).
GPU power figures are the cards' rated board power from makers' spec sheets, not checked here. Example prices in the boxes are only to start with: enter your own electricity tariff, hardware price and your API provider's current price. Every result is an estimate.
Common questions
How much electricity does running an LLM at home use?
Power while writing × time. A machine drawing 300 W that writes 50 tokens a second needs 1,000,000 ÷ 50 = 20,000 seconds (5.56 hours) for a million tokens, so 0.3 kW × 5.56 h = 1.67 kWh. At 0.15 per kWh that is 0.25 per million output tokens.
Is running a local LLM cheaper than an API?
For electricity alone it often is, because a million tokens may cost well under one unit of your currency. Once you add the price of the GPU or PC spread over its life, a local model only wins if you use it a lot, or if the API you compare with is expensive. The break-even line shows how many tokens a month you need.
What power figure should I use?
The best figure is measured at the wall with a plug-in power meter while the model is writing. A GPU’s rated board power is a ceiling: during text generation many cards draw less, while the rest of the PC (CPU, fans, power supply losses) adds more.
Why does idle power matter?
A PC left on all day draws power even when nobody is asking it anything. If it writes for 2 hours and sits idle for 6, 60 W of idle draw uses as much energy as the 300 W of writing in this example, which raises the true cost per million tokens.
What is PUE or cooling overhead?
Extra energy for cooling and power losses on top of the machine itself. Data centres report it as PUE (1.2 means 20% extra). At home, add some if you run air conditioning to remove the heat.
Related calculators
Made by Zulu Calculator, part of AlphaZulu LLC. Formulas are shown in full and rule figures are checked against official sources; see how we build calculators.