Heidelberg AICurriculum
Track 16 · Advanced
16.5

Local vs cloud: what it actually costs

The spreadsheet you will be asked for

7 lessons 2026-08-13 AI-generated

1Overview

A total-cost-of-ownership comparison between owning accelerators, renting them by the hour, and paying per token.

The sovereignty chapters answer where your tokens should run and why. Nobody in this course has yet answered whether owning the hardware pays, and that is the question a budget holder asks first. → Capital cost, electricity, depreciation and utilisation on one side; hourly rental and per-token pricing on the other; a break-even point in months that you can defend. → Built on current market numbers, with the depreciation curve that makes second-hand accelerators an option worth naming.

1.2After this chapter you can
Build a break-even model comparing owned hardware against rented GPUs and per-token APIs
Put a number on utilisation, which is what actually decides the outcome
Include electricity, cooling and depreciation instead of only the purchase price
Price the same workload three ways and explain the spread
Say when the answer is "rent", when it is "buy", and when it is "neither, use an API"
Present the result to somebody who does not care about tokens per second
1.3When to reach for it

Before any hardware purchase, and whenever somebody proposes moving off an API to "save money".

1.4Key parts

Purchase price, expected utilisation, power draw and tariff, depreciation over a realistic life, rental rates, and per-token pricing for the same workload.

1.5Free vs paid

The model is free. Its whole purpose is to stop a five-figure decision from being made on vibes.

1.6Watch out

Utilisation dominates everything. A card used 5% of the time loses to rental almost regardless of purchase price, and that is the usual case for a small team.

2Lessons 7

2.1 Calculate the break‑even cost of a GPU

The Effective cost/hr cell computes the hourly expense by combining depreciation, power cost and utilisation hours.

Identify the five inputs for a build‑or‑rent decision and compute its effective hourly cost

  1. Enter the upfront purchase amount in the Capex field
  2. Input the card’s useful‑life months in the Useful‑life cell to calculate monthly depreciation
  3. Record the total hours the card runs this month in the Hours run cell
  4. Add the electricity cost per hour in the Power cost/hr cell
  5. Calculate the effective hourly cost using the formula displayed in the Effective cost/hr cell
  • You'll see A one‑row spreadsheet showing capex, useful‑life months, monthly depreciation, hours run, power cost per hour and the resulting effective cost per hour of use
  • Takeaway Depreciation is fixed each month, so the effective hourly cost depends only on how many hours you actually run the card
  • Check How does changing the number of hours the card runs in a month affect the calculated effective hourly cost?
  • Cost Free — this is arithmetic, not a tool. The cost of skipping it is a card bought on a hunch about utilisation that turns out to be off by 10x, which lesson 2 makes concrete.

2.2 Determine when owning a GPU beats renting

The break‑even utilisation calculation solves for busy hours where owned‑card cost equals the median on‑demand rental price.

Identify the utilisation level at which a purchased H100 becomes cheaper than on‑demand rental.

  1. Calculate monthly depreciation by dividing the midpoint purchase price ($17,000) by 36 months to get $472/month.
  2. Compute effective hourly cost at 5 % utilisation: divide $472 by 36.5 busy hours and round to about $13/hr.
  3. Look up the median on‑demand rental price for an H100 (​$3.41/hr) from the provided source.
  4. Set the owned‑card cost equation ($472 ÷ busy hours ≈ $3.41) and solve for busy hours to find the break‑even utilisation (~150 hours/month).
  5. Compare the three scenarios – 5 %, break‑even (20 %), and 100 % utilisation – against the rental line to visualise cost differences.
  • You'll see A table showing effective hourly cost for a $17,000 H100 at 5 %, 20 % and 100 % utilisation alongside the median $3.41/hr rental rate.
  • Takeaway Ownership only saves money above roughly 150 busy hours per month, regardless of purchase price
  • Check What busy‑hour count determines when owning the H100 becomes cheaper than renting at the median on‑demand rate?
  • Cost Nothing to compute this — it is one division. The cost of skipping it is buying a card sized for peak demand that then sits at 5% utilisation, which is the default outcome for a small team, not the exception.

2.3 Add real operating costs to a hardware purchase model

The power‑plus‑cooling cost per hour combines raw electricity cost with a cooling factor (PUE) to reflect total energy expense.

Calculate electricity, cooling and depreciation expenses for an H100 SXM5 and include them in the spreadsheet

  1. Enter the GPU’s maximum draw 700W into a spreadsheet cell and multiply by the tariff 25.03 ct/kWh to obtain hourly electricity cost
  2. Apply a cooling factor of 1.3 (PUE) to the electricity result to calculate total power‑plus‑cooling cost per hour
  3. Set the depreciation period (e.g., 36 months) and divide the purchase price by this number to get monthly depreciation expense
  4. Add the hourly power‑plus‑cooling cost and the monthly depreciation line to the model for comparison
  • You'll see The sheet shows €0.175 /hr raw power, €0.23 /hr with cooling added, and $472 per month of depreciation
  • Takeaway Operating costs dominate a purchase‑price comparison rather than the sticker price alone
  • Check How is the total power‑plus‑cooling cost per hour derived from the GPU’s wattage, electricity tariff, and PUE factor?
  • Cost Two numbers you have to look up (your tariff, your PUE or a reasonable planning default) and one you have to decide (useful life). None of this needs a spreadsheet more complex than the one in lesson 1.

2.4 Compare three pricing options for a workload

The three pricing options are monthly totals for buying hardware, renting it on‑demand, and using a per‑token API based on the same workload.

Calculate monthly cost of buying, renting, and using a per‑token API for the same usage pattern

  1. Calculate the buy total by adding depreciation ($472) to power for busy hours (70 h × $1 ≈ $16)
  2. Calculate the rent total by multiplying busy hours (70 h) by the median hourly rate ($3.41)
  3. Calculate the per‑token API total by applying input and output rates ($0.10/M input, $0.32/M output) to the estimated token volumes (300 M input, 60 M output)
  • You'll see Three side‑by‑side monthly totals – $488 owned, $239 rented, $49 per‑token – displayed together
  • Takeaway The same modest workload can span roughly a tenfold cost range across buy, rent and per‑token API options
  • Check Which of the three calculated monthly totals—buy, rent, or per‑token API—is lowest for the given 70 hour workload?
  • Cost This costs nothing to build once you have real numbers for your own token volume and your own hours-needed estimate; both replace the illustrative figures used here.

2.5 Decide whether to rent, buy or use an API

The decision diagram branches into rent, buy or API recommendations based on utilisation relative to the break‑even line and model availability.

Turn the break‑even line and the three‑way price spread into a rule that names when each answer applies

  1. Calculate monthly utilisation in busy hours and compare it to the break‑even line (≈150 hours/month).
  2. Assess whether a fine‑tuned, large or data‑residency‑restricted model is required; if so, treat the result as a rent decision when utilisation is below the break‑even line.
  3. Evaluate if utilisation stays reliably above the break‑even line and you can justify the depreciation schedule; if both hold, choose to buy hardware.
  4. Check for an available commodity model with per‑token pricing that undercuts owning hardware; if it exists, select the API option.
  • You'll see A three‑branch decision diagram showing rent below break‑even, buy above it with a defensible depreciation schedule, and use an API when a commodity model is cheaper
  • Takeaway Rent below break‑even utilisation, buy only above it with a schedule you can defend, and default to the API when a commodity model already serves the workload cheaply — which is the common case for a team that has not measured sustained demand yet
  • Check Under what condition does the decision diagram recommend choosing the API option instead of renting or buying?
  • Cost Zero to state the rule. The cost of getting it wrong is the one this whole chapter exists to prevent: a purchase sized for a utilisation nobody measured first.

2.6 Create a one‑page memo for a budget holder

The one‑page memo template includes a recommendation sentence, cost table, usage assumption and loss‑if‑wrong calculation for non‑technical reviewers.

Produce a single page that lets a non‑technical decision maker approve or reject the option without needing to understand technical metrics

  1. Open a new document in your preferred editor
  2. Write the recommendation as the first sentence, e.g., “Renting costs €239/month … Recommendation: rent, revisit in six months.”
  3. Create a small table that lists the monthly cost for each option
  4. Add a sentence that states the break‑even usage assumption in plain terms, such as “The card pays for itself only if it runs about 5 hours per day.”
  5. Calculate and insert the monetary loss if the utilisation assumption is wrong, expressed as an annual figure
  • You'll see A one‑page document with a recommendation line, a small table showing three monthly costs, a plain‑language usage assumption, and the financial impact of a wrong assumption
  • Takeaway Focus on recommendation, a single usage condition, and the cost of being wrong rather than the underlying spreadsheet details
  • Check What single usage assumption is included in the one‑page memo to explain when the GPU “pays for itself”?
  • Cost The cost is entirely in lessons 1–5 already having been done. Writing the page itself is ten minutes once the numbers exist.

2.7 Update cost inputs before re‑running the model

The update procedure gathers current rental €/hr, used‑hardware price, electricity tariff and per‑token API pricing from specified sources.

Refresh all monetary figures used by the chapter’s calculation with current data

  1. Open getdeploying.com and record the current rental €/hr for the required GPU class
  2. Visit a secondary marketplace such as Compute Exchange or Hashrate Index and note the latest used‑hardware price for that card
  3. Check your own electricity contract (e.g., on your provider’s portal) and capture the exact ct/kWh rate you pay
  4. Navigate to OpenRouter (or your chosen API host) and copy the per‑token pricing for the specific model version you will use
  • You'll see The same $17,000‑card, 70‑hour‑a‑month comparison from lesson 4, now using today’s rental price and other live costs
  • Takeaway Only the numbers expire, not the underlying model – always verify rental, hardware, electricity and API prices before trusting the recommendation again
  • Check Which four sources must be consulted to refresh the monetary figures before re‑running the cost model?
  • Cost Ten minutes to re-check four prices before trusting a purchase decision built on this chapter months from now — cheap insurance against a market that moved 114% in six weeks once already, on record, this year.

3FAQ, Tips & How-to 2

one problem, one solution, one action
How-to Everyone

Want to know the hourly cost of running my GPU

The video shows a ready‑made Google Sheet where you input purchase price, electricity rate, system power draw and utilization to get hourly cost. It works because it converts fixed capital expense into an equivalent per‑hour figure using real power consumption data.

Next Tech and AI ↗ Lesson → AI-generated
How-to Everyone

Can’t tell if buying a GPU is cheaper than renting cloud

By comparing the hourly cost from the spreadsheet with cloud provider pricing (per‑hour or per‑token), you can compute how many hours or processed images/videos are needed to recoup the upfront GPU purchase. This gives budget holders a defensible metric.

Next Tech and AI ↗ Lesson → AI-generated

The same set on /recipes, filtered by tool and role.

4See also

💬 Discuss this chapter

Ask, share, or report — over on the Heidelberg AI community forum.