Okay, so you understand the basic principle that sales price - cost of selling - adjusted tax basis = taxable gain (or loss). But what happens if you sell more than one capital asset during the year? What if you take a loss on one sale, but a gain on another? How do you determine the amount of your gains, and will they be short-term, or long-term gains eligible for the special tax rates?
The general principle is that you must net your short-term gains against your short-term losses, to get a total short-term gain or loss. Then, you net your long-term gains against your long-term losses, to get a total long-term gain or loss. Finally, you net your total short-term gain or loss against your total long-term gain or loss.
If the ultimate result is a long-term gain, it will be subject to the maximum capital gains tax rate of 15 percent through the end of 2012. If the result is a short-term gain, it will be subject to tax at your regular income tax rate.
If the result is a loss, whether short-term or long-term, up to $3,000 of it (or up to $1,500 for married people filing separately) will be deductible from your ordinary net income. If your losses exceed this amount, you can carry them over and deduct them in subsequent years until they are used up.
Allocating gains of part-business property. For depreciable property that is used for both business and personal purposes, both the basis and sale proceeds of the property must be allocated between the two types of usage.
Essentially, the property will be treated as if it were two separate pieces of property. This applies to both real estate (e.g., your home office), and to property like cars, computers, office furniture, and equipment.
As a general rule, the taxable gain or loss on the business portion's disposition will be reported on Form 4797, Sale of Business Property.
In contrast, any gain or loss on the personal portion will be reported on Schedule D of your individual income tax return. Note that any losses on the personal portion of the home or equipment are not deductible, although gains on this portion may be taxable.
Home office. You can exclude up to $250,000 ($500,000 on a joint return) of gain from the sale of your principle residence, provided you have lived in the home for at least two of the past five years. If you claimed the home office deduction for a part of your property that is within your home, such as a room used as a home office or rooms used to provide daycare, you do not need to allocate gain on the sale of the property between the business part of the property and the part used as a home. In addition, you do not need to report the sale of the business part on Form 4797. This is true whether or not you were entitled to claim any depreciation. However, you cannot exclude the part of any gain equal to any depreciation allowed or allowable after May 6, 1997.
If you used a separate part of your property, such as using a free-standing storage shed for your inventory, in the year of sale, you should treat the sale of the property as the sale of two properties. You must report the sale of the business part on Form 4797. To determine the amount to report on Form 4797, you must divide your selling price, selling expenses, and basis between the part of the property used for business and the separate part used as your home. In the same way, if you qualify to exclude any of the gain on the business part of your property, also divide your maximum exclusion between that part of the property and the separate part used as your home.