When you sell a stock, you owe taxes on the difference between what you paid for the stock and how much you got for the sale. The same holds true in home sales, but there are other considerations.
How to Calculate Gain
A Special Real Estate Exemption for Capital Gains
Up to $250,000 in capital gains ($500,000 for a married couple) on the home sale is exempt from taxation if you meet the following criteria: (1) You owned and lived in the home as your principal residence for two out of the last five years; and (2) you have not sold or exchanged another home during the two years preceding the sale. You may qualify for a reduced exclusion if you otherwise qualify but are short of the two-out-of-the-last-five-years requirement if you meet what the tax law calls “unforeseen circumstances,” such as job loss, divorce, or family medical emergency.