(BigStock)

My husband and I helped our only daughter buy a house in the town where she did her graduate studies back in 2003. We made the down payment and she guaranteed the mortgage payments.

While she was at school, she rented out rooms to other students. We helped her pay the insurance. All three of our names are on the deed and mortgage. We also paid for the house to be updated, and installed new floors, kitchen and baths. Our daughter moved out of it six years ago, and we’ve since rented the property.

She is now married and she and her father-in law want to buy the house. The only wrinkle is that he would buy the house but our daughter and son-in-law are thinking about keeping their names on the deed.

Our kids and her father-in-law don’t own any other property. Our son-in-law is an only child so when his father dies the house will go to them. Will putting all names on the documents be better for probate? Another question is can we just do a change of names on the deeds and mortgage? The father can then just pay us what we put into it and also pay our children for their share.

How would this affect capital gains taxes or other taxes? The house is in California and we live in Florida.

You’ve certainly packed in a large number of questions. The first issue for you is to know what the effect will be on the sale of your investment property to your daughter’s father-in-law. But before we can address that question, you’ll need to figure out how you and your daughter handled the ownership of the property for the last 13 years.

You said you co-owned the home with your daughter but you didn’t tell us how you handled the ownership during those years. Did you treat the property as only yours and took all of the tax benefits and burdens of the property for those years? And when you filed your tax returns did you treat the property as only yours and not a property with shared ownership? Did your daughter take any tax benefits resulting from her ownership of the property?

These are all crucial questions when unraveling the ownership structure before you decide to sell the property.

When you own an investment property, you get the following tax advantages: You can deduct interest payments on your loan, real estate taxes, property insurance, maintenance expenses and utility costs, among other expenses. In addition, you get the ability to amortize the value of the improvements on the land. So if you buy a home worth $300,000 and the land is worth $100,000, you can amortize the $200,000 over 27.5 years. Depending on your tax situation, that means you can reduce any income you receive from the property by about $7,300.

Given these numbers, if you received rent from your daughter or your tenants over the years, you probably didn’t pay any federal income taxes that may have been owed.

But we don’t know how you handled the time your daughter lived in the property and rented rooms there. If she kept the money from the rentals, she probably needed to declare that rental as income on her federal income tax return. Now if she treated herself as a part owner of the property, she would be entitled to some of the benefits and deductions available to her.

Given all of these issues, you must talk to an accountant to figure out how the sale will affect you. If you sell the home to your daughter’s father-in-law or even give him the property, that transfer should trigger a “taxable event” for purposes of your federal income taxes.

Assuming only you took the advantages of ownership of the home for federal income tax purposes and your daughter didn’t, when you sell the home, you will pay federal income taxes on the profit from the sale of the home. In tax language, “profit” is computed when you compare the “basis” of your purchase to the sales price. To compute your basis, you take what it cost you to buy the home, what you put into the home in capital improvements, and what it cost you to sell the home (whether in preparing it to sell or broker’s commissions and the like).

Given that you upgraded the place and owned it for some time, you probably will sell it for a lot more than you paid for it. If you have a profit, that profit will be taxed at your capital gains rate — about 15 percent, plus (perhaps) the 3.8 percent Net Investment Income Tax. Since you owned the property for so many years, you may also have to repay the depreciation you took over those years. The rate for repayment of the depreciation is 25 percent.

As you can see, it gets complicated. It’s even more complicated if you had losses for some of the years in which you owned the property. You have losses when the rent you collect is less that the costs of owning the property. You may have been able to take those losses over the years, but depending on your tax situation, you may not have been permitted to take the loss. That loss could be carried forward and now affect what you must pay in taxes when you sell.

The only sure way to avoid any tax situation when you sell the property is to sell the property through a 1031 tax deferred exchange. When you use this mechanism, you sell and then must buy a replacement property within at most 180 days following the closing on the sale. When you buy the replacement property, that property must be worth more at least or more than what you are selling the home for.

Finally, we aren’t fans of holding title jointly solely for estate planning purposes. Frequently, the person inheriting a property does a whole lot better inheriting a property outright than getting ownership of a property as a joint tenant.

When you own property jointly, for IRS purposes, the value of the property is what it might be when you take title to the property. If later you sell the property when it appreciates, you will pay taxes on the difference between the price you paid for the home and what you sell it for down the line. If you inherit the property, the value of the property to you will generally be the value of the home at the time the person dies.

So if you inherit the home years after it was purchased and then you sell it within about a year after the death of the person that gave you the property, you may have no tax to pay on that sale. Furthermore, the person who died may not have to pay estate taxes on the property or any of their holdings if the value of their estate is less than $5,450,000 (in 2016, but that number is indexed for inflation).

To avoid probate, we’d prefer to see the father-in-law hold title in a living trust naming his son as the successor beneficiary and trustee. This way, at the father-in-law’s death, the property will become the son’s through the trust and avoid probate.

Good luck, but please seek the help of a good accountant and estate planner.

Ilyce Glink is the creator of an 18-part webinar + ebook series called “The Intentional Investor: How to be wildly successful in real estate,” as well as the author of many books on real estate. She also hosts the “Real Estate Minute,” on her YouTube channel. Samuel J. Tamkin is a Chicago-based real estate attorney. Contact Ilyce and Sam at ThinkGlink.com.