Avoiding Capital Gains Tax While Renting Out Your House

by on March 22, 2012Jason Van Steenwyk

how to avoid capital gains tax when renting out your houseFirst, the bad news. The IRS levies a capital gains tax of up to 15 percent, depending on your tax bracket, on the profitable sale of investment property. Furthermore, investment property does not normally qualify for the capital gains tax exclusion on up to $250,000 in capital gains ($500,000 for married couples filing jointly) that personal residences typically enjoy.

That exclusion’s worth a pretty good chunk of change. Assuming the top long-term capital gains rate of 15 percent, that adds up to as much as $37,500 for single owners, and double that for married couples. That’s enough to warrant doing some tax planning to mitigate the tax hit. You may not be able to avoid it altogether, but you may be able to take the edge off of the bill.

Know the Capital Gains Tax Rules

The good news is that once you rent a property out, it is not forever doomed to be treated like an investment property, subject to capital gains taxes on the first dollar. You can convert a property’s status from an investment property to a personal residence by satisfying the IRS’s simple use test: To claim the exemption, you must have lived in the property for at least two years out of the preceding five.

The simplest way to avoid the capital gains tax, then, is to live in the home for at least two of the five years immediately preceding the sale.

Use Section 1031 Exchange

The “landed gentry” has occupied a place in Congress since the dawn of the Republic. It’s not surprising, then, that they would write a landlord-friendly provision or two into the tax code. In fact, Congress has given real estate investors a gift not normally available to retail investors in stocks, bonds and mutual funds: a deferral of capital gains tax on exchanges of one property of “like kind” for another. For example, you can sell a residential rental property and buy a new one in exchange, under Section 1031.

To qualify, the property you’re selling and the property you’re buying must be of “like kind.” They don’t have to be identical – they just have to be in the U.S., and serving approximately the same function in your overall portfolio. Generally, you can exchange U.S. real property for another U.S. real property and defer capital gains tax under section 1031.

What Qualifies for Capital Gains Tax Deferral Under Section 1031?

There are some special rules that apply. The two properties don’t have to change hands at the same time, as would be the case with a direct swap, says the IRS. Instead, with a deferred exchange, “the disposition of the relinquished property and acquisition of the replacement property must be mutually dependent parts of an integrated transaction constituting an exchange of property.”

Additionally, you can’t defer capital gains in a personal residence under Section 1031. Both of the properties must be business or investment properties. Vacation homes don’t count. This provision only defers capital gains on one property. Your tax basis in the old property transfers to the new one.

Careful – Section 1031 only applies to the property itself. If you own the property within partnership, you cannot sell your interest in the partnership to avoid capital gains tax.

How Long Do I Have to Execute a 1031 Deferred Like-Kind Exchange?

There are two time limits you need to worry about: You have to identify your new property, in writing, within 45 days of selling the old one. You also have to deliver your identifying document to an intermediary whose function is to ensure that the 1031 exchanges are actually realized. “Notice to your attorney, real estate agent, accountant or similar persons acting as your agent is not sufficient,” warns the Internal Revenue Service.

Second, you have only 180 days after the sale to complete the acquisition of the new property, or until the due date of your income tax return, including all extensions. If you blow either deadline, plan on paying the entire capital gains tax. The IRS does not grant waivers to these timelines, except for presidentially-declared disasters.

For more information on like-kind exchanges under Section 1031, see IRS Publication 544.

Sell a Loser

If you have investment property to sell at a profit, potentially generating a capital gains tax liability, look to see if you have any investments that have lost money. If you do, you may be able to offset some or all of your capital gains tax, using a technique called “tax loss harvesting.” The IRS aggregates all your gains and losses for the year. So selling losers can help you lower your capital gains tax bill. Furthermore, if you have excess losses, you can deduct up to $3,000 from your income, and carry this loss forward every year, deducting your loss against any capital gains, and then up to $3,000 of ordinary income, until your losses are exhausted.

Time the Sale

If you must pay the capital gains tax, consider doing so when your income is low. Why? Because your capital gains tax is a function of your income tax bracket. The lower your taxable income, the lower your long-term capital gains tax is likely to be.

For that reason, the best time to sell a property you’ve been renting is when your net taxable income, after deductions, is abnormally low. Try to bunch deductions in the same year, and shift income out of the year.

Use a Deferred Sales Trust

If you are unable to find a suitable like-kind property, or execute the transaction in time to qualify under Section 1031, or you simply want to get out of real estate, you may consider establishing a deferred sales trust (DST). The buyer funds an annuity held within the trust. The trust sends the income stream to you, according to a schedule that suits your income needs. This allows you to defer capital gains tax by taking your sales proceeds in the form of installment payments, in what the IRS deems a “structured sale” under IRC Section 453. You only pay the capital gains tax gradually, as you receive the payments from the trust.

Enlist!

Five years not enough? Join the military! If you are on active duty, and you are called away from your home on orders from Uncle Sam, you can “stop the clock” on the IRS’s use test for up to 10 years. Short of that 10-year limit, the IRS does not penalize members of the military for being called away from their homes of record on military orders. However, if this provision applies, you must still have lived in the property for at least two years of the previous 10 years to qualify. However, you cannot use this provision more than once every two years.

{ 53 comments… read them below or add one }

Angie April 3, 2014 at 6:56 pm

I bought my home in 2007 for $550K. In May 2011, I moved and have rented for the last 3 years. I now plan to sell. The home value is approx. $450K. I have heard that we can not use the capital loss to offset other capital gains from other investments. What I have been told is that we must reset to the value of the house (at the time or rental) to approx. $350K. Do you know the answer to this or where I might go to find this?
Thank you. Angie

Reply

Leigh March 13, 2014 at 10:32 am

Recently purchased a home built in 1987. At the same time we purchased a piece of property in the same neighborhood. Will have lived in the house one year in July, but are considering building a new house on the property and renting out the older home. What length of time should we stay in the home before moving and what kind of tax hit will we take by moving out before 2 years.

Reply

Juli Mac March 11, 2014 at 5:11 am

I have heard the 2 out of 5 year rule has been discontinued or altered. Plus that depreciation resets the basis (calculated as if you had taken it even if you didn’t). With depreciation recapture 25%, plus cap gains, plus surcharge of 3.8% on investment income the tax load seems quite high. Plus my rental is in the worst zone for hurricanes/floods and flood insurance, already steep, will be going up 25% per year plus $250 PER YEAR. The rules were much more reasonable when I bought it and when I started renting it out (12 years ago). I couldn’t qualify for another mortgage now, too broke due to previous bad tenants x 2 and companies I worked for going out of business. Any advice please? Will I still owe a bundle if a hurricane destroys the house?

Reply

Gwen Robinson February 16, 2014 at 4:59 pm

I bought a house in September of 2008 to live in myself. But it was tenant occupied at the time. Rather than kick them out, I let them stay there until the end of their lease in March of 2009, which is when I moved in. I lived there for a little over 2 years until June of 2011, when I got married and moved to my husband’s house. The old house has been rented out since then (for the last 2 year 8 months). If I sell that house now, am I exempt from paying capital gains tax since I have lived there 2 years out of the last 5? Someone told me that when you first start out renting a place out, the 2 out of last 5 years rule does not apply. Instead, you can only be exempt the percentage of time you had it as your primary residence out of the duration of the time you owned it. If this is true, this means only 2/5ths of the profit I make on the sale is tax exempt. Does this sound correct? But I did not buy this house as income property. I only let the old tenants live out their lease. Two accountants have given me conflicting answers to this question. Please advise!

Reply

Daryl Meiser February 9, 2014 at 7:14 pm

I would like to sell my rental property and purchase a second home as my work is moving me to another state but I want to keep my primary residence. How does this affect capital gains tax?

Reply

Steve Palmer February 9, 2014 at 8:57 am

I have been renting a room out of my main home that I have owned and always lived in. To offset rental income, I had been depreciating a portion of my home. I stopped renting the property at the end of February 2013. In May of 2013 I sold my home. I know I am eligible to exclude the gain on the sale of the house as I have lived in it from day 1. But my tax program wants to add back in ALL of the depreciation that I took since the day I started renting it as a long term capital gain. The Tax program also wants to use the total depreciated amount to lower the basis of the house. Seems like a double wammy to me. Is there a way to avoid paying capital gains on the depreciated amount in my situation?

Reply

Jug Bedi January 30, 2014 at 3:17 pm

If I have lived in a primary residence for 26 years and then rent it out, can I still claim tax exemption when I sell it? If so within how much time I must sell it without loosing the tax exempt benefit

Reply

freida hernandez January 24, 2014 at 11:16 am

I bought a house in mt name over 2 yrs ago for my daughter and claimed it as rental property and took depreciation and upkeep off of my taxes for a 2 yr period. Am selling the house now and profit from original sales price will br 45k. Do I have to pay capitol gains tax…since I owned the property. For over 2 yrs. I did not live in the house?

Reply

pryncesa January 22, 2014 at 7:55 am

Do I have to paid taxes in a investment property if only for the purpuse of the taxes I made figure that I live in one and I ‘m renting the other level?

Reply

Patti Bodor December 22, 2013 at 9:55 pm

I recently sold my rental property for gain in September 2013. Can I still do a 1031 exchange by buying a fourth of ownership in another rental property? The value of the 1/4 ownership is higher than the total amount of the sold rental. I don’t have much time left to make this decision. Thanks very much in advance.

Reply

alison chen October 25, 2013 at 5:20 pm

Hi, Jason:

We lived in a single family house from 2005-2011 June. From July 2011 we rent it out up to now. If we sell this house and close escrow before June 2014, do we need to pay the tax for capital gains?

Thank you for sharing so much information to us.

Alsion

Reply

Fernando November 29, 2013 at 3:08 am

Alison,

I’m in the same boat as you are and was wondering if you’ve come up with any good information?

Fernando

Reply

Tammy S October 20, 2013 at 10:04 pm

I bought my house in 1984 for 74,500. Raised my family and got it in the divorce in 2007. My daughter married and lived there and I bought a house in 2008 for over $250,000 20 miles away closer to work. Being a young family they needed a safe place to live and I hardly collected anything for rent from them in those 6 years. 50 Percent of fair market rental so my tax advisor indicated that because I was within $100 not to claim as rental property. In 2013 I sold the home she lived in her 26 years to her and husband for $135,000. Are there any allowances for home sale to immediate children for capital gains reductions?

Reply

Susan schnitzer October 9, 2013 at 9:29 am

If we sell a single family rental property and purchase a multi family rental property, live in one unit, will we still qualify for section 1031 exchange?

Reply

Jacqueline October 1, 2013 at 6:52 pm

I’m currently living in my Townhome because I took advantage of the Making Home Affordable Program offered by the Obama administration. I took cash out of it 8 years ago to buy another property in another country. My question is when I sell the Townhome here, do I pay capital gains on my original purchase price? Or do I pay it on my current mortgage payment which is 200,000 more than my purchase price, thus making my capital gain a lot lower. Example: I bought my Townhome for 369k and refi’d for 520k. When I sell for let’s say 750, is it capital gains tax starting from 369k or 520k? I’m also single.

Reply

Jean Parke February 2, 2014 at 7:07 pm

capital gains are based on original purchase price + any capital improvements you have made to the home (additions, remodels, major improvements, etc.)

They have nothing to do with your mortgage amount.

Reply

robert September 8, 2013 at 9:19 am

I am in the military and I bought my home in 2003, I lived the home until I received order to move 2007. It has been a rental since. It is now 2013 and I am considering selling the home. Do I meet any capital gains exclusion in this situation?

Reply

robert September 8, 2013 at 9:14 am

I am in the military and I bought my home in 2003, lived in till I received order to move 2007. It is 2013 and I am considering selling the home. Do I meet any capital gains exclusion in this situation?

Reply

JT August 21, 2013 at 2:31 pm

If I sell a rental property for a gain can I roll the gain to pay down the mortgage on my primary residence tax free?

Reply

Bettye August 20, 2013 at 10:31 am

I have a Duplex in California and I live in one, but I am planning on selling it between 2014 to 2016. How can I keep more money for my retirement and pay less taxes? Thanks

Reply

alex August 5, 2013 at 2:12 pm

just sold a rental property for gain
can I payoff existing mortgage on primary residence with this money and avoid tax liability in the process?

Reply

Heidi July 7, 2013 at 8:05 pm

I have a question about inherited property that was and is rented. I want to sell it to make some of the money I received. It was valued at 86,000, but will sell for less. It has been only a few months (will be a year in Dec.) since I received the property, although it has been 3 years since the death. What do I need to do, what will I be hit with, and can I use the money to do additions to my personal home?

Reply

Sherrie hicks July 7, 2013 at 2:27 pm

Hi,
We have owned a 1031 property for 7 years. It was purchased with funds from two other rental properties. We have 50% equity ($300,000 equity. $600,000 value) in the property and want to do some renovations ($60,000 in renovations) on the cabin.

Can we use our equity to do the renovations? If so, how do we access the money? Home equity loan? Stand alone loan?

How will this be taxed at the time of sale when we pay capital gains (no plans to sell the property).

Thank you for this resource!

Reply

Crystal July 7, 2013 at 12:04 pm

I am currently selling a rental property. Can I convert my current primary residence (owned less than a year) to a rental and use the 1031 exchange if I buy a new primary residence?

Reply

Peter Armour June 27, 2013 at 6:05 am

I have a rental property up for sale and I know I will pay Capitol Gains. I calculated Original Purchase price of $85,000 and selling for $115,000. $30,000 is my capitol gain but not sure if that is the tax I owe or is it a 15% tax on the $30,000.

Reply

Amy September 9, 2013 at 5:04 pm

I am currently selling a rental property for gain.

Can I payoff existing mortgage on primary residence with this money and avoid tax liability in the process?I have had the rental home for 16 months. Please advise. ThANK YOU

Reply

Peter June 20, 2013 at 5:22 pm

I moved out of my primary residence for a job out of state and eventually rented it but for less than my mortgage (its a loss for income purposes). I’m running up on the end of the 2 yr/5yr rule for the exemption. Although I’ll have capital gains by the Basis calculation, I won’t have much actual net gain when I sell. Other than selling the property now, is there a way to reduce capital gains if this is my only property and only significant investiment? I don’t plan on rolling any proceeds into a similar price house but probably lower price. And I don’t have opportunity to exchange as I don’t plan on being a landlord again. Thanks for any advice.

Reply

Lucy June 6, 2013 at 8:08 am

If you have a cottage on your property (having lived in the main house for 27 years), now you want to move into the cottage and rent the main house.
How does the two out of five exclusion work? When you sell can you get your full exclusion or only a partial.

Reply

karen May 26, 2013 at 6:37 pm

I have had a 4 unit multi family house where I’ve lived in the one unit for 13 years. I purchased another single family home that I was going to move into at that time, but then realized that I needed to rent out first to lessen my debt load so Ive rented that out for 3 years now. I’m currently selling the multi unit house that I’ve lived in for a very long time and will be moving into the other single family house that I’ve rented out so my question is……are there any capital gains tax exemptions for me having lived in the multi unit for so long…for my personal residence even tho 3/4ths was rental? I’m also learning that I may be paying a recapture on depreciation also of a hefty amount as well. Would the deferred sale trust be the way to go on this? Or do I just buck up and pay the piper? It would be nice to have some relief for this being my personal residence. What do you advise??

Reply

jp June 4, 2013 at 7:24 am

Sounds like since you lived in the multi-unit dwelling 2 out of the last 5 years, the “status” of the property changes from Investment to Personal.

As such, the gain would be excluded up to $250,000 for single filer and $500K for joint.

The “essence” of the property is essentially Personal since you lived there 2 out of the last 5.

Reply

Karen La point May 21, 2013 at 7:31 pm

My husband and I have dual primary residences. His job in Philadelphia, lives in our Downingtown, Pa, I was relocated to Tustin, Ca with my job and my daughter and i live in our Southern Ca home. We file jointed married. When we sell one of our home what happens with capital gains?

Please advise

Reply

Kimberly Goodwater May 13, 2013 at 11:49 am

I was divorced a year ago and in my divorce papers it states that if my exhusband sells the property I am to get half. My question is did he find a loop hole in the paper work by renting the property out. If so what should I do?

Kimberly Goodwater

Reply

Michelle April 26, 2013 at 5:33 pm

Hi Jason,

Thanks for the information–very helpful. I do have a question though. I have a rental house that I’m looking at moving back into (was my primary residence) after about 4 years of renting to satisfy the 2 of last 5 rule, then sell. I’m thinking of either selling my current residence (a condo) or renting it out for the couple of years while I live in my house, then basically sell both of them around the same time. I’m not interested in doing a 1031 exchange. I understand the last 2 out of 5 year rule, but read somewhere you can only do this on one property every 2 years. If I rent my condo would I then be subject to capital gains on it if I sell it in a couple of years, having lived here for three years prior? I guess my question is can I do this on both properties if I technically qualify for the 2 of last 5 year rule? Thanks!

Reply

Tracy April 18, 2013 at 11:30 am

Hi. We built a house in 2005 and had to leave it due to job transfer. WE have rented it out since then, but at a loss every month! We just tried to keep it from going into foreclosure, but we continually lost money. WE now have someone interested in buying. Will we pay capital gains? I have all the receipts we paid to build the home (pre-rental income receipts) that total more than we are selling it for, but some of the receipts have faded. The person interested in purchasing is wanting to do a lease option and pay us money over three years to apply to the principal and wants us applying to our mortgage. Technically, that money is closing money, but if it is given two years or more before the closing do I have to count it as income now or just wait and count it when we do actually close?

Reply

Debbie April 17, 2013 at 4:30 pm

I have a question about this gray area phrase that is used “The simplest way to avoid the capital gains tax, then, is to live in the home for at least two of the five years immediately preceding the sale.” What does that mean? Does that imply that you have to have lived in the home in the the IMMEDIATE two years before you sell it? We have owned the home for 15 years,and just starting renting it out. In a black in white answer, how long can we rent it without paying the capitol gains? We won’t have lived in it for the IMMEDIATE two years before the sale. But we will have lived in it for 2 of the 5 years that we owned it. Pls help with a simple answer that seems to have alot of gray area’s.

Reply

Jason Van Steenwyk April 17, 2013 at 10:53 pm

Hello, Debbie, and thanks for writing! There are a couple of special situations where different rules apply, such as where the homeowner is active duty military. But for most folks, to qualify for the full capital gains exemption, you have to meet a two-pronged test, called the ‘ownership and use’ test. 1.) You have to have owned the home for two of the past five years, and 2.) You have to lived in the home for at least two of the five years immediately preceding the sale. There’s no requirement that it has to be the last two years. It can be any two years. Furthermore, you can’t have excluded the gain from the sale of another home in the previous two years. See http://www.irs.gov/publications/p523/ar02.html#en_US_2012_publink1000200713 All the best, and thanks for reading,

Jason

Reply

Ruby April 15, 2013 at 6:23 pm

I’m almost past the two out of five year time-frame. If I sell to a friend at a very low price within time frame, and then later buy back from this friend, does the two out of five year time-frame start all over again?

In other words, if I miss this time=frame, then when I do sell, will I have to pay capital gains tax?
If my income is low, does that mean you do not have to pay capital gain tax? Thanks for your response

Reply

Jason Van Steenwyk April 17, 2013 at 10:56 pm

Hello, Ruby…

Remember, there are two tests… you have to have lived in the home for two years of the last five, and you have to have owned the home for two of the past five years. The clock doesn’t ‘reset.’ The IRS looks at the five rolling years prior to the sale. Remember that you can’t exclude gains more than once every two years. Jason

Reply

Aneil April 12, 2013 at 12:41 am

We bought a fourplex last year to live in and rent the others. In other words owner occupied. In the middle of the process we got a military order to move overseas for 3 years and we had to move after living there for 3 months.

We realized the property had gained some value and now we are planning on selling it. We intend to move back to this place when we go back to Washington. If I sell this house now, do I need to pay capital gains tax at 15 percent as a rental house? Or is there a military waiver?

Please email me your expert solution

Reply

RANDY April 8, 2013 at 5:35 pm

I sold a rental and made 100k which I invested into another new rental property five years ago. If I sell my new rental and lose 50K do I owe any capital gains tax?

thanks,
Randy

Reply

Regina March 22, 2013 at 10:34 pm

I am selling my rental property and buying another rental property that I would eventually like to live at. In order to not pay capital gains tax, how long must my new property be a rental before it becomes my primary residence ?

Reply

Christine April 10, 2013 at 6:49 am

I have the same question. And using the 1031 helps but it limits the amount of time you have to find another property and we also have a lot of repair costs on the one we are selling that we would like to use some of the monies from the sale to pay for. Also what is the % to pay on capital gains? 5-15%. That is a big jump, I could do 5% but not the 15%.

Reply

Debbie March 8, 2013 at 1:25 pm

I rented out my home for 7 years…. never lived there during the 7 years. Can I take the money and apply it to the mortgage of two rent houses I already have and not pay the capital gain tax?

Reply

Jason Van Steenwyk March 8, 2013 at 5:20 pm

Hello, Debbie, and thanks for writing.

Doubtful. Under the Section 1031 like kind exchange rules, you have to EXCHANGE one rental property for another. Selling it and applying the proceeds to pay off homes you already own is not an exchange, just a sale.

To lower your capital gains tax, you can sell other assets that you’ve lost money on… thereby employing a “tax-loss harvesting” strategy (You can Google around on that term for more information) or simply execute a Section 1031 exchange. Or simply keep on renting and let your tenants pay the mortgages on the other two properties.

Have a great day!

Jason

Reply

val martinez February 11, 2013 at 8:20 am

If a rental property is owned by 2 individual people, and 1 person has lived in the residence for 2 years out of the five preceding years PRIOR To the rental and 2 years out of the five preceding the sale of the property, is capital gains tax eliminated from both owners?

Reply

Gabe February 25, 2013 at 1:40 pm

I have the same question.
And what if an owner has a renter while they are living there as their primary residence?
Anyone?

Reply

Chuck vB December 4, 2012 at 4:04 pm

I have a house that was my primary for 15 years, but I had to move as I changed jobs. The problem was that the home is in Phoenix and the market has been (and still is so bad I had to rent the property. So now I’m past the two out of five year time-frame. But it was Job related. Will the IRS exemption on the 2 out of five year work in this case?

Thanks
Chuck

Reply

mae pickens May 19, 2013 at 11:36 am

I’m in the same situation. Is there any forgivness from IRS do to job related transfer. Avoid paying the capital gain if I sale in Calif.. Otherwise, I’d have to move back into my rental in California for the next two years and rent my home in Nv.

Reply

israel g. garcia November 13, 2012 at 10:21 am

bought new home how long can i rent old home without paying capital gains taxes

Reply

CAROLYN B. KNOTT September 9, 2012 at 8:28 pm

I own a home that I’ve lived in for 16yrs; leaving due to the death of my husband and my own very serious health problems. I still own the home but I’ve rented it for a few weeks seasonally. Probably four weeks in 2012. I paid $226K. Now I can sell it for between $500K and $600K. I have done considerable work and repairs on the house in upkeep and preparation for either renting or selling – a new roof was installed 6yrs ago, I will have a sewer assessment of around $5K due – the realtor fees, painting throughout, carpet cleaning, etc. Where can I go for answers to my obligations? I am 82yrs old.

Reply

Shannon O'Brien September 10, 2012 at 11:02 pm

Hi Carolyn,

It’s so nice to finally start hearing about homeowners with equity in their homes!

That said, I don’t understand what you’re looking for when you say “answers to my obligations.” If you can clarify that and let us know what questions you have we’d be happy to help.

Reply

CAROLYN B. KNOTT September 11, 2012 at 3:06 pm

Shannon – 1. Do I still get the $250K credit, even though I have rented the house for a few weeks? I have not lived in the house for any part of the past 5yrs. Just a couple of months each year. It is impossible for me to move back to NC due to my declining health and inability to live alone. Many surgeries have left me with “foot drop” and neuropathy in my feet and legs. The continuing expenses make it financially tight, thus trying the rental route to help out.

We added a burglar alarm and boat life when we were building the house. We also added length and other amenities at a later date. I would guess about 5yrs after we moved in.

Do that answer your question? When you reply, please notify me at seaknott@gmail.com

Reply

Jackson Lancaster April 2, 2012 at 9:13 am

People had better take advantage of all the tax benefits they can from their homes before they evaporate !

Reply

Leave a Comment