Most owners start thinking about a sale six months before they want to complete. The ones who do best usually started two or three years earlier.
That time isn't spent on the sale itself. It's spent making the business easier to buy. Buyers pay for earnings they can rely on, and they discount anything that looks like risk.
The common risks are predictable. A large share of revenue from one or two customers. An owner who is the main relationship holder, salesperson and decision maker all at once. Accounts that need explaining. Agreements that were never written down. Key staff with no particular reason to stay after a sale.
Each of these can be addressed, but not quickly. Broadening a customer base takes time. So does building a management team that can run the business without the owner in the room. Several years of clean, consistent financial statements carry more weight than one good year.
There is a second benefit. A business that is ready to sell is usually a better business to own. Owners who prepare properly often find they're in less of a hurry to leave.
When the time does come, preparation shortens the process, strengthens the owner's hand in negotiation and reduces the chance of the price being chipped away during due diligence.