Per the IRS, the home you live in most of the time is your main home. When you sell it you will typically either make money or lose money. If you make money it is called a capital gain.
Capital gains are taxable except that a capital gain of $250,000 or less from the sale of your main home may be excluded with the following provision. Generally, to be able to exclude up to $250,000 of this gain you must have lived in the home as your main home for a minimum of two years out of the last five. If you meet this requirement, then only the amount over this $250,000 exclusion is taxable. (On a joint return the exclusion limit is $500,000.)
This exclusion is tied to the home. If you sell the land on which your main home is located there is no exclusion amount.
If you have more than one home, only the main home qualifies for the exclusion.
You simply cannot deduct losses resulting from the sale of your main home. Sorry.
Did you have a home office you took deductions for over the years? You’ll want to read The Home Office tax tip.