All of these factors, along with your immediate needs, will be part of the equation. In many cases, unless you own a C corporation, you will likely want to structure the deal as an asset sale. If there are assets that will not be included in the transaction, the contract must spell that out. In the case of a C corporation, you may structure the sale as a stock sale to avoid double taxation (corporate and shareholder taxes). However, if you structure the sale carefully, you may be able to conduct an asset sale without incurring too much extra tax liability.
If you own a company where stock has been issued, you can make a stock sale. This will take greater due diligence, and your buyers may be more cautious.
When structuring the sale, sit down with your advisors and consider all the factors that will affect the sale: the type of business, the amount of debt, your gross revenue, and your needs as a seller.
Keep in mind that when structuring a sale, you must be prepared to negotiate. It is rare that a deal will play out exactly as you have structured it. Therefore, you will need to know where you can be flexible and where you cannot make adjustments.
Be especially wary of changes that will result in you paying higher taxes. Remember that as you restructure a deal in favor of the buyer on one end, it affects you, as the seller, on the other end. Therefore, you will need to constantly strike a new balance whenever you restructure the deal during negotiations.