Rewrite vs refactor frontend is a counterintuitive choice: throwing engineering headcount at a rewrite often increases time-to-market and churn, not velocity. The primary decision should be economic and operational, not architectural theater.
A 5-engineer product team in the U.S. carries roughly $900k–$1.1M/yr fully loaded ($180k–$220k per engineer). Frontend rewrites that pull 4–8 engineers off roadmap for 6–12 months therefore consume $600k–$2.0M in salary alone. Product-impact numbers matter: a 100ms improvement in Time to Interactive (TTI) typically moves conversion by ~0.5–1.5%, which for a $5M ARR product is worth $25k–$75k/yr in run-rate — not enough to justify a rewrite by itself.
Direct answer: choose a rewrite only when a rewrite's one-time cost (typically $1.0M–$2.5M for a mid-market product) is smaller than the present value of three years of constrained velocity, operational drag, and third-party license costs. If the architectural problem can be removed by targeted changes that cost under ~$600k and restore at least 40–60% of lost velocity within 12–18 months, prefer incremental refactor or strangler patterns.
When to choose rewrite vs refactor frontend
Start with the spend math. A big-bang rewrite that needs 6 engineers for 9 months costs 6 × $200k × 0.75 = $900k in loaded salaries. Add QA/devops and third-party licenses and plan for $1.1M–$1.6M one-time. The three-year TCO including lost feature velocity and ramp is commonly $1.2M–$2.5M for mid-market products.
An incremental refactor using two engineers at 50% allocation for 18 months is roughly 1 FTE for 1.5 years → $300k in loaded cost. Add $50k–$150k in testing, observability, and temporary tech debt interest and your three-year TCO is $350k–$600k. That is a 3–6× cost gap versus a large rewrite.
Cost alone isn't the full criterion. Consider three operational thresholds: developer velocity, security/compliance, and product impossibility. If your frontend stack prevents necessary integrations (payment providers, SSO, or accessibility hooks) and those blockers cost >30% of roadmap value for 12+ months, rewrite becomes defensible. If the problem is mostly maintainability or spiky bugs, refactor wins.
Risk profiles diverge. Empirically, big-bang rewrites carry higher rollout failure risk and longer user-facing regressions: expect a 10–20% probability of a major incident during cutover and a 3–6 month hit to new feature velocity post-launch. Incremental migrations using the strangler pattern have a 3–8% major-incident risk per release and preserve continuous delivery.
Technical indicators you can measure in 30 days: mean time to change (MTTC), pull-request cycle time, and hotfix frequency. If MTTC is >7 days, PR cycle >72 hours, and hotfixes exceed 4/month, you have empirical evidence that architecture is a blocker. Translate those metrics into roadmap dollars — e.g., each lost sprint for a 5-engineer team costs ~($200k/yr)/26 ≈ $7.7k per sprint per engineer.
Only rewrite when the one-time cost plus rollout risk is smaller than three years of lost velocity and operational drag — otherwise use an incremental strangler and surgical refactor.



