The Internal Revenue Service doesn't care if you earn income through traditional means or if you reap a windfall through the sale of real estate. Either way, the government expects its share. It collects on the sale of real estate by levying capital gains taxes. You don't have to pay the tax on the entire sales price -- only on your profit. Capital gains tax applies to the difference between your cost basis and what you sell the property for. Your cost basis is typically what you spent to purchase the property, plus the cost of any improvements. You can deduct commissions and closing costs from the sales price as well.
Long Term Vs. Short Term Gains
How long you hold onto the property affects how much you'll pay in capital gains tax. If you buy the property and sell it again within a year, the IRS calls this a short-term gain and you'll pay a higher tax rate. If you wait more than a year to sell, this is a long-term gain and you'll pay less. The IRS taxes short-term gains at the same rate as your income. If you're married and your income from all sources is $200,000, this puts you in a 28 percent tax bracket as of the 2012 tax year. If $50,000 of that $200,000 was a profit realized from selling real estate within a year of purchase, your capital gains tax would be $14,000 on that profit. If you held onto the property for 18 months, however, you'd pay only 15 percent on the profit, or $7,500.
If you depreciated your property for tax purposes while you owned it, this creates another wrinkle. If you claimed a depreciation deduction, you must subtract that amount from your cost basis in the property. This increases the difference between your cost basis and your sales price. You could find yourself paying capital gains tax on $55,000 or $60,000 rather than $50,000. Depending on how long you held onto the property, this could make a significant difference.
Your Primary Residence
Capital gains tax mostly affects investors. The IRS is much more generous if you live in the property and use it as your primary residence. In this case, your first $250,000 in profit is tax-free, and this increases to $500,000 if you're married and file a joint return. You'd only have to pay capital gains on any profit that exceeds these amounts. However, you must actually live in the house during two of the last five years before its sale, and you must have owned the home for two out of those five years as well. You can sell your primary residence and exclude it from capital gains tax once every two years.
If you don't mind packing up and moving occasionally, you can usually apply the capital gains exemption for your primary home to an investment property. Under IRS rules, the two years you live in the property does not have to occur without break, and you don't have to reside there at the time you sell. You can live there one year, move out and rent it for three years, then move back in for another year. You've now used it as your primary residence for two years, and if it appreciated in value, you won't pay capital gains on the profit when you sell.
Beverly Bird has been writing professionally for over 30 years. She specializes in personal finance and w, bankruptcy, and she writes as the tax expert for The Balance.