When you inherit a house after the owner dies you automatically receive a "stepped-up basis." "Basis" means the home's cost for tax purposes. This means that the home's cost for tax purposes is not what the now-deceased prior owner paid for it. Instead, its basis is its fair market value at the date of the prior owner's death. This will usually be more than the prior owner's basis.
To determine whether you have a profit or less when you sell an asset, you subtract its basis from the sale price. If you have a positive number, you have a gain. If you have a negative number, you have a loss.
If you sell an inherited home for less than its stepped-up basis, you have a capital loss that can be deducted (assuming you don't use the home as your personal residence or rent it out). However, only $3,000 of such losses can be deducted against your ordinary income per year. Any excess must be carried over to future years to be deducted.