Dear Tax Talk,
Can you help me? I am 68 years old. I sold my loft in San Francisco last August. I purchased the loft in 2008, lived there for 1 year and because of a separation and subsequent divorce, I had to move to my previous residence in San Mateo, California. I rented the loft to 3 different tenants from 2009 until August 2015.

Do you see any way that I can avoid paying the tax on my capital gain of about $300,000? A Bankrate article says that a person would have to live in the unit for 2 of the past 5 years, and I miss that by 2 years. What do you think? Is there a tax loophole or a way to use my divorce to avoid capital gains tax?
— Michael

Alistair Berg/DigitalVision/Getty Images

Dear Michael,
From the facts presented in your question, there is no tax loophole available that would apply to you, and the entire capital gain will have to be reported.

It appears that you are aware of the IRS rule that stipulates a taxpayer must own and occupy a property as a principal residence for 2 of the 5 years immediately before the sale to benefit from the exclusion of the capital gain. The exclusion amount is $500,000 for married filing jointly taxpayers, and $250,000 for single taxpayers. Since you did not reside in the residence from 2009 onward, you did not inhabit the property for any of the 5 years prior to the sale, much less 2 out of the 5. Therefore, the capital gain would not be excluded.

The IRS does provide some exceptions if you do not meet the “2 years of use” general rule. If the sale results from either a change in the place of employment (your new job must be at least 50 miles from your old job), certain health issues or what the IRS calls “unforeseen circumstances,” which includes getting a divorce, then a proportionate exclusion is available. However, none of these exceptions applies to you since you didn’t inhabit the home at all in the 5 years preceding its sale. Also excluded from the 2-year rule are members of the uniformed services and Foreign Service, employees of intelligence agencies and employees or volunteers of the Peace Corps.

Based on your situation, it seems you will have a sizable gain on the sale of the home and will potentially need to pay taxes on that sale. I strongly advise you to consult a tax professional because the precise nature of the gain will need to be figured. The capital gains rates are lower than ordinary income tax rates; however, there are specific rules pertaining to rental properties requiring “recapture,” or including in the gain the depreciation expense that was taken when the home was used as a rental property. Additionally, depending on your income, you may be subject to an additional Medicare surtax of 3.8% on net investment income.

What is depreciation recapture?

Residential real estate can be “depreciated” over 27 ½ years or 40 years, depending on the schedule you adopt. Depreciation is an income tax deduction that enables rental property owners to recover their costs. If you don’t claim depreciation, you still have to “recapture” it when you sell the property. Depreciation recapture involves adding the prior depreciation deduction amounts to the sale price.

Thanks for the great question and all the best to you.

Ask the adviser

To ask a question on Tax Talk, go to the “Ask the Experts” page and select “Taxes” as the topic. Read more Tax Talk columns.

To ensure compliance with requirements imposed by the IRS, we inform you that any U.S. federal tax advice contained in this communication (including any attachments) is not intended or written to be used, and cannot be used, for the purpose of (i) avoiding penalties under the Internal Revenue Code or (ii) promoting, marketing or recommending to another party any transaction or matter addressed herein. Taxpayers should seek professional advice based on their particular circumstances.

Bankrate’s content, including the guidance of its advice-and-expert columns and this website, is intended only to assist you with financial decisions. The content is broad in scope and does not consider your personal financial situation. Bankrate recommends that you seek the advice of advisers who are fully aware of your individual circumstances before making any final decisions or implementing any financial strategy. Please remember that your use of this website is governed by Bankrate’s Terms of Use.