It really doesn't matter what you're selling -- stocks, bonds, mutual funds, your home, rental property, your coin collection, your car, anything. Any time you sell something, the IRS is looking over your shoulder. Here are a few facts you need to know to report the sale accurately on your taxes.

What is your cost basis?
Once you understand what you're selling and the corresponding tax treatment, you'll need to calculate the cost basis of that asset for tax purposes. For personal property, the cost basis is simply whatever you paid for it in the first place.

However, for business assets, you'll be claiming depreciation, which will decrease the original cost to something less than what you paid for it. Let's say you purchased an office desk for $500. Over the past few years, you've been depreciating that office desk and using those depreciation expenses to reduce your yearly taxes. If you've taken $400 in depreciation against that desk by the time you decide to sell it, your adjusted cost basis would be $100 -- the original $500 that you paid, less the $400 in depreciation. If you sell that desk for anything other than $100, the IRS won't be happy.

Depreciation is a complicated topic. If you're a business owner, it'll pay to learn more about it. The IRS website is a good place to start.

Don't forget that improvements add to the cost of an asset, whether it's business or personal. Likewise, sales commissions that you pay to buy a stock will be added to the cost of the stock for tax purposes. Make sure that you've made all of the appropriate additions and subtractions to the original cost of the property to arrive at your adjusted cost basis. It's tricky, so make sure that you know the rules and can arrive at the correct basis for the asset that you're selling.

What are the tax consequences?
Once you've determined your cost basis, it's time to determine the tax consequences of the sale. Different assets have different tax rules; not all sales are created equal. Remember: With taxes, there are complications and exceptions that can arise in any situation. The following rules are the highlights, not the last word.

Personal-use property: Property that you use exclusively for personal purposes, other than a personal residence or collectibles.

  • If a gain: Taxed as a capital gain, either long- or short-term, depending on your holding period. If long-term, you would receive the benefit of a maximum 15% capital gain rate. If short-term, your tax rate would be your normal marginal tax rate.

  • If a loss: Non-deductible. There is no deduction for losses on personal-use property.

Personal residence: Your primary home.

  • If a gain: Not taxable up to $250,000 for single folks and $500,000 for married folks, if certain rules are met. If the gain is taxable because the exclusion rules are not met, it will be treated as a capital gain, either long-or short-term, depending upon your holding period. The same rates and rules listed above apply.

  • If a loss: Non-deductible, as described above.

Collectibles: Stamp, gun, coin, or baseball card collections, or other valuable collectibles.

  • If a gain: Taxed as capital gain, either long- or short-term, depending upon your holding period. But these assets don't receive the benefit of the maximum 15% tax on long-term capital gains. Instead, the maximum long-term capital gain tax on collectibles is 28%.

  • If a loss: Non-deductible.

Investment property: Stocks, bonds, mutual funds, a second home, or other real property for which depreciation is not claimed.

  • If a gain: Taxed as a capital gain, either long-or short-term, depending on your holding period. The usual capital gains rules apply, as listed above.

  • If a loss: Taxed as a capital loss, either long- or short- term, depending on your holding period. These losses can be used to offset other capital gains. If you have more losses than gains, your deduction is generally limited to $3,000 per year. The balance of the losses is carried over to the following tax year.

Business/investment real property: Real property that you depreciate, used for rental or business purposes, like your office building or a home that you rent out to others.

  • If a gain: The gain must be segregated into two parts. The first part, the gain realized from the recapture of previously claimed depreciation expense, would be taxed at a maximum capital-gains rate of 25%. Any additional economic gain would be taxed as a capital gain, either long- or short-term, depending on your holding period. If long-term, the maximum 15% rate applies. If short-term, your tax rate would be your normal marginal tax rate.

  • If a loss: The entire loss is generally deductible in the year of sale. Unlike non-depreciable real property, there are no loss limitations.

Business personal property: Personal property that you use (and depreciate) for business purposes, such as your office furniture, business computer, business vehicle, and business machinery/equipment.

  • If a gain: As above, the gain must be segregated into two parts. However, unlike business real property, there is no special maximum capital gains tax rate applicable to the gain or recapture of depreciable personal property. Any such gain would be taxed at your normal marginal tax rate.

    Any additional economic gain will be taxed as a long- or short-term capital gain, at the usual rates previously discussed.

  • If a loss: The entire loss is generally deductible in the year of the sale. There are no loss limitations.

Gain or loss ... minimize your taxes!
Regardless of whether you'll have a gain or a loss, you may be able to accomplish a sale but still minimize your taxes. If you have business-use property, you might be able to trade that property for similar property (commonly called a tax-deferred exchange) and avoid current taxes completely. And if you sell some of your stock for a loss, you might use that loss to offset some of the gains on other stock sales.

But again, it all boils down to knowing the rules for whatever you're selling. Start with the articles in the "Related Links" box in the upper right corner of this article. And if you don't have the time to learn about the rules before you sell, the advice of a qualified tax pro could be worth its weight in gold.

When he's not dealing with tax issues, Roy Lewis is a motivational speaker who lives in a trailer down by the river. He understands that The Motley Fool is all about investors writing for investors. You can take a look at the stocks he owns, as long as you promise not to ask him which stock to buy. He'll be glad to help you compute your gain or loss when you finally sell a stock, though.