Q: We had a house built, and shortly after we moved in discovered it had a mold problem as well as numerous construction defects.

We are pursuing a legal remedy against the builder and have decided to sell the house (“as is”) so we can get on with our lives.

Can we take a capital loss on the house? And, can we include any of the costs associated with the lawsuit (such as legal fees, expert witnesses, arbitration fees, environmental testing) in the house’s cost basis?

A: Good luck with your suit against the builder of this less-than-perfect house. Unfortunately, the costs associated with the lawsuit are not part of the house’s cost basis.

In any event, you already have a loss on this home. Unless you’re in the real estate business full-time and this house was an investment, that loss is not deductible. Increasing your cost basis won’t help you out from a tax perspective.

When you profit from the sale of a home, if you have lived in a home for two out of five years, you get the benefit of excluding from tax any gain up to $250,000 if you are single or $500,000 if you are married. If you move before the two years are up, but are selling because of a divorce, medical condition, or because you are taking a job that is 50 miles or more from your current one, you may be able to take a portion of the profits tax-free.

If there was a profit from the sale of the home above the $250,000/$500,000 threshold, or if the exclusion did not apply for some reason, you would pay tax at your ordinary income tax rate or, if you owned the home for at least one year, at capital gains rates.

Please see your tax advisor for more details.