I recently met with a widower who sold his house, hired an accountant to help with calculating the capital gain tax, and assumed the tax details would be handled. They thought that the accountant would ask all the relevant questions to ensure the return was accurate, but called me for a second opinion when the number seemed off.
Turns out, the accountant didn't ask whether he had owned the home with a spouse; they just looked at the original purchase price and sale price and calculated the gain from there- which resulted in an expensive mistake!
Using fictional numbers, let's say this man and his wife originally purchased the home for $200,000, then years after his wife passed, he sold it for $750,000. The gain would be $550,000. After the $250,000 personal capital gain exemption on the sale of a primary residence, that leaves $300,000 of taxable gain. At a 15% capital gains tax rate, that is a $45,000 tax bill.

There was one key detail missing: because this couple owned this property together and lived in a community property state, their home received a step-up in basis at his wife's death. (Step-up in basis means an inherited asset’s tax cost resets to its value at death, which can reduce capital gains tax when it’s sold later.)
Let's say the value of the home on the day she died was $450,000. Suddenly, the numbers change dramatically! Now the gain is $300,000. After the $250,000 exclusion, only $50,000 is taxable. At 15%, that is $7,500 in tax.

And it does not stop there- selling costs matter too! Realtor fees and certain closing costs reduce your gain. In this example, $50,000 of selling costs could eliminate the remaining taxable gain entirely.