Many entrepreneurs set up their businesses using corporations that can qualify for an election under Subchapter S of the Internal Revenue Code. By doing so, they can get the asset protection of corporate status while also enjoying the tax benefits of a pass-through entity. Yet when it comes time to sell an S corporation, there are some tax considerations you need to keep in mind.

Selling stock vs. selling assets

The most important consideration in determining the tax treatment of an S corporation sale is how the transaction is structured. Business owners have two choices: They can either sell the stock the S corporation, or they can sell the assets of the corporation, keeping the existing corporate structure intact.

For the S corporation owner, the simplest way to structure a transaction is through a stock sale. In that case, you take the amount of cash the business owner receives for the stock and then subtract the business owner's tax basis in the S corporation shares. Although S corporation tax basis calculations can be complicated, the owner's basis will generally be equal to the owner's capital investment in the business, adjusted for any difference between the amount of taxable income the S corporation has generated during its tenure and the amount of money the owner has withdrawn from the S corporation in distributed profits. If the sale proceeds are higher than the tax basis, then the S corporation owner will recognize capital gains on the sale.

By contrast, an asset sale involves some extra steps. The business owner has to assign individual tax basis amounts to each asset sold, and then the purchase price must be allocated to each asset. On some assets, any resulting gain won't qualify for favorable capital gains treatment. For instance, for assets with no tax basis such as accounts receivable, the sale results in income taxed at ordinary income tax rates. Similarly, some gain on sales of depreciated equipment will be subject to higher depreciation-recapture rates. The net impact is higher taxes for the business owner in most instances.

Given this, selling business owners will typically prefer stock sales. But the buyer will prefer asset sales, because they will allow the buyer to reset the basis of depreciable assets and get larger depreciation deductions going forward. Some complex tax provisions sometimes allow the parties to make an election to have a stock sale treated in a similar way to an asset sale in certain situations, but they typically require specialized advice from experts to use them to best advantage.

Selling an S corporation can be the culmination of an entrepreneur's successful development of a business. But handling the tax aspects is critical to make sure you squeeze as much after-tax profit from the sale as possible.

(Looking for someplace to invest some of those post-sale profits? We at the Fool are fans of stocks. If you need a brokerage account, our site has a great section where you can compare various brokers, and determine which one would be the best choice for you.)

This article is part of The Motley Fool's Knowledge Center, which was created based on the collected wisdom of a fantastic community of investors. We'd love to hear your questions, thoughts, and opinions on the Knowledge Center in general or this page in particular. Your input will help us help the world invest, better! Email us at [email protected]. Thanks -- and Fool on!