Strategy & Transformation
How to Calculate ROI for AI and Software Modernization
A practical, finance-ready framework for comparing AI and modernization investment with the current-state cost, realistic benefits, delivery risk and time to value.
operationalwrocław--:-- cet
∕ insights / how-to-modernize-legacy-applications.md
Legacy Modernization
Learn how to modernize legacy applications in six clear steps, from assessment and architecture to rollout and measurable results.
>_article.meta

Every modernization pitch you'll hear this quarter says the same thing. Rewrite it from scratch. Lift it to the cloud. Let AI translate the code. That advice is why so many programs stall two years in, with the old system still running production and the new one sitting in a staging environment nobody trusts.
The constraint isn't code. It's the business rules buried in that code that no requirements document ever captured, and the absence of evidence that the replacement preserves them. Skip that part and you're funding a very expensive translation exercise with an unknown failure mode.
Here's the sequence I'd run instead, whether you're modernizing a billing engine, a logistics platform or a twenty-year-old internal tool. Small slices, stable interfaces, and an evidence gate before every cutover. That's how you modernize legacy applications without betting the quarter on one enormous release.
Every release on an aging application costs more than it should. The code resists change, testing is manual, and budget meant for new products goes to keeping the lights on. Treat that as a delivery-capacity problem first and a cloud problem second.
Technology leaders already rank it that way. Technical debt reduction and legacy upgrades now outpoll cloud migration as an IT priority, and IBM's account of its own "client zero" path to application modernization shows a large organization applying the sequence to itself before selling it. Modernization comes first. Moving workloads without it just relocates the problem.
Some of these systems are very old. A 2019 review of the U.S. federal government's ten legacy systems most in need of modernization found they ranged from 8 to 51 years old, per Federal News Network's summary of the report. Decades of policy changes, data structures and workarounds live inside them, and most of it was never written down.
The goal also goes beyond a newer stack on paper. In 2024, 68% of respondents defined application modernization as improving continuous integration and continuous delivery pipelines, according to Konveyor's State of Application Modernization Report. Ship change faster and safer. That is the target.
Here's the roadmap, with the output each phase owes you and the evidence that has to exist before you move on.
| Phase | Main Output | Exit Gate |
|---|---|---|
| 1. Assess | Inventory of applications, dependencies and risks | Named owner for every critical business workflow |
| 2. Choose architecture | Retain, rehost, refactor, replatform, rebuild or replace decision per component | Architecture review signed off by a named architect |
| 3. Plan slices | Ordered migration backlog with rollback steps | Each slice has a measurable business outcome |
| 4. Implement | Modern components behind stable APIs | Characterization and contract tests pass |
| 5. Test and verify | Reconciliation and security evidence | Old and new outputs match within the agreed tolerance |
| 6. Roll out and measure | Controlled cutover and baseline comparison | Lead time, change failure rate and recovery time match or beat the baseline |
Two rules govern the sequence. First, each phase ends at an evidence gate, not a date on a slide. The named owner, the signed architecture review, the passing contract tests: that proof is what makes the next phase safe to start. Second, the risk concentrates where business rules were never documented, so phases one and three exist to surface those rules before a cutover depends on them. Skip either and phase five becomes the place you discover what the old system did.
Teams that jump to phase four because it feels like progress usually return to phase one six months later, with less budget and less credibility.
Before you spend anything, answer three questions. Which application hurts the business most right now. Who owns its business rules today, by name. What a failed release would cost this quarter, in money and in customers.
For a second view on how infrastructure and platform choices slot into this sequence, F1Group's legacy modernisation guide covers the same decisions from the environment side. Read it after you've scored your own estate, not before.
The assessment is one page, and it becomes the decision document for every phase after it. Not a 90-slide deck. One page with a ranked component list, the top three risks, the named owners and your baseline numbers.

Six steps, in this order.
This step pays for itself. An IBM analysis of brownfield modernization estimates that an initial assessment can cut effective scope by approximately 30% by removing dead code, exposing redundant components and isolating business-critical logic, and it warns that neglected technical debt can reduce expected returns by 18% to 29% while adding 15% to 22% to delivery timelines, per IBM's guidance on reimagining brownfield modernization.
Record these numbers before you touch anything, then check them again after each slice.
| Metric | What It Tells You | When to Check |
|---|---|---|
| Deployment frequency | How often valuable changes reach production | Before and after each slice |
| Lead time for changes | Time from code commit to running in production | Before and after each slice |
| Change failure rate | Share of releases that need a fix or rollback | Every release |
| Time to recover | How fast service is restored after an incident | Every incident |
| Defect escape rate | Bugs found by users rather than by tests | Monthly |
Watch for the four warning signs that predict trouble: no automated tests, one engineer who holds the knowledge, undocumented batch jobs, and integrations that fail without notice. Any of those turns a two-week slice into a six-month archaeology project.
Our assessment work produces exactly this page. It establishes the current architecture, data, integrations, risk and business objective, then we recommend what to retain, refactor, rebuild or replace. No architecture opinions before the evidence exists.
Most modernization risk hides in rules nobody wrote down. Find them before you change anything, because they won't show up in a code review.
Start with production evidence. Pull logs, transaction records and batch schedules for each critical workflow and note what the system does, including the edge cases: partial refunds, retry storms, month-end adjustments, the customer who gets billed differently because of a contract signed in 2011. Then read the code that's hard to explain. Database procedures, scheduled jobs, interface mappings and error handlers are where workarounds live, and they're where the pricing logic usually sits.
Then sit with the people who run the process. Ask three questions. What happens when the system is wrong. Which exceptions do you handle by hand every week. Which reports does finance trust.
Write every rule into a rule register with four columns: the rule in plain language, the source where it was found, the business owner who confirms it, and the test that will prove the new system keeps it. Mark each one as confirmed, disputed or unknown. Unknown rules block any slice that depends on them until a named person decides.
The risks are greater than they appear. The U.S. Government Accountability Office reviewed 69 federal legacy systems and found that seven of the 11 systems most in need of modernization had known cybersecurity vulnerabilities, per the GAO's report on legacy IT modernization. Old systems don't just hide business logic. They hide exposure.
Expect the register to grow through the programme. Treat every production incident as a new rule discovery, and add it that day. A rule with no owner is a risk item in the assessment, never a footnote.
The default rule is simple. Don't replace what you can safely refactor or strangle, and don't keep what costs you money for no benefit. Most estates have components in both categories, and the decision belongs to each one separately.
Cost pressure makes this urgent. In 2025, 71% of state and local government IT decision makers said the cost of modernizing legacy systems was prohibitively high, according to EY's Government State and Local 2025 survey. That number is a planning failure as much as a funding one. Estates get modernized component by component, not in one appropriation.
Two traps account for most wasted money. The first is rehosting and calling it modernization: the old design moves to the cloud intact, along with its coupling and its cost profile. The second is rewriting a component whose rules nobody has documented, which is how teams lose behavior that customers notice within a week.
The honest comparison looks like this.
| Option | Best When | Main Risk | Typical Business Gain |
|---|---|---|---|
| Retire | Feature is unused or duplicated | Hidden users still depend on it | Lower run cost and smaller attack surface |
| Retain | Stable component with low change and low risk | Ages further without vendor support | Avoids spend on low-value work |
| Rehost | Priority is leaving current infrastructure quickly | Old design moves to the cloud unchanged | Faster infrastructure exit |
| Replatform | Runtime is unsupported but business logic is sound | Hidden coupling to the old platform | Supported runtime with lower hosting effort |
| Refactor | Logic is valuable but structure slows every change | Slow progress without automated tests | Shorter change lead time |
| Replace | Business rules are documented and the component cannot be fixed | Undocumented behavior gets lost | New capability and modern integrations |
For a broader comparison of the strategies and how they combine across a portfolio, Cloudvara's legacy system modernization guide is a useful cross-check while you're scoring components.
On a mixed estate, most applications end up with several answers at once: retain the stable ledger, replatform the unsupported runtime, refactor the pricing engine, replace the reporting tool nobody defends. Each decision needs the scores from your assessment and a named architect's approval, written down. If nobody signs, you get a committee, and committees keep legacy systems alive for another five years.
A big-bang rewrite concentrates every dependency, every undocumented rule and every integration into a single cutover. If any of it breaks, the business finds out at the same moment, in production, with no fallback.

The alternative is straightforward and unglamorous. Put a stable interface in front of the legacy system, then move one bounded capability at a time behind it. Users keep working while the platform changes underneath them, and you can stop at any point with a functioning product. We use this pattern because it survives contact with real estates, and you can read the mechanics in our guide to the strangler fig pattern.
Planning discipline is what separates a controlled programme from an expensive wandering. Among 11 federal legacy systems most in need of modernization, only three had fully documented modernization plans, six had partial plans and two had none, per the GAO's 2025 legacy modernization report, which also notes that extending the life of one such system could cost at least $26.5 million.
Pick your first slice against three tests: clear business value, contained dependencies, and a team that understands the workflow.
Every slice then passes an exit gate before cutover. No exceptions, no verbal approvals.
Larger estates run as consecutive, independently valuable releases. The 45-day window we work to is not a promise to rebuild every legacy system, dependency and migration in one go, and treating it that way is how programmes break. RITE NRG migrated a UK telematics platform built in 2009 from unsupported .NET Framework 4.5 to .NET Core 6.0 on Azure while keeping more than 10,000 active B2B users live throughout. No big bang, no maintenance window for the customer base.
Three mistakes to avoid: migrating the lowest-value code first because it's easy, confusing test coverage with behavioral coverage, and running old and new paths in parallel with no end date. Set a decommission date for every legacy path before its slice starts and record it in the backlog. A parallel path with no end date isn't a safety net, it's a second system to run.
Here's the rollout discipline in practice, including how the gates work when the pressure is on.
Prove the new system matches the old one before anyone releases it. That sentence is the whole section, and most stalled rewrites failed because nobody could answer it with evidence.
Turn the rule register into characterization and contract tests, so the new code reproduces known inputs and outputs before any internals change. Run differential tests that compare old and new outputs side by side, and reconcile data for an agreed window. Write the tolerance down in advance, because a tolerance negotiated during an incident is not a tolerance, it's a concession.

Where AI helps is effort reduction: documentation, dependency extraction, test generation, code classification. MITRE's 2025 work on legacy modernization found that large language models show promise for accelerating modernization but still require appropriate human intervention and oversight, per MITRE's legacy IT modernization research. Hold that line for database redesign, authorization changes, financial calculations and production cutover.
Don't take the productivity claims on faith either. Google's 2024 DORA research found that a 25% increase in AI adoption was associated with a 7.5% improvement in documentation quality, a 3.4% improvement in code quality and a 3.1% increase in code-review speed, but also an estimated 1.5% reduction in delivery throughput and a 7.2% reduction in delivery stability, per the 2024 DORA report. Generated code compiles. That's the lowest bar there is.
Governance is the answer, and it's operational, not ceremonial. The NIST AI Risk Management Framework treats AI risk as a discipline of governance, measurement and documented evaluation, with a Measure function that explicitly covers evaluating and documenting AI system security and resilience. In practice that means traceable prompts and outputs, static and dynamic analysis, and an audit record for every AI-assisted change.
Our non-negotiable: every change passes architecture review by a named architect, automated tests, a security review, observability, and a documented runbook and decision record. When AI accelerates implementation, senior engineers stay accountable for data, security, integration and production quality.
For rollout, send a small share of users to the new path first, watch the dashboards through the whole window, and write rollback criteria before cutover rather than during an incident. Data reconciliation is the part teams underestimate most, and getting the data migration architecture right is usually what decides whether a cutover holds.
Sign this before each release: tests green, reconciliation within tolerance, security sign-off, rollback rehearsed, runbook updated, named approver. Six lines. If any one is missing, you don't ship.
Measure against the baseline you recorded in the assessment. Not against code volume, not against story points, not against how impressive the new architecture diagram looks in a board deck.
Read the five measures together, because singly they lie. Rising deployment frequency with a falling change failure rate means the platform is getting faster and safer at once. More code shipped alongside more incidents means delivery hasn't improved, however much was rewritten. Faster recovery plus stable throughput means the team can absorb change, which is the actual product of modernization.
The DORA research earns its place here. Its programme examines the pathways linking ways of working and software delivery performance to organizational goals, and its published findings identify user-centricity as associated with 40% higher performance, with a research base covering insights from more than 40,000 professionals, per DORA's research. That's a useful challenge to anyone arguing for a rewrite on technical grounds alone.
Handover is part of delivery, not the paperwork at the end. The RiteWay approach treats understandable code, documentation, deployment assets and knowledge transfer as deliverables in the same sense as working software. Practically, the receiving team needs the source repository, architecture and decision records, test evidence, a deployment and operating runbook, an access and responsibility map, technical and user documentation, monitoring and observability, and knowledge-transfer sessions with the people who built it.
Keep the runbook and architecture records current after launch. A runbook that describes last quarter's platform is worse than none, because it builds false confidence during an incident.
Then ask the retirement question for every legacy component. Is the old path switched off, and is its data archived? A modernized system running beside a live legacy twin has doubled your operational surface, not halved it.
Done means three things. The old path is gone. The measures hold for a full quarter. The team can run the platform without the people who built it.
When those three are true, you've delivered capacity, not a project. One example of how that plays out over time is unlocking value with agile delivery in a legacy environment, where the constraint was never the technology alone.
Start with one application, not the whole estate. Name the system causing the most pain and the business workflow it supports. Name the person who owns that workflow and the engineer who knows its code best. If nobody on your team fits that second description, a staffing partner such as Hire Latin American Developers can add senior capacity before the assessment starts. Then run the assessment and the business-rule discovery, and record the baseline so the first slice has numbers to beat.
Pick one slice where the business value is clearest and the risk is contained. Write its exit gate before anyone opens an editor: architecture review by a named architect, automated tests, a security review, observability, and a documented runbook and decision record. Write the rollback procedure next to it. A slice without a way back is a bet on production, and bets have no place in a release pipeline.
AI speeds up analysis, documentation and testing, and it changes the economics of delivery. Accountability stays with senior engineers, who remain responsible for data, security, integration and production quality. We take ownership of the complete result, and every release has to clear the same gate.
If you want a second opinion before you commit budget, book a free 30-minute scoping call with RITE NRG. Tell us what you are trying to modernize, automate, staff or operate. We will say what should be modernized, integrated or left alone, whether the engagement is the right fit, and how comparable work was delivered.
Leave this quarter with one slice, one owner and one date for the first review.
Rite NRG helps companies modernize legacy applications without a big-bang rewrite, using evidence gates, named architecture ownership and senior engineers who stay accountable through production. If your release cycle is slower than your market, we'll map your estate, pick the first slice and put a measurable outcome against it. Visit Rite NRG to start the conversation.
/ about the author
Written by the RITE NRG editorial team — the architects, engineers and delivery leads who build and operate AI-era software for our clients.
Strategy & Transformation
A practical, finance-ready framework for comparing AI and modernization investment with the current-state cost, realistic benefits, delivery risk and time to value.
Technology Talent & Teams
A decision-maker's guide to IT partnership models: what each model actually transfers to the partner, what it costs beyond the rate card, and how to match the model to your situation.
AI Consulting & Automation
A practical framework for choosing and deploying transport or logistics AI agents around real exceptions, reliable data and controlled operational authority.
More guidance: all insights articles
Tell us about the system or idea behind this article. We tell you honestly if it is a fit — and what a fixed-scope delivery could look like.