Cloud vs. Self-Hosted Cost Calculator
Compares a monthly cloud bill with running the same workload on servers you buy or rent, over one to ten years. Bought servers cost their price up front, then rack space, bandwidth and power each month, with power as servers × watts ÷ 1,000 × 730 hours × PUE × price per kWh. Rented servers cost a monthly rent. Both add operations staff, other running costs and a one-off migration. Break-even is the month self-hosting stays cheaper for good.
Enter what the cloud costs you each month, then describe the servers that would replace it: how many, whether you would buy or rent them, and what it takes to run them. The calculator totals both routes over the years you choose, shows the running totals year by year, and finds the month in which self-hosting pulls ahead for good. The defaults describe a 20,000 monthly cloud bill replaced by eight bought servers over five years; self-hosting comes to 692,536 against 1,200,000, a saving of 507,464, and breaks even in month 12.
What total cost of ownership measures
Total cost of ownership is the habit of counting everything a purchase commits you to, not just its price. The research firm Gartner popularized the idea in the late 1980s as a way of working out what a desktop PC really cost a company once support, training and lost working time were added to the invoice. Its glossary still defines TCO as an assessment of costs across enterprise boundaries over time, taking in for IT the acquisition of hardware and software, management and support, communications, end-user expenses and the opportunity cost of downtime, training and other productivity losses. A cloud bill already bundles most of those costs into one monthly figure. Owning servers unbundles them again, which is why a fair comparison has to rebuild each line on the self-hosted side.
From owned servers to the cloud, and back
For most of computing history, running software meant running machines you owned or leased. Amazon changed the default in August 2006 with the beta of EC2, which rented virtual servers by the hour, and a generation of companies grew up never owning one. The bargain was elastic capacity and no up-front spending, paid for with a higher price per unit of computing, and as some of those companies grew they began running the sum in reverse.
Dropbox was the first large public example. Its 2018 listing prospectus describes an Infrastructure Optimization project that moved the vast majority of user data off third-party providers and onto its own custom-built infrastructure in leased co-location facilities, completed in the fourth quarter of 2016. In 2016 the move cut what Dropbox paid its datacenter provider by $92.5 million, against $53.0 million more in depreciation, facilities and support, a net saving of $39.5 million. In 2017 it saved a further $35.1 million, and gross margin rose from 33% in 2015 to 67% in 2017. In May 2021 Sarah Wang and Martin Casado of Andreessen Horowitz published "The Cost of Cloud, a Trillion Dollar Paradox". They reported that the experts they spoke with had converged on a rule of thumb: running a workload yourself costs one-third to one-half of running it in the cloud.
The most closely documented exit since then is 37signals, the company behind Basecamp and HEY. David Heinemeier Hansson announced in October 2022 that it was leaving the cloud, and in February 2023 he put numbers on it: $3.2 million of cloud spending in 2022, around $600,000 of new servers amortized over five years, and an expected saving of about $7 million over five years. In October 2024 he reported the annual cloud bill down to $1.3 million, all of it S3 storage. The servers had come to about $700,000, the team running them had not grown, and the projected saving had risen to well over $10 million over five years.
How the comparison is calculated
The cloud side is your monthly bill multiplied by the months in the period. The self-hosted side splits into what you pay once, up front, and what you pay every month:
cloud = bill × 12 × years
self-hosted = up front + running costs × 12 × years
Bought servers put their purchase price and the migration up front, while rack space, power, bandwidth, staff and other costs run monthly. Power is the line most estimates get wrong, because a server's draw has to be turned into energy and the building's overhead added on top:
power = servers × watts ÷ 1000 × 730 × PUE × price per kWh
The 730 is the hours in an average month, 8,760 hours in a 365-day year divided by twelve, the same convention the AWS Pricing Calculator uses. PUE, power usage effectiveness, is the power a whole facility draws divided by the power that reaches its IT equipment. The Green Grid, an industry consortium, published it in 2007. The floor is exactly 1.0, a building whose cooling, lighting and power conversion cost nothing. Uptime Institute's 2025 global survey found an average of 1.54, with little change for the sixth year running, while Google reports 1.09 across its own fleet. If your colocation contract prices power per kilowatt with cooling built in, enter that rate and set PUE to 1.
Staff is the number of extra full-time people self-hosting needs, times what each costs a year with benefits and overheads, divided by twelve. Break-even is the month in which the self-hosted running total drops to the cloud's or below and stays there. With steady costs it lands at:
break-even month = up front ÷ (bill − running costs), rounded up
The period doubles as the life of the hardware. Servers are bought on the first day and retired on the last with no resale value, so set it to how long you would really run them. 37signals planned on five years, and expects its new servers to last five to seven.
The default example, worked through
Eight servers at 12,000 each come to 96,000, and with 25,000 for the migration, 121,000 goes out before the first month. Their draw of 400 W each is 3.2 kW, which over 730 hours is 2,336 kWh. A PUE of 1.5 lifts that to 3,504 kWh, or 525.60 a month at 0.15 per kWh. Add 1,500 for rack space, 500 for bandwidth, 6,250 for half an engineer costing 150,000 a year and 750 of other costs, and self-hosting runs at 9,525.60 a month against a cloud bill of 20,000.
Each month saves 10,474.40, so the 121,000 up front is recovered after 11.6 months. By the end of month 12, self-hosting has cost 235,307 against the cloud's 240,000. Over five years the totals are 692,536 and 1,200,000, a saving of 507,464, and self-hosting works out at 11,542.27 a month all in. Staff is the largest single line at 375,000, more than the servers, the rack space and the power put together.
Renting bare metal instead
Switch to rented servers and the up-front column shrinks to the migration alone. Dedicated-server providers rent whole physical machines by the month, usually with power, cooling and network transit in the price, and replace failed parts themselves. At 500 a server, the eight servers cost 4,000 a month, running costs come to 11,000, and self-hosting breaks even in month 3. The five-year total is 685,000, which is 7,536 less than buying.
The balance tips as the rack fills. At sixteen servers, buying comes to 820,072 over five years and renting to 925,000. One rack fee and one bandwidth contract are spread over twice as many machines, while every rented server adds its full rent.
What the comparison leaves out
The model is deliberately flat. The cloud bill and every running cost stay the same each month, so growth, price changes and committed-use discounts have to be folded into the figures you enter. Nothing is discounted for the time value of money either; doing so would tilt the result towards the cloud, whose spending comes later.
Owned servers must be sized for peak load plus spare capacity, often across a second site for disaster recovery, while a cloud bill can shrink when traffic does. Enter the whole fleet you would actually run. Hardware has no resale value at the end of the period, and taxes, depreciation schedules and financing sit outside the model. Anything you would keep in the cloud after moving, such as object storage, a CDN or email, belongs under other running costs, as 37signals' remaining S3 bill would. Totals are rounded to whole units and compared as shown, so a difference of less than one unit reads as a tie.
These figures are planning estimates built from the costs you enter, not quotes or financial advice; real bills depend on contracts, usage and prices that change over time. See the site disclaimer.
Frequently asked questions
Is self-hosting cheaper than the cloud?
Often for steady workloads at scale, rarely for small ones. At the defaults, a 20,000 monthly bill against eight bought servers, self-hosting costs 692,536 over five years against 1,200,000, a saving of 507,464. Cut the bill to 5,000 a month and the staff line alone, 375,000 over five years, is more than the whole cloud bill of 300,000.
How long does it take for buying servers to pay off?
Divide what you spend up front by what self-hosting saves each month. With the defaults, 121,000 for the servers and the migration against 10,474.40 a month saved, a 20,000 cloud bill less 9,525.60 of running costs, gives 11.6 months, so self-hosting breaks even in month 12. If the running costs alone exceed the cloud bill, it never pays back.
What PUE should I use?
Your facility's own figure, if you can get it. Uptime Institute's 2025 survey put the global average at 1.54, Google reports 1.09 across its fleet, and the floor is 1.0. If your colocation contract charges a per-kilowatt rate that already covers cooling, enter that rate and set PUE to 1. At the defaults, every 0.1 of PUE adds 35.04 a month.
How much did 37signals save by leaving the cloud?
In October 2024 David Heinemeier Hansson reported that its annual cloud bill had fallen from $3.2 million to $1.3 million, all of the remainder being S3 storage. The servers that replaced the rest cost about $700,000, the team running them did not grow, and he projected savings of well over $10 million over five years.
Should I rent bare-metal servers or buy my own?
Renting avoids the up-front spend and the hardware chores, while buying wins as more servers share the same rack and network costs. At the defaults, renting eight servers at 500 each costs 685,000 over five years against 692,536 to buy, and breaks even in month 3 instead of month 12. At sixteen servers, buying comes to 820,072 and renting to 925,000.
Sources
- Dropbox, Inc. Form S-1 Registration Statement, U.S. Securities and Exchange Commission, 2018
- The Cost of Cloud, a Trillion Dollar Paradox, Andreessen Horowitz, 2021
- We stand to save $7m over five years from our cloud exit, David Heinemeier Hansson, HEY World, 2023
- Our cloud-exit savings will now top ten million over five years, David Heinemeier Hansson, HEY World, 2024
- Pricing assumptions (AWS Pricing Calculator), Amazon Web Services
- Power usage effectiveness, Google Data Centers
- Uptime Institute Global Data Center Survey 2025, Uptime Institute, 2025