When does SaaS stop making sense? A napkin math case study: HR Portals
In the age of AI and large language models (LLMs), more and more of software development is being automated. I want to know when, if ever, buying Software as a Service (SaaS), i.e. renting software instead of building, stops making sense. Instead of speculating, I will present my napkin math in this blog post for one vertical: Human Resources (HR) portal for a mid-sized company.
Disclaimer: I have never built an HR product. My experience is second-hand: being an employee using the portals, and a manager trying to get people onboarded, paid, and unblocked. I chose this because:
- Every company with employees needs something like this
- A lot of the surface area looks like forms over data (simple-ish)
- Underneath, there is real complexity around payroll, tax, and compliance.
HR looks easy on the surface, but the underlying complexity is what makes it an honest test case.
TL;DR
I define an AI productivity multiplier (A, equal to 1 pre-AI and larger than 1 since). Using the HR portal and the fictitious company, I estimate the cost of buying a SaaS solution vs. building and maintaining in-house. Based on the napkin math, building only beats once A is around 5.5 - 7, depending on whether you care about a 3 or 5 year horizon. Then, I estimate the trend of A and predict that starting in 2031, building in-house will be a serious alternative to buying SaaS.
The jobs to be done
Any company needs its HR stack to do four jobs well.
Job 1: Pay people correctly and stay out of trouble
- Run payroll on time with the right numbers.
- Withhold/file taxes and year-end forms in the right places.
- Keep a paper trail you can show to an auditor.
Job 2: Handle the employee lifecycle without chaos
- Get new hires signed, cleared, and into the tools they need.
- Keep role and comp changes approved and in sync with payroll.
- Turn access off and pay people out correctly when they leave.
Job 3: Let employees self-serve so HR can scale
- Let people see paystubs, tax forms, benefits, PTO.
- Let them update basic info without opening a ticket.
- Keep simple “how do I…?” questions out of HR’s inbox.
Job 4: Give leadership a reliable view of headcount and cost
- Show who works here, where they are, and which team they’re on.
- Show payroll/benefits cost by department or region.
- Show who changed what, when, and who approved it.
Napkin math fever dream: Redwood Analytics
Let’s imagine a company named Redwood Analytics:
- Type: B2B SaaS (so meta)
- Location: US only, employees in multiple states
- Headcount: 180 employees
- Goals:
- Stay compliant and pay people correctly.
- Make onboarding and self-service not terrible.
- Run HR with about 1–2 HR ops people.
- Give finance and leadership solid data.
Now we’ll look at two paths: buy vs. build. For build, we’ll explore a hybrid path where the team builds the portal on top of infra APIs and pays for the APIs.
Here, I introduce a parameter named A as AI leverage. This is a magic number that tells us how fast AI makes software development compared to the fully manual way (A=1). For example, if A=5, a 50 hour job takes 50/5 = 10 hours with AI assistance.
Universe 1: Buy
In this universe, Redwood signs a contract with a mid-market HR suite. The suite includes:
- Payroll engine and tax filings.
- Compliance updates for US federal and state rules.
- Employee self-service portal.
- Onboarding and offboarding flows.
- Integrations to identity providers and accounting.
With estimating internal cost $10K / year as people time and overhead, the bill is:
- Year 1: $67K ($10K implementation fee + $22 per employee per month x 12 x 180 + $10K internal cost)
- Year 2 and beyond: $57K
Universe 2: Build (on APIs)
In this universe, Redwood builds a portal and workflow layer on top of some APIs. The API backbone includes payroll and tax (calculations, tax rules, generating paystubs, forms), employment data and integrations, background checks and identity, signatures, auth and access.
On top of these APIs, Redwood builds:
- A web portal for employees and managers.
- A workflow engine for its own approval flows.
- A bit of glue code that calls the APIs in the right order.
- An internal reporting layer.
- An AI assistant that answers “how do I …” questions inside the portal.
We can categorize the cost into three: Infrastructure costs for API and hosting, software development and maintenance, and risk & compliance overhead.
Overall, this costs:
- Year 1: $(26 + 370/A) K
-
Year 2 and beyond: $(26 + 66/A) K
- Infra costs (API and hosting) ($26K per year):
- $24K per year for API ($9 per employee per month x 180 x 12 + $5k base fee)
- $2K per year for infra
- Software development and maintenance
- Build v1: 4 months of a 5-person team with no AI ->
3200/Ahours - Maintenance in year 1: 1 FTE for 8 months ->
40/Ahours per month - Hourly loaded cost per employee: $100
- So dev and maintenance cost
- for year 1 =
(3200 + 40 * 8)/A * 100 = $352K / A - for year 2 and beyond =
(40 * 12)/A * 100 = $48K / A
- for year 1 =
- Build v1: 4 months of a 5-person team with no AI ->
- Risk and compliance overhead:
$18K / Aper year- ~0.05 FTE of an engineer to keep an eye on auth, roles, logs, and basic hardening
- ~0.05 FTE of an HR / ops person doing access reviews, policy updates, simple audits, incident follow-ups
0.1 * 180K = 18Kper year with no AI leverage
Different AI leverage universes

The plot above shows the cumulative cost of this software to Redwood in different universes of A.
- If we assume Redwood cares about a 3-year horizon, the break-even magic number is ~6.8
- If we assume Redwood cares about a 5-year horizon, the break-even magic number is ~5.5.
But what is A? A simple model
So far I’ve been treating A as a magic knob: “AI makes development A times faster than doing everything by hand.” We need at least a rough model for how A behaves over time.
Two data points come from Anthropic’s internal study, How AI is transforming work at Anthropic:
- Pre-LLM era (say 2022 and before): call this
A = 1. - 2024: engineers report being about 20% faster →
A_2024 ≈ 1.2. - 2025: they report about 50% faster →
A_2025 ≈ 1.5.
So between 2024 and 2025, the effective multiplier went from 1.2 to 1.5. That’s a 1.5 / 1.2 = 1.25× gain in one year.
Now bring in METR’s study, Measuring AI’s ability to complete long tasks. Their TL;DR:
The “task time horizon” (how long a task the model can complete with ~50% success) has been doubling about every 7 months since 2019.
Call:
d ≈ 12 / 7 ≈ 1.7(horizon doublings per year)k= productivity gain per doubling, at the whole-pipeline level
Assume each horizon doubling multiplies productivity by (1 + k):
- per doubling:
A -> A * (1 + k)
Over one year (about d doublings), we should have:
A_2025 = A_2024 * (1 + k)^d
Plugging numbers in, we get k=0.14. In other words, each horizon doubling buys you roughly a 14% productivity bump on the whole pipeline.
From here, the napkin model for any year t is:
- Let
tbe the calendar year (2024, 2025, …). - Let
D(t) = d * (t - 2024)be the number of horizon doublings since 2024. - Then:
A(t) = A_2024 * (1 + k)^(D(t))A(t) = 1.2 * (1.14)^(1.7 * (t - 2024))
The graph looks like this:

It basically says the 5-year horizon will break even between 2030-2031, and 3-year horizon will break-even sometime between 2031-2032. So, SaaS is still alive, at least for another 7-10 years!
Conclusion
My hunch is that A ≈ 1.5 is already an underestimate for boring glue work like wiring forms to APIs and pushing data into a database, but an overestimate for the human parts of this problem: context switching, coordination, payroll screwups, and insurance headaches. Obviously, not every company should be building their own HR portal; if you’re still trying to survive, you don’t even know if you have a 3–5 year horizon, so “buy” will keep winning by default. Where this gets interesting is for companies that are more stable and for systems that sit closer to their value prop: as A drifts into the mid–single digits over the next 5-10 years, more of those internal SaaS-shaped problems quietly flip from “obviously rent” to “actually worth owning,”.
Caveats (obvious holes in this napkin math)
- Anthropic is an upper bound of the universe. Their
Ais probably ahead of the median team; most companies will lag by a few years in both tooling and adoption. - The “buy” line isn’t really flat. Vendors also get AI leverage. They can ship more product at the same price, or drop price, or both. I’m holding their cost/price constant to keep the picture simple.
- I’m treating
Aas uniform. I assume the same multiplier applies to initial build, maintenance, and risk/compliance. In reality, some of those tasks may be much less automatable. - No discounting or cost of capital. I’m ignoring time value of money and risk-adjusted returns. A proper finance person would discount future cash flows instead of just drawing straight lines.
- This is US-only HR. International payroll and compliance probably get much gnarlier. That usually pushes you harder toward buying, or at least toward heavier infra APIs.