This new year’s, as the ball dropped on 2015, I started thinking about when I should consider selling my home.
2015 was red hot for real estate. I should know, because I build software products for home buyers and sellers at Redfin!
I began to wonder whether it’s a good time to cash in on sky-high housing prices.
As I contemplated this, I poked around the tax rules to understand how capital gains are taxed when you sell your house.
Turns out if you do it right, the IRS will give you a nice little tax-free break when you sell your house.
You can completely exclude from taxes up to $250,000 in gain if you’re single; $500,000 if you’re married filing jointly.
As I researched this little tax benefit more, I discovered a LOT of nuance to how it works…. My head was spinning!
In fact, I needed to write it down and go through several examples to really grasp it.
So today, I’m gonna share in excruciating detail exactly how this tax break works. It has tricky nuances you have to know to make sure you don’t accidentally disqualify yourself.
All homeowners out there thinking of selling their house — and even home buyers who just want to learn how to be tax-efficient — can get a LOT of value from understanding the intricacies of how this part of the tax code works.
I’m gonna structure this post as an FAQ. But I’ll use a bunch of examples to actually show you how the nuances, exceptions, and limitations work.
Click any of the links below to jump to each question.
First, what part of the tax code are we talking about?
Who qualifies for the exclusion?
What type of home qualifies for the exclusion?
How much can you exclude from taxes?
When can you claim this exclusion?
What does the exclusion mean for tax purposes?
Did you know you’re throttled on how many times you can claim this exclusion?
What other special rules apply to married taxpayers?
But sometimes, married couples are treated as if they had not been married…
Changes to the law in 2009
You can’t claim an exclusion for “periods of nonqualified use”
What is “nonqualified use”?
But there are some exceptions…
So…what happens when you have “periods of nonqualified use”?
Example #1: The simple case…
Example #2: The unhappy simple case…
Example #3: Let’s add some spice…
Example #4: Straddling the border
What happens when you fail to meet some requirements of the law?
Examples of change in employment
Examples of change in health
Examples of other unforeseen circumstances
Great, you’re eligible for a partial exclusion! Now how is it actually calculated?
Two final notes about job changes, health, and other unforeseen circumstances
A word about depreciation recapture
Let’s start with the basics….
The statute that governs the $250k / $500k exclusion on home sale gains is:
This is from the Internal Revenue Code. I won’t copy the actual text of the statute here, ‘cause frankly it makes my eyeballs hurt. But feel free to click and read and compare my explanations to the statute if you’re unclear about anything (or just want to check my work).
People who own and use a home as a primary residence for at least 2 of the 5 years before selling their home.
Basically, any home that is your primary residence. Doesn’t matter if it’s a single family home, condo, townhouse, whatever.
What determines whether a home is your primary residence is whether you are physically living in the home.
Up to a maximum of $250k gain if you’re single, $500k if you’re married filing jointly.
If you sell your home for LESS gain than these amounts, the amount you can exclude will obviously be less. It’s limited to your actual gain.
Upon the sale, exchange, or involuntary conversion of your primary residence. We’ll talk more later about what “exchange” and “involuntary conversion” mean.
It means the capital gain from the sale of your home, up to $250k for single filers and $500k for married joint filers, is excluded from your income FOREVER.
You also won’t need to make any basis adjustments to any replacement home you buy.
Yup. You can only claim this exclusion once every TWO years.
So, no luck trying to buy and flip houses and claim this exclusion every year.
In order to get double the exclusion amount, i.e., $500k:
- At least ONE spouse must own the home for 2 of the 5 years prior to sale
- BOTH spouses must actually live in the home as their primary residence for 2 of the 5 years prior to sale
- NEITHER spouse can be in a “time out” because of the every-2-years throttle limit mentioned above
If you and your spouse satisfy all these criteria, hooray — you get a $500k exclusion!
But what happens when you or your spouse fail one of the criteria above?
Well, you don’t get knocked out entirely.
What happens is, the IRS grants you an exclusion AS IF you had not been married.
What that means is, the IRS will evaluate each of you independently to see what your own personal exclusion WOULD have been had you been a single tax filer.
Furthermore, for purposes of that analysis, the IRS will treat BOTH spouses as having owned the property whenever EITHER owned the property.
In other words, if only ONE spouse actually held title, the IRS will fictionally assume BOTH spouses held title at the same time…but just for this one analysis.
However much exclusion each of you would be entitled to via this analysis, the IRS will take the sum of both amounts and declare that as the total exclusion you are jointly entitled to.
This may sound complicated, but you can get a feel for its application by considering the case where, say, a woman owns and lives in a home for 3 years before marriage, then marries, and then 1 month after her wedding decides to sell her house because the couple moves to a new city for new jobs.
In that case, the husband will fail the 2-year residency requirement, so the IRS will evaluate them separately, but will fictionally assume the husband owned the house for the same time the wife owned the house — 3 years.
Then the IRS will take whatever partial exclusion the husband is entitled to, add it to whatever exclusion the wife is entitled to, and then declare the SUM to be the actual exclusion the couple is jointly entitled to.
We’ll see some detailed examples of this later.
In the simple days before 2009, the rules were uncomplicated.
As long as you satisfied the 2-year residency requirement, you could claim a nice fat exclusion.
But starting in 2009, Congress decided it needed to raise more tax revenue. So it amended the rules on primary residence capital gains tax exclusion to make it more restrictive.
Now, you have to meet the 2-year residency requirement PLUS check a few other boxes to get the full exclusion.
A lot of people will get caught by these changes, so let’s examine what they are….
Basically, the IRS now says, assuming you first meet the 2-year residency requirement, you will only be allowed to claim the tax exclusion for “periods of qualified use.”
You can no longer get it for “periods of nonqualified use” even when you meet the residency requirement.
What’s considered qualified vs. nonqualified use?
First, the IRS says the term “period of nonqualified use” means any period starting January 1, 2009, when the home is not used as a primary residence of the taxpayer or taxpayer’s spouse.
So, anything before 2009 still counts under the old law. The new restrictions only apply starting January 1, 2009.
That means if you bought your home before 2009 and sold it during or after 2009, then you’ll use the old law to determine your tax liability for the part before 2009, and then use the amended law to determine your tax liability for the period afterward.
I hope that doesn’t make your head want to explode.
Since the test for primary residence is whether you are physically living in the home, then any time you are NOT physically living in the home, the home is NOT considered your primary residence.
If you rent your home out, it’s not your primary residence. (However, if you just rent out 1 room, you’re still safe, but fractional depreciation rules will apply to that room.)
If you live somewhere else for part of the year, like a vacation home, then your regular home is not your primary residence while you’re away.
I don’t think the IRS will check too carefully if you are just going on vacation for 2 weeks and living in hotels, even though I think that technically means your home is not your primary residence while you’re away.
Even though the new rules around “nonqualified use” mean the $250k / $500k tax exclusion is no longer simply determined by the 2-year residency requirement, there are a few exceptions where not living in the home is nevertheless recognized by the IRS as permissible for tax exclusion purposes.
There are 2 exceptions I want to point out in particular.
First, the period between the LAST date the home is used as a primary residence and the date the home is sold is NOT considered nonqualified use.
To be clear, it’s not considered qualified use, either; it’s just not NONqualified use. Our examples later will show the significance of this distinction.
Second, any temporary absence, not exceeding 2 years, due to a change of employment, health condition, or other unforeseen circumstances also is not considered nonqualified use.
We’ll have to define these terms: “employment,” “health condition,” and “other unforeseen circumstances” and we’ll talk more about them in a moment.
If part of your ownership period consists of nonqualified use, you won’t get the full tax exclusion, even if you satisfy the 2-year residency requirement.
But you might still be eligible to claim a partial tax exclusion.
And remember: all this stuff about nonqualified use only applies to 2009 or later. Before that, there is no such concept and therefore no restrictions on the tax exclusion.
We’ll show how this works in our examples below.
So…if you can only claim part of the tax exclusion, exactly how much CAN you claim?
It’ll be a percentage. The way the IRS determines that percentage is by creating a fraction.
The numerator of the fraction is the total days of nonqualified use while you owned the home SINCE January 1, 2009.
The denominator is the total days you owned the home, even before 2009.
That percentage is what you CANNOT exclude from taxes. You can exclude the rest.
Okay, enough theory.
It’s time we look at examples to see how this all works….
Let’s say Victor and Victoria, a married couple, purchase a home for $1 million and sell it for $1.6 million.
Victor and Victoria buy their home January 1, 2010. They live there as their primary residence for 2 years plus 1 day, moving out January 1, 2012.
The next day, they rent out the house to a tenant, who leases it for 2 years plus 364 days — just shy of 3 years. They sell the house December 31, 2014, exactly 5 years after buying it.
What are the tax consequences?
Since their entire ownership period occurs after 2009, only the post-2009 regime applies.
In this case, Victor and Victoria will get the full tax exclusion of $500k.
They satisfied the 2-year residency requirement because they lived in the house for 2 years and a day.
They also have a valid exception to nonqualified use because the period after the LAST date the home was used as a primary residence (January 1, 2012) is NOT considered nonqualified use.
That’s true even though they rented out the home for nearly 3 years.
So, Victor and Victoria get the first $500k gain excluded from taxes. They’ll pay long-term capital gains taxes on the final $100k of gain.
Let’s look at a similar example:
Same facts as above, except here Victor and Victoria move out 1 year plus 364 days after buying and occupying the house — just shy of 2 years.
They rent out the house for the remainder of the time until they sell at the 5-year mark.
Now, our unhappy couple fails to satisfy the 2-year residency requirement.
Even though the period after they move out is still validly excepted from nonqualified use, they cannot claim any tax exclusion because they failed the 2-year residency requirement.
So they must pay long-term capital gains taxes on the entire gain of $600k. Bummer.
Getting a little more complicated, let’s say Victor and Victoria buy their home for $1 million on January 1, 2010.
They live there 1 year and move out December 31, 2010, so Victoria can accept a 1-year job rotation to a foreign branch office of her company. During their year abroad, they rent out their house.
The day after the tenant’s lease ends on December 31, 2011, they move back in. They live there for 2 more years and then move out again December 31, 2013, because they “just want to change things up.”
They find a new tenant and start renting the house out the following day until they sell exactly 2 years later on December 31, 2015, for $1.6 million.
In this scenario, Victor and Victoria own the house for a total of 6 years.
4 discrete use periods:
- Primary residency #1 (1 year from 1/1/10 – 12/31/10)
- Move out for job rotation (1 year from 1/1/11 – 12/31/11)
- Primary residency #2 (2 years from 1/1/12 – 12/31/13)
- Move out to change things up (2 years from 1/1/14 – 12/31/15)
What are the tax consequences?
Victor and Victoria still get the full tax exclusion of $500k.
First, the IRS looks back 5 years from the sale to evaluate the 2-year residency requirement. In this case, it was satisfied.
Next, we determine that the earliest year of the lookback period, 2011, does not count as “nonqualified use,” even though Victor and Victoria weren’t living in the house, because they moved due to a job rotation which is a valid exception.
Finally, the last 2 rental years also don’t count as “nonqualified use” because of the exception after the LAST date the home is used as a primary residence. So, 2014 and 2015 will not count as “nonqualified use.”
That means, even though half the 6-year period was spent renting the house to tenants, Victor and Victoria can still claim the full exclusion because there are no periods of nonqualified use!
Victor and Victoria happily exclude the first $500k gain and then pay regular capital gains taxes on the last $100k.
What about when the house is purchased before 2009 and sold after 2009?
Same facts: Victor and Victoria buy for $1 million and sell for $1.6 million. Except this time, the ownership timeline looks like this:
They buy and move in January 1, 2006. They move out 1 year later and rent out the home for the next 4 years: 2007, 2008, 2009, and 2010.
They move back in 2011 and live there exactly 1 year before accepting a job rotation overseas. For that year abroad (2012), they rent out the house.
When they return, they move back in New Year’s Day 2013 and live there for 3 years before selling at the end of 2015.
What are the tax consequences?
They’ll be able to claim 80% of the $500k tax exclusion, but they’ll have to pay regular capital gains taxes on the other 20%, plus on the last $100k of gain.
First, we analyze whether they meet the residency requirement: they do. They lived in the home for 4 years: 2011, 2013, 2014, and 2015.
Next, we know their job rotation year (2012) is a valid exception to “nonqualified use” even though they rented the house out.
Since they owned the home before 2009, we ignore all rental years before then, because there is no such concept as nonqualified use before 2009.
We only analyze rental years starting 2009 — in this case 2009 and 2010.
We take the ratio of nonqualified use to the full ownership duration to compute how much gain CANNOT be excluded from taxes.
Here, the numerator is 2 years for the rental period of 2009 and 2010. (Remember, the job rotation year 2012 is a valid exception.)
The denominator is 10 years, the entire period of ownership from 2006 – 2015.
So, that tells us we cannot claim the tax exclusion on 20% of the gain, which means we can claim it on the other 80%.
Victor and Victoria can claim $400k in gain tax-free — that’s 80% of $500k. They’ll pay regular capital gains taxes on $100k, or 20%, and they’ll pay capital gains taxes on the last $100k of gain (they bought at $1 million and sold at $1.6 million).
We’ve seen that satisfying the requirements lets you exclude up to $250k / $500k from taxes.
And when you have some nonqualified use, you can still exclude some gain, as long as you meet the other requirements.
But if you fail the other requirements, you generally cannot exclude any gain from taxes.
But there is an important exception: If you sell your home but don’t meet the residency requirement, or you sell within 2 years of selling another home, you MAY still be eligible for a partial exclusion IF the sale is due to a change in employment, health, or “other unforeseen circumstances.”
But what qualifies as a “change in employment, health, or other unforeseen circumstances”?
The IRS has helpfully published regulations providing guidance and examples describing these scenarios. (For the details, see: “IRS Treasury Regulations Section 1.121–3.”)
Let’s take a quick look…
The IRS says a home sale counts as “due to a change in employment” if the main reason for the sale is because your employment LOCATION changed.
The regulations use something called a “safe harbor.”
A safe harbor is a simple test you use to analyze your situation and “passing” the test means the IRS automatically grants you a partial tax exclusion.
Failing the test does not mean you lose the partial exclusion. It just means the IRS doesn’t automatically grant it to you.
Maybe they’ll need more info before deciding. Or maybe they won’t and they’ll grant it to you anyway. Passing the safe harbor just “fast tracks” their analysis. But failing it doesn’t preclude you from a partial exclusion.
For job changes, the safe harbor is 50 miles.
That is, your home sale is automatically deemed to be caused by a job change if your new job location is at least 50 miles farther from your house than your old job. If you didn’t have an old job, then it’s if your new job location is at least 50 miles away from your house.
Important: That job change must occur during the time you own AND use your home as your primary residence.
It doesn’t matter if you start a brand new job, continue an old job, or are self-employed. The only thing that matters is location, the change in your commute distance.
Let’s see how it works.
Example 1: Alex is unemployed and owns a townhouse that she has owned and used as her principal residence since 2015. In 2016, before satisfying the 2-year residency requirement, Alex obtains a job that is 54 miles from her townhouse, and she sells the townhouse. Because the distance between Alex’s new place of employment and the townhouse is at least 50 miles, the sale is within the safe harbor and Alex can claim a partial exclusion.
Example 2: Bill is an Air Force officer stationed in Florida. Bill purchases a house in Florida in 2015. In May 2016, before satisfying the residency requirement, Bill moves out to take a 3-year assignment in Germany. Bill sells his house in January 2017. Because Bill’s new job in Germany is at least 50 miles farther from his house than his old Florida job was, the sale is within the safe harbor and Bill can claim a partial exclusion.
Example 3: Crystal works in her firm’s Philadelphia office. Crystal purchases a house in February 2015 that is 35 miles away from her office. In May 2016, before satisfying the residency requirement, Crystal begins an assignment in her company’s Wilmington office 72 miles away from her house, so she moves out of the house. In June 2018, Crystal is assigned to work in her firm’s London office. She sells her house in August 2018 as a result of the London assignment. The sale is not within the safe harbor because her job change from Philly to Wilmington did not increase her commute distance by 50 miles (72 – 35 = 37). It’s also not protected by the safe harbor because of the London assignment because Crystal was not living in her house as her primary residence when she moved to London. However, Crystal is STILL entitled to a partial exclusion because, under her facts and circumstances, the main reason she sold her home WAS her change in job location.
Example 4: In July 2015 Donna, who works as an emergency medicine physician, buys a condo 5 miles from her hospital and lives in it as her primary residence. In February 2016, Donna gets a job at a new hospital that is 51 miles away from her condo. Donna may be called in to work unscheduled hours and, when called, must be able to arrive at work quickly. Because of the demands of her new job, Donna sells her condo and buys a townhouse 4 miles away from her new hospital. Because Donna’s new job is only 46 miles farther from her condo than her old job, the sale is protected by the safe harbor. However, Donna can still claim a partial exclusion because, under her facts and circumstances, the main reason she sold her condo was her job change.
As you can see, the safe harbor guarantees the partial exclusion, but its absence does not preclude the exclusion. It just means you have to look at the facts and circumstances.
What about changes in health?
Basically, you get a partial tax exclusion even when you don’t satisfy the residency requirement if the main reason you sold your home was to get medical care for an actual illness or injury that you or a family member have.
Actually, it’s whenever ANY “qualified individual” has an illness or injury, but if you read the rules that usually just means you and your family. (See Treasury Regulations Section 1.121–3(f) for the full run-down.)
Remember, it has to be an ACTUAL illness or injury. If it’s simply beneficial for your family’s health and well-being, you can’t claim the tax exclusion.
Just like with job changes, the health exception also has a “safe harbor” test.
It’s a physician’s recommendation.
That is, a home sale is automatically deemed to be caused by a health condition if a licensed physician recommends that you move to get medical care. You should get your doctor’s recommendation in WRITING to avoid any surprises.
Let’s look at some examples.
Example 1: In 2015, April buys a house and uses it as her primary residence. Then April is injured in an accident and unable to care for herself. April sells her house in 2016 and moves in with her daughter so that her daughter can care for her due to her injury. Under the facts and circumstances, the main reason for selling April’s home is her health, so April is entitled to claim a partial exclusion.
Example 2: Hank’s father has a chronic disease. In 2015, Hank and Wendy purchase a house together and use it as their primary residence. In 2016 they sell the house to move in with Hank’s father so they can care for him as a result of his disease. Since the primary reason for selling their home is for the health of Hank’s father, they are entitled to claim a partial tax exclusion.
Example 3: John and Linda purchase a house in 2015 and use it as their primary residence. Their son suffers from a chronic illness requiring regular medical care. Later that year their son begins a new treatment that is available at a hospital 100 miles away from home. In 2016, John and Linda sell their house in order to be closer to the hospital treating their son. Since the main reason for the sale is to treat their son’s illness, they are entitled to claim a partial tax exclusion.
Example 4: Ben, who has chronic asthma, purchases a house in Minnesota in 2015 that he uses as his primary residence. Ben’s doctor tells Ben that moving to a warm, dry climate would mitigate his asthma symptoms. In 2016, Ben sells his house and moves to Arizona to relieve his asthma symptoms. The sale is protected by the safe harbor so Ben is entitled to a partial tax exclusion.
Example 5: In 2015 Jill and Robert purchase a house in Michigan which they use as their primary residence. Robert’s doctor tells Robert he should get more outdoor exercise, but Robert is not suffering from any disease that can be treated or mitigated by outdoor exercise. In 2016 Jill and Robert sell their house and move to Florida so that Robert can increase his general level of exercise by playing golf year-round. Because the home sale is merely beneficial to Robert’s health, it is not a valid exception and Jill and Robert cannot claim a partial tax exclusion.
All right, what’s the deal with “other unforeseen circumstances”?
Unforeseen circumstances are situations where your house is sold or exchanged due to something not reasonably anticipated and not in your control.
If the main reason for selling your house is simply due to “buyer’s remorse” or due to an unexpected improvement in your financial situation, it won’t qualify for a partial exclusion.
Just as with job changes and health conditions, “other unforeseen circumstances” also has a “safe harbor” test.
The safe harbor kicks in if ANY of the following happens while you own and live in your home:
- Involuntary conversion
- Natural or man-made disaster, war, or terrorism causing damage or destruction to your home
- Death of you or a family member
- Job loss making you or a family member eligible for unemployment benefits
- Change in employment status (e.g., reduced hours or pay) that makes you unable to pay housing costs and basic expenses (e.g., food, clothes, medical, taxes, transportation)
- Divorce or legal separation
- Multiple births resulting from the same pregnancy
The IRS may define other events as “unforeseen circumstances” as well, but they’ll do that case by case, and when that happens they’ll publish written announcements explaining whether those events are generally applicable to everyone.
Let’s walk through some examples.
Example 1: In 2015 Alice buys a house in California and moves in. Shortly afterward, an earthquake causes damage to her house. Alice sells the house in 2016. The sale is protected by the safe harbor and Alice can claim a partial tax exclusion.
Example 2: Henry works as a teacher and Whitney works as a pilot. In 2015 they buy a house to live in as their primary residence. Later that year Whitney is furloughed from her job for 6 months. The couple is unable to pay their mortgage and basic living expenses while Whitney is furloughed. They sell their house in 2016. The sale is within the safe harbor and they can claim a partial exclusion.
Example 3: In 2015, Howard and Winnie buy a 2-bed condo to use as their primary residence. In 2016 Winnie gives birth to twins and the couple sells their condo to buy a 4-bed house. The sale is protected by the safe harbor and Howard and Winnie may claim a partial tax exclusion.
Example 4: In 2015 Bruce buys a high-rise condo unit and uses it as his primary residence. His monthly condo fee is $400. But 3 months after moving in, Bruce’s condo association replaces the building’s roof and heating system. Six months later, Bruce’s condo fee doubles as a result of the repairs. Bruce sells the condo in 2016 because he can’t afford both the new condo fee and his monthly mortgage. The safe harbor does NOT apply, even though Bruce can no longer afford his housing costs. However, under the facts and circumstances, the main reason for his sale, i.e., doubling the condo fee, is an unforeseen circumstance because Bruce could not reasonably have anticipated the fee would double when he bought the unit. Consequently, the sale is due to unforeseen circumstances and Bruce may claim a partial exclusion.
Example 5: In 2015 Chris buys a house as his primary residence. The house is located on a heavily traveled road. Chris sells the house in 2016 because he is bothered by the traffic noise. The safe harbor does not apply. Because the main reason for the sale is traffic noise it is not an unforeseen circumstance and Chris cannot claim a partial exclusion.
Example 6: In 2015 Diana and her fiance Eliot buy a house to live in as their primary residence. In 2016 they cancel their wedding plans and Eliot moves out. Diana cannot afford the monthly mortgage by herself, so they sell the house in 2016. The safe harbor does not apply. However, under the facts and circumstances, the main reason for the sale, the broken engagement, is an unforeseen circumstance because Diana and Eliot could not reasonably have anticipated it when they bought the house. Therefore, they are each entitled to a partial tax exclusion.
Example 7: In 2015 Frances buys a small condo as her primary residence. In 2016 she gets a promotion and a large salary increase. She sells her condo and buys a house because now she can afford it. The safe harbor does not apply. The main reason for the sale, the salary increase, is an improvement in Frances’s financial circumstances. An financial improvement, even if due to unforeseen circumstances, does not qualify for partial tax exclusion.
Example 8: In April 2015 George buys a house to use as his primary residence. He sells the house in October 2016 because it has greatly appreciated in value, mortgage rates have declined, and he can now afford a bigger house. The safe harbor does not apply. The main reasons for the sale, the change in house value and mortgage rates, are a financial improvement, so George does not qualify for a partial exclusion due to unforeseen circumstances.
Example 9: Hudson works as a police officer. In 2015 he buys a condo to use as his primary residence. In 2016 he is assigned to the city’s K–9 unit and is required to care for his police service dog at his home. Because Hudson’s condo association does not permit dog ownership, Hudson sells the condo in 2016 and buys a house. The safe harbor does not apply. However, under the facts and circumstances, the reason for the sale, Hudson’s assignment to the K–9 unit, is an unforeseen circumstance because Hudson could not reasonably have anticipated this at the time he purchased the condo. Consequently, Hudson may claim a partial exclusion.
Example 10: In 2015, Jennifer buys a small house to use as her primary residence. Jennifer wins the lottery in 2016 and sells her house to buy a bigger, more expensive house. The safe harbor does not apply. The main reason for the sale is a financial improvement and does not qualify for a partial tax exclusion.
Same way as the “nonqualified use” case: it’s a percentage.
The IRS will multiply the maximum allowed exclusion (i.e., $250k / $500k) by a fraction.
The numerator is the lower of EITHER…
- (a) the duration the home was owned AND used as the taxpayer’s primary residence (looking back 5 years from the sale), OR
- (b) the duration from the taxpayer’s most recent prior sale for which capital gain was excluded under Section 121 to the date of the current sale
The denominator is: 2 years.
The numerator and denominator must use the same unit of time, so if you’re using days for one you also have to use days for the other; if you use months for one, you must use months for the other.
Let’s look at some examples.
Example 1: On January 1, 2016, Monica buys a home for use as her primary residence. 18 months later on July 1, 2017, she sells the home because her job gets transferred to another state. Monica may exclude up to $187,500 of gain from taxes: that’s $250k * 18 months / 24 months.
Example 2: On January 1, 2016, Jordan buys a house as his primary residence. On January 1, 2018, Jordan marries Holly and she moves in. On January 1, 2019 (12 months after Holly moves in), they sell the house due to a valid job change. Because only Jordan has satisfied the 2-year residency requirement, the couple cannot get the full $500k tax exclusion. Instead, their exclusion will be determined by calculating what each person would get had they not been married. Jordan can exclude his full $250k gain because he satisfies the residency requirement. Although Holly does not satisfy the residency requirement, but she can claim a partial exclusion due to the job change. She can exclude up to $125k, which is $250k * 12 months / 24 months. Therefore, the couple can claim a combined exclusion of $375k.
Notice one VERY important detail: Partial exclusions when you FAIL to meet the residency requirements are calculated by multiplying the appropriate fraction by the MAXIMUM permitted exclusion of $250k / $500k, and NOT by the ACTUAL realized gain.
In reality, then, getting a partial exclusion when you FAIL the residency requirement quite often means you can still end up excluding the ACTUAL entire gain from your home sale! That is true if your actual gain falls short of the maximum permitted exclusion.
In fact, if your actual gain is as shown below, you’ll still be able to exclude the full amount if you FAIL the residency requirement as long as your partial exclusion percentage is the corresponding amount:
By contrast, getting a partial exclusion when you PASS the residency requirement means you will definitely exclude LESS than your ACTUAL gain. That’s because the fraction (1 – post-2009 nonqualified use / total ownership duration) is applied against your ACTUAL gain, not the MAXIMUM permitted gain of $250k / $500k.
So if your actual gain is, say, $100k when you PASS the residency requirement, you’ll only get to exclude a fraction of that if you have ANY nonqualified use. Whereas if your actual gain is $100k when you FAIL the residency requirement, you can still exclude all of it as long as your applicable fraction is at least 40% if you’re a single filer ($100k / $250k) and 20% if you’re a joint married filer ($100k / $500k).
Is your mind blown?
What the IRS is encouraging with this is maneuvers to AVOID the residency requirement while creating a valid exception to still get a partial exclusion.
One last thing on calculating the partial exclusion amount.
If the taxpayer acquires a replacement home following a home conversion qualifying for a partial exclusion, the ownership and residency period carries over to that replacement home if the replacement home’s cost basis is determined using the involuntary conversion rules of Section 1033(b) of the Internal Revenue Code.
Example: On January 1, 2006, Sean buys a house as his primary residence that costs $200k. On January 1, 2016, a tornado destroys his house. Sean gets $550k from his insurance company. The destruction of his house qualifies for gain exclusion under both Section 121 and Section 1033.
Sean then buys a new house for $280k. Because he can exclude up to $250k of gain from taxes, for purposes of Section 1033, the amount realized is “adjusted” to $300k ($550k insurance proceeds less $250k exclusion) and the taxable portion of that is $100k ($300k “adjusted” amount realized less $200k original home cost basis).
Since Sean bought a replacement home for $280k, he recognizes gain of $20k and pays taxes on it now ($300k “adjusted” amount realized less $280k replacement home cost). The remaining $80k is tax-deferred ($100k taxable gain less $20k already taxed). The cost basis of the replacement home is $200k ($280k cost less $80k deferred gain). And Sean’s 10-year ownership and residency period from the original house carries over to his replacement house.
There’s a couple issues open to interpretation about the exceptions for job changes, health, and unforeseen circumstances.
One is whether the same safe harbor tests that apply to partial exclusions when you FAIL the residency requirement also apply to the nonqualified use exceptions when you PASS the residency requirement.
It seems reasonable that they would, but the Treasury Regulations Section 1.121–3 don’t explicitly confirm this.
The regulations were written to address cases where you fail the residency requirement. But the nonqualified use exceptions came later and only went into effect in 2009 — years after the regulations were already published.
Absent explicit IRS guidance to the contrary, I recommend you assume the same safe harbor tests apply in both cases.
Second is the nonqualified use exception that grants leniency for temporary absences not exceeding 2 years due to job change, health condition, or other unforeseen circumstances.
It’s not entirely clear what happens when an absence due to one of these reasons lasts LONGER than 2 years.
If you have a health condition that requires you to live away for 2 years plus 1 day, does that mean the first 2 years are validly excepted from nonqualified use while the last 1 day counts as nonqualified use? Or does it mean zero days are now validly excepted and therefore you cannot claim this exception at ALL?
I haven’t seen clear IRS guidance on this, so it’s something to discuss with your tax advisor.
One other thing you should know is how Section 121 interacts with depreciation recapture.
Depreciation recapture is where the IRS taxes you when you sell your home for any cost basis you depreciated while owning your home.
Typically, you’ll depreciate your cost basis (property value only, not land value) when you rent out the home to a tenant. This helps offset your rental income which in turn lowers your tax liability.
You’ll typically depreciate using a straight-line method over a 27.5-year horizon. Your cost basis declines correspondingly with each depreciation deduction.
Incidentally, you should ALWAYS take the depreciation deduction.
Don’t think you’ll “save your cost basis” and avoid depreciation recapture by simply forfeiting the depreciation deduction.
That’s ‘cause when you sell your home, the IRS automatically assumes you have taken the depreciation deduction to its maximum extent for the entire period you rented out the property.
So the IRS taxes you on depreciation recapture whether you actually took the depreciation deduction or not. There is no way to avoid this. So you should ALWAYS take the depreciation deduction and find income to offset it against.
Google any of this if it’s news to you.
Anyway, when you sell the home, the IRS is gonna tax you on any amounts you depreciated if your sale price exceeds your depreciated cost basis.
The IRS will tax you a flat 25% on depreciation recapture, regardless of your ordinary income tax bracket.
Any capital gains above and beyond the depreciation recapture is taxed at normal capital gains rates, typically the long-term rate of 15% (or zero if you satisfy the requirements of Section 121).
What you have to know about how Section 121 interacts with depreciation recapture is that Section 121 exclusions and limitations never apply to depreciation recapture.
Section 121 simply ignores depreciation recapture and focuses solely on pure capital gains.
A quick example:
Say you buy a house for $100k. $40k is property value; $60k is land value.
You live there for 2 years. Then you rent it out for 2 years. You make no major improvements during that time. In each of those 2 rental years you should depreciate $1,454.55 of the $40k property value and deduct that from your rental income. $1,454.55 = $40k / 27.5 years.
At the end of 4 years you sell the house for $250k. Your cost basis now is $97,091 = $100k – ($1,454.55 * 2).
You will pay 25% tax on the difference between your original cost basis of $100k and your current cost basis of $97,091, so you’ll pay 25% tax on $2,909 REGARDLESS of what Section 121 says.
Then, having satisfied all the requirements of Section 121, you’ll pay zero taxes on the next $150k of gain, which is the difference between your original cost basis of $100k and the sale price of $250k.
Section 121 won’t help you with depreciation recapture even though you’re still well under the $250k exclusion cap.
All right, big post…and we’re curious what you have to say!
What other tips or strategies do you use to do tax planning for your home?
Let us know in the comments below!