Infrastructure
Self-hosted vs SaaS: a cost comparison you can reproduce
How to compare the real three-year cost of self-hosting and a subscription, including server, backup, time, risk and growth, with a worked example and a template.
By Raktim Ranjit · Published · 3 min read
Short answer: compare total cost over three years, not the monthly price. For self-hosting, add the server, storage, backup, domain, your time valued at a realistic rate, and an allowance for incidents. For SaaS, add seats and usage at your expected growth, price increases and add-ons you will need. Self-hosting usually wins at larger user counts and loses for very small, low-effort uses.
The prices below are placeholders to show the method. Replace them with real quotes. I do not claim these figures represent any specific vendor.
What goes into the self-hosted side?
- Compute: a VPS or your own machine amortised over its life.
- Storage and bandwidth: often included, sometimes not.
- Backup storage: off-site object storage is cheap but not free.
- Domain and DNS.
- Setup time: one-off hours.
- Maintenance time: hours per month, forever.
- Incident allowance: a day or two per year when something goes wrong.
- Tooling: monitoring, mail relay, paid support if any.
What goes into the SaaS side?
- Seats multiplied by price, at today's headcount and at your three-year headcount.
- Usage tiers: records, automations, API calls or storage that push you into the next plan.
- Add-ons you need but are not in the base plan: single sign-on, audit logs, advanced permissions, extra environments.
- Price increases. Assume some.
- Migration cost if you leave later.
A worked example with placeholder numbers
Imagine a team tool, 25 users, three years.
SaaS
25 seats x 800/month x 36 months = 720,000
SSO + audit add-on 5,000/month x 36 = 180,000
Total = 900,000
Self-hosted
VPS 2,500/month x 36 = 90,000
Off-site backup 400/month x 36 = 14,400
Setup 16 h x 1,500/h = 24,000
Maintenance 3 h/month x 1,500/h x 36 = 162,000
Incident allowance 16 h/year x 1,500 x 3 = 72,000
Total = 362,400Under these assumptions self-hosting costs less than half. Now change the assumptions. With 5 users and no add-ons the SaaS total falls to about 144,000, and self-hosting at 362,400 loses clearly. The seat count and the value of your time decide the result.
What does the number miss?
- Reliability. A vendor's uptime and support are worth something. So is a person who knows how your system works, if that person leaves.
- Security. A good vendor patches faster than most small teams.
- Features. The hosted version may get features the self-hosted edition lacks, or the other way round.
- Lock-in and exit. Self-hosted software with open data formats is easier to leave.
- Opportunity cost. Time spent running servers is time not spent on your product.
How do you keep the comparison honest?
- Value your time. If it is free, you are fooling yourself.
- Use your own measurements for maintenance hours after a trial period.
- Ask a vendor for a quote at your three-year size, since list prices often drop with volume.
- Include the cost of a backup failure, in the form of a risk allowance.
The broader question of whether to do it at all is in is self-hosting worth it.
Author
Raktim Ranjit is a software engineer and the founder of NodeDR Infotech. He builds and maintains the software described here.