Every team eventually reaches the point where the existing system feels like the problem. Features take longer than they should, small changes cause unrelated breakages, and onboarding a new developer takes weeks. The instinct is to start again.
A rewrite is occasionally the right call, but it is rarely the cheap one. You are committing to rebuilding years of accumulated business rules, most of which are undocumented and only visible in the code you are about to delete.
**Refactor when the domain model still fits**
If the core concepts in the system still match how the business thinks, the problem is usually structural rather than fundamental. Extract the tangled parts behind clear interfaces, add tests around the behaviour you cannot afford to break, and improve incrementally while continuing to ship.
**Rewrite when the foundation genuinely cannot carry the load**
A rewrite starts to make sense when the platform is unsupported, the data model actively fights the current business, or the technology choice blocks something the company must do. Even then, prefer strangling the old system module by module over a single dramatic switchover.
**Make the decision with numbers, not feelings**
Before choosing, we measure how much time the team currently loses to the existing system, how much of the behaviour is covered by tests, and how much of the domain is documented anywhere other than the source. Those three numbers usually make the answer obvious.
A full rewrite feels clean and decisive. It is also the most expensive decision most teams make. Here is how we help clients decide honestly.