If you are married, and file a joint income tax return, the tax laws allow you to exclude up to $500,000 on any gain you make on the sale of your principal residence. There are some basic rules (conditions) which must be met, the most important is that you must have owned and lived in the house for two out of the last five years before the sale. This is referred to as the "ownership and use" test.
If you are single -- or widowed -- you can only exclude up to $250,000 of your profit.
At first blush, this seems unfair -- especially to a person who has lived in their principal house for many years and then the spouse dies. There are, however, two tax breaks available.
First, according to the IRS, "if you sell your home after your spouse dies (within 2 years after your spouse dies), and you have not remarried as of the sale date, you can count any time when your spouse owned the home as time you owned it, and any time when the home was your spouse's residence as time when it was your residence." (IRS Publication 523, Selling Your Home). In other words, the surviving spouse can claim the up-to-$500,000 exclusion of gain if the house is sold within two years from the date of death, and it is not necessary to file a joint tax return.
Let's assume for this discussion that the couple purchased their home many years ago for $50,000, and when the husband died, it was worth $750,000. Let's further assume no capital improvements which would have increased the tax basis. In our example, if within two years from death, the spouse sells for $750,000, the gain is $700,000. The spouse can exclude $500,000 of the gain. But $200,000 of gain still has to be accounted for.
Then we go to the second tax break: called "Stepped Up Basis".
Basically, the value of the house on the date of death becomes the basis of the person who inherits from the deceased. In effect, the basis is "stepped up".
Let's go back to our example. The basis of the surviving spouse in the house is $25,000 (half of the purchase price). When one spouse died, the survivor inherited his/her basis as of the date of death, which was $375,000 (half of $750,000). Thus, for tax purposes, the surviving spouse's basis is now $400,000 (the original $25,000 basis plus the inherited basis of $375,000).
If we continue to do the math, when the house is sold for $750,000, the capital gain -- i.e., profit -- is only $350,000 ($750,000 - 400,000). If the house is sold within two years from the day the spouse died, the surviving spouse can exclude all of the gain and pay no tax.
However, if the house is sold after the two years, the gain is $100,000 more than the $250,000 ceiling authorized by Congress, and the survivor will have to pay capital gains tax on the $100,000. Clearly, while the IRS will get some money, the stepped-up basis does reduce the pain.
Since the gain is over $250,000, it is important to include all capital improvements which the owners made to the house over the many years. Any such improvements are additions to basis, and thus would reduce the profit. Hopefully, in this situation, it can be reduced sufficiently so that the gain falls under the $250,000 cap.
Before you consider selling, you must review your specific situation with your tax advisors. Clearly you don't want to make any mistakes with your valuable equity.