Q: My wife passed away this past year, and our home is titled in her trust, with me as trustee and my children as beneficiaries upon my passing. If I sell the house, is my cost basis the value on her date of death?

If so, and there is a gain when sold, am I entitled to the $250,000 gain exclusion? If I stay in the house and my children inherit it upon my death, what are the tax ramifications to them regarding step up, gain exclusions, etc.?

A: We are sorry for your loss. The good news is it sounds as though you and your late wife spent time (and probably money) thinking through how your estates would be handled after your passing, and that is an incredibly important step most people go miles out of their way to avoid.

Now, to your question: If your wife’s trust owns the property and has named your children as beneficiaries upon her death, your kids now own the home. If your wife’s trust named you as successor beneficiary upon her death, you inherited the home when she died.

Two paths, two possible outcomes. Outcome No. 1: If your kids own the home, the tax issue and other sale considerations would relate to your kids and not you. Because your children now own the home, and presumably control it through the trust, they would be responsible for all taxes owed after the home is sold, and they would receive the remaining proceeds after those taxes are paid.

By the way you have structured your question, however, we assume that when your wife passed, you became the successor trustee and the successor or sole beneficiary under the trust. In this second outcome, you would have inherited the home from your wife upon her passing, and the value of the home to you for sale purposes is the value of the home at the time of her death.

If you sell the property now and the value has not increased much since she died, you have little or no profit and would not have to worry about federal income taxes. If, however, the value of the home has increased significantly since she died and you have lived in the home for two out of the past five years as your primary residence, you can claim the $250,000 exclusion from federal income taxes. This means the first $250,000 of profit would be tax free to you. (Married couples get a $500,000 tax exclusion when they sell their primary residence and non-married partners would each be able to claim the $250,000 exclusion as long as they each meet the criteria.)

We can think of a few variations that might cause problems. If the trust was a joint trust or your trust owns half of the home and her trust owned half of the home, you will have to treat the home as two separate transactions when you sell it. You will have two sets of calculations: the profit you have on the sale of the home given what you paid for the home and the sale price.

Your computation would be based on your half ownership of the home, which you would have received after your wife’s death, and which would be valued at whatever the value was at or around the time of her death. Again, if the total profit is less than $250,000 and you are eligible for the home sale exclusion of $250,000, you would not have to pay any federal income taxes on the sale.

For most people, the home sale exclusion of $250,000 would be enough to wipe out any federal tax due, but if you live in an area with high appreciation, you could find yourself having to pay taxes on the sale.

For more help in computing what you might owe — if the profit on the sale exceeds the $250,000 or you do not qualify for the home sale exclusion — you might want to talk to an accountant or other person who helps you with your federal income taxes. Sometimes, people forget they might lose the home sale exclusion exemption when they take up residence in a different state because they still feel like their longtime home is still their primary home. (Hint: If you do not spend most of your time there, it is probably not your primary residence for tax purposes.)

Everyone’s financial situation is a little bit different and may require planning to achieve the desired outcome. That is why we frequently recommend seeking the advice of a trained professional. We are not punting — we just do not have enough details of your situation to make a definitive call.

Ilyce Glink is the author of “100 Questions Every First-Time Home Buyer Should Ask” (4th Edition). She is also the CEO of Best Money Moves, an app that employers provide to employees to measure and dial down financial stress. Samuel J. Tamkin is a Chicago-based real estate attorney. Contact them through her website, ThinkGlink.com.