Rewrite, refactor or replatform? Compare 3-5 year cost and risk of your legacy system
Answer 14 questions about your system. The calculator compares keeping it as is with three ways to modernize it: total cost over 3–5 years, payback, risk and a recommendation you can check line by line.
Compare my options
Planning ranges, not a quote
The cost bands come from our own article on legacy modernization and are scaled to your system with the assumptions shown below the result. Every assumption can be changed. Exact cost comes from a discovery of the system. This is not legal, tax or accounting advice. YuSMP sells modernization services.
Your system
How the model works
Four options. Retain keeps the system and closes the sharpest risks. Replatform moves it to a modern platform or the cloud with minimal code changes. Refactor improves code and architecture step by step, module by module (the strangler fig approach). Rewrite builds a new system on a modern stack with the same domain model.
One-off cost. We start from the cost bands per strategy in our modernization guide for a mid-market system of 200–500k lines of code, convert them into person-months and price them at a senior engineer rate for the region you pick, from our developer rates data. Size scales effort with economies of scale (exponent 0.85). Few tests, a rare stack, 20+ integrations, missing documentation or strict regulation add effort where they really bite. A budget overrun factor is applied per strategy and scenario.
Running cost. Today’s cost is infrastructure and licences plus the people who maintain the system plus incidents. Kept as is, it grows 3–10% a year; an unsupported platform and rare skills add a premium. After modernization each strategy cuts a share of infrastructure, maintenance and incident cost. Refactor replaces the old system gradually; rewrite runs both systems in parallel for a few months after the switch.
TCO, payback, NPV. We add one-off and running costs month by month over your horizon in three scenarios. Payback is the first month when the option has cost less in total than keeping the system. NPV discounts the difference against retain at the rate you set (10% by default).
Risk and recommendation. Each option starts from a base risk and gains points for what makes it harder in your situation. The recommendation follows fixed rules in a fixed order: retain if modernizing does not pay off and nothing forces a change; replatform if the platform is out of support or you are leaving the data centre and tests are decent; rewrite only if it is at least 15% cheaper than refactoring and its risk stays at 50 or below; refactor otherwise. We re-run the rules with a shorter and longer horizon, all-pessimistic and all-optimistic values and a Western European team, and tell you if the answer changes.
What the numbers are based on
| Source | Used for |
|---|---|
| YuSMP, Legacy system modernization in 2026 (updated 26 Sep 2026) — cost ranges by strategy | One-off cost bands: replatform $100–500k, refactor $200k–1.2M, rewrite $600k–2M+ per system |
| Same guide — AI-assisted modernization | AI tooling cuts one-off effort by 30–40% |
| Same guide — phased approach | Phased ROI in 12–14 months vs 36–48 months for a big-bang rewrite; anchor system size |
| Same guide — proven outcomes | Upper bounds for savings: AWS migrations −66% infrastructure, IBM up to −74% maintenance; the model uses deliberately lower shares |
| YuSMP Developer Rates by Country | Senior engineer rate by region |
What is not included
- Licences for replacement products (SaaS or off-the-shelf software): replace and retire are not modelled yet.
- Organisational change: training, process redesign, new roles.
- Data migration beyond what a typical project of this size includes.
- Taxes, financing cost and accounting treatment (capex vs opex).
- The value of new features you could build after modernization.
FAQ
Rewrite, refactor or replatform: which is cheaper?
It depends on size, state and horizon. Replatforming has the smallest one-off cost and the smallest savings. Refactoring costs more up front but cuts maintenance and incidents and replaces the system gradually, so savings start early. A rewrite has the largest one-off cost and the longest wait for savings. The calculator compares all three with keeping the system as is and gives the verdict from the numbers, not from a template.
How much does legacy modernization cost?
Per system, our modernization guide puts replatforming at $100,000–500,000, refactoring and rearchitecting at $200,000–1.2 million and a rebuild at $600,000–2 million or more. Size, test coverage, integrations and the region of the team move the number within and beyond these bands.
How long does it take?
A replatform takes months, typically 3–8 before the switch. Phased refactoring with the strangler fig approach runs 10–24 months but delivers value along the way; the guide cites a positive ROI in 12–14 months. A big-bang rewrite takes 18–48 months before the switch, and ROI comes after 36–48 months.
What is the strangler fig approach?
You put a facade in front of the old system and replace it piece by piece: each new module takes over a slice of traffic, and the old code for that slice is switched off. The system keeps working throughout, every step can be rolled back, and the riskiest parts can be left for last.
When is a full rewrite justified?
Rarely: fewer than 20% of modernization engagements justify one. It makes sense when the codebase is small enough to rebuild quickly, the stack is dying, there are almost no tests to protect a refactoring and few integrations to rebuild, or when the domain model must change fundamentally. The calculator recommends a rewrite only if it is at least 15% cheaper than refactoring over your horizon and its risk score stays at 50 or below.
Does AI reduce modernization cost?
AI-assisted tooling cuts the effort of the one-off work by 30–40% according to our guide: code analysis, test generation, translation between languages. It does not cut running costs. In the calculator it is off by default; switch it on in the assumptions to see the effect.
How is TCO and payback calculated here?
TCO adds one-off cost (spread over the project), running cost of the old and new system, parallel running and expected downtime cost month by month over your horizon. Payback is the first month when the cumulative cost of an option drops below the cumulative cost of keeping the system. All assumptions are listed with their source and can be changed.
Can YuSMP review my system?
Yes. A free 30-minute architecture review checks your result against what the calculator cannot see. A paid discovery then turns the planning ranges into a phased plan with a risk register and a cost estimate. We sign an NDA on request.
Modernization services and reading
Software modernization
Discovery, phased roadmap and delivery for legacy systems.
AWS migration
Replatforming to AWS with a rollback plan.
Azure migration
Moving .NET and Windows workloads to Azure.
Enterprise software development
Teams that build and run business-critical systems.
.NET development
From .NET Framework to modern .NET.