Tax rules when buying a condo for your college student can get complicated, especially with capital gains taxes. Here’s what you need to know.

Q: We bought a condo in our name and paid for it with cash. Our son moved into the unit and paid no rent for 18 months. He was working on his PhD, so we were trying to help him out. He got a job offer across the country and moved out of our unit. It has been empty for six weeks and we want to sell it. Are we going to have to pay capital gains taxes on this property?

A: It seems to us that the condo was a second home for you and your family. You didn’t own it as an investment, received no rent and didn’t have a lease with a tenant. Given the information you have given us, if you sell the condo and make a profit on the sale, you will have to pay up to 20 percent in capital gains taxes on that profit.

We don’t know what tax bracket you and your family are in but the most you’ll pay in capital gains taxes would be 20 percent of the profit.

Given that you have only owned the property for less than 2 years, we don’t know how much appreciation you’ve seen with this condominium. If you sell it for more than you purchased it, you have to figure out if you have a profit. Even if the condo’s value went up 15 percent over the last two years, you had expenses when you purchased the condo and you’ll have expenses when you sell it. You may have even had expenses that you put into the condo that could offset the profit.

Keep in mind that broker’s commissions, transfer taxes, recording fees, attorneys’ fees and title company expenses all increased your basis in the condo. Basis is the term that the IRS uses for what your condo cost you. You add all the expenses of purchase, sale and certain expenses while you lived there to come up with your basis. If that basis is higher than your sales price, you owe no tax. If the basis is less than your sales price, you owe tax on the difference.

If you put in a new washer and dryer in the home, upgraded the kitchen with new cabinets, installed hardwood floors or new lighting fixtures, or put in air-conditioning, these capital expenses would increase your basis in the condo. Finally, many condominium associations use fund to upgrade their buildings. Depending on the assessments you paid and when they spent the money, you may be able to include your share of those building improvements towards the basis.

Given all of these items, you’ll have to take out a paper and pencil and figure out where you stand on all of these items and then you’ll have a rough estimate on whether you will have a tax to pay or not. Good luck.