Home sale exclusion - non-qualified use gain

Non-investing personal finance issues including insurance, credit, real estate, taxes, employment and legal issues such as trusts and wills.
Post Reply
Topic Author
fyre4ce
Posts: 2544
Joined: Sun Aug 06, 2017 11:29 am

Home sale exclusion - non-qualified use gain

Post by fyre4ce »

I'm familiar with the rules for exclusion of capital gains on home sale (must have lived in and owned the home for at least 2 out of the last 5 years, $250k/$500k single/MFJ exclusion, detailed specified in IRS Pub 523). But I'm struggling to understand the math for non-qualified use gain. My understanding is that if the period of non-qualified use (eg. rental) occurs before use as main residence, then some of the gain is not excludable. This is to prevent real estate investors from moving into their long-term rental properties for 2 years before selling, in order to get the capital gains excluded. When I work through the worksheet in IRS Pub 523, it's not making sense to me.

Let's say I'm married and have a $500,000 gain (Worksheet 2 Line 7). I owned the house for 5 years, renting it for the first 3 then living in it as my main residence for the last 2. Working through Worksheet 3 Section B...

Step 1 - Enter the amount from Section A, Step 1 or, if you skipped Section A, your gain from line 7 of Worksheet 2: $500,000

Step 2: Enter the total number of days after 2008 when neither you nor your spouse (or former spouse) used the home as a main residence. This number is your non-use days: 1095 (= 365 x 3)

Step 3: Enter the total number of days you owned your home (counting all days, not just days after 2008). This number is your number of days owned: 1825 (= 365 x 5)

Step 4: Divide the non-use days by the days owned. This number is your non-residence factor: 0.600 (= 1095 / 1825)

Step 5: Multiply the decimal from Section B, Step 4, by the amount listed in Section B, Step 1. This number is your non-qualified use gain: $300,000 (= $500,000 x 0.600)


Then, in Section C...

IF... you completed Section B (regardless of whether you completed Section A) THEN your gain that is eligible for exclusion is... your non-qualified use gain, from Section B, Step 5. Your gain that is eligible for exclusion is $300,000

Okay, fine, you would have gotten $500k excluded if the order were {main residence, then rental}, but you only get $300k excluded when the order is {rental, then main residence}. But it seems very odd that the excludable gain is proportional to the non-qualified use factor. Wouldn't it make more sense if the excludable gain were proportional to qualified use? Let's run the example again, assuming you move in 3 years before sale, instead of 2:

Step 1 - Enter the amount from Section A, Step 1 or, if you skipped Section A, your gain from line 7 of Worksheet 2: $500,000

Step 2: Enter the total number of days after 2008 when neither you nor your spouse (or former spouse) used the home as a main residence. This number is your non-use days: 730 (= 365 x 2)

Step 3: Enter the total number of days you owned your home (counting all days, not just days after 2008). This number is your number of days owned: 1825 (= 365 x 5)

Step 4: Divide the non-use days by the days owned. This number is your non-residence factor: 0.4 (= 730 / 1825)

Step 5: Multiply the decimal from Section B, Step 4, by the amount listed in Section B, Step 1. This number is your non-qualified use gain: $200,000 (= $500,000 x 0.4)


Then, in Section C...

IF... you completed Section B (regardless of whether you completed Section A) THEN your gain that is eligible for exclusion is... your non-qualified use gain, from Section B, Step 5. Your gain that is eligible for exclusion is $200,000

It seems like you get less exclusion despite living in the property as your main residence for longer. Either I'm missing something, this is a mistake in the IRS Pub, or this is a loophole in the tax code. Anyone know what's going on?

Edit: Example changed based on feedback below.
Last edited by fyre4ce on Mon Sep 27, 2021 1:05 pm, edited 1 time in total.
pizzy
Posts: 4339
Joined: Tue Jun 02, 2020 6:59 pm

Re: Home sale exclusion - non-qualified use gain

Post by pizzy »

Have you used worksheet 1 to determine your exclusion limit?

And then compared to Worksheet 3, Section D?

https://www.taxpros.org/blog/a-twist-fo ... d-use/4838

Example: An individual taxpayer purchases a home on 1/1/13 and rents it. On 1/1/15, he occupies the property as his primary residence and then sells the home on 1/1/17 for a $200,000 gain. Prior to this law change, the entire $200,000 could have been excluded. However, effective after 2008, the taxpayer would have to apportion the gain between the periods when it was a rental and when it was a personal residence. In this example, he owned it four years, of which time use for two years was nonqualified. Thus, 50% of the gain ($100,000) would be attributable to a nonqualified use period and would not be excludable. As a result, the taxpayer would be able to exclude only $100,000 of the $200,000 gain. Note that had the taxpayer used the home as a second home instead of a rental, the results would have been the same.
Vanguard/Fidelity | 76% US Stock | 16% Int'l Stock | 8% Cash
Topic Author
fyre4ce
Posts: 2544
Joined: Sun Aug 06, 2017 11:29 am

Re: Home sale exclusion - non-qualified use gain

Post by fyre4ce »

pizzy wrote: Mon Sep 27, 2021 12:42 pm Have you used worksheet 1 to determine your exclusion limit?

And then compared to Worksheet 3, Section D?

https://www.taxpros.org/blog/a-twist-fo ... d-use/4838

Example: An individual taxpayer purchases a home on 1/1/13 and rents it. On 1/1/15, he occupies the property as his primary residence and then sells the home on 1/1/17 for a $200,000 gain. Prior to this law change, the entire $200,000 could have been excluded. However, effective after 2008, the taxpayer would have to apportion the gain between the periods when it was a rental and when it was a personal residence. In this example, he owned it four years, of which time use for two years was nonqualified. Thus, 50% of the gain ($100,000) would be attributable to a nonqualified use period and would not be excludable. As a result, the taxpayer would be able to exclude only $100,000 of the $200,000 gain. Note that had the taxpayer used the home as a second home instead of a rental, the results would have been the same.
Good point. In the first example, the maximum exclusion would be available (2 out of 5 years of residence) but in the second it would not, because the residence test would not be met. So I think that rules out those extreme examples.

The math still seems funky though. Suppose the second example were moving in 3 years before sale, instead of two. The maximum exclusion would still be available, and the non-residence factor (Worksheet 3 Section B Step 4) would be 0.4 instead of 0.6. So despite using the property as a main residence for longer, less gain would be excludable.

Edit: The example you cited uses a 50% non-residence factor, which is correct but obscures the problem. If the example were changed to moving in on 1/1/2014, there would be 1 year of non-qualified use and 3 years of qualified use. But that would mean the non-residence factor would be 25% and thus only 25% of the gain would be excludable. So more time as primary residence means less gain exclusion.
TropikThunder
Posts: 3918
Joined: Sun Apr 03, 2016 5:41 pm

Re: Home sale exclusion - non-qualified use gain

Post by TropikThunder »

fyre4ce wrote: Mon Sep 27, 2021 12:56 pm
pizzy wrote: Mon Sep 27, 2021 12:42 pm Have you used worksheet 1 to determine your exclusion limit?

And then compared to Worksheet 3, Section D?

https://www.taxpros.org/blog/a-twist-fo ... d-use/4838

Example: An individual taxpayer purchases a home on 1/1/13 and rents it. On 1/1/15, he occupies the property as his primary residence and then sells the home on 1/1/17 for a $200,000 gain. Prior to this law change, the entire $200,000 could have been excluded. However, effective after 2008, the taxpayer would have to apportion the gain between the periods when it was a rental and when it was a personal residence. In this example, he owned it four years, of which time use for two years was nonqualified. Thus, 50% of the gain ($100,000) would be attributable to a nonqualified use period and would not be excludable. As a result, the taxpayer would be able to exclude only $100,000 of the $200,000 gain. Note that had the taxpayer used the home as a second home instead of a rental, the results would have been the same.
Good point. In the first example, the maximum exclusion would be available (2 out of 5 years of residence) but in the second it would not, because the residence test would not be met. So I think that rules out those extreme examples.

The math still seems funky though. Suppose the second example were moving in 3 years before sale, instead of two. The maximum exclusion would still be available, and the non-residence factor (Worksheet 3 Section B Step 4) would be 0.4 instead of 0.6. So despite using the property as a main residence for longer, less gain would be excludable.

Edit: The example you cited uses a 50% non-residence factor, which is correct but obscures the problem. If the example were changed to moving in on 1/1/2014, there would be 1 year of non-qualified use and 3 years of qualified use. But that would mean the non-residence factor would be 25% and thus only 25% of the gain would be excludable. So more time as primary residence means less gain exclusion.
You’re doing the math backward.
In this example, he owned it four years, of which time use for two years was nonqualified. Thus, 50% of the gain ($100,000) would be attributable to a nonqualified use period and would not be excludable.
The non-residence usage is the portion that is not excludable.
Topic Author
fyre4ce
Posts: 2544
Joined: Sun Aug 06, 2017 11:29 am

Re: Home sale exclusion - non-qualified use gain

Post by fyre4ce »

TropikThunder wrote: Mon Sep 27, 2021 1:17 pm You’re doing the math backward.

The non-residence usage is the portion that is not excludable.
Work your way through Sections B and C. I agree the math seems backwards but that's the way the worksheet seems to do it.
pizzy
Posts: 4339
Joined: Tue Jun 02, 2020 6:59 pm

Re: Home sale exclusion - non-qualified use gain

Post by pizzy »

fyre4ce wrote: Mon Sep 27, 2021 1:20 pm
TropikThunder wrote: Mon Sep 27, 2021 1:17 pm You’re doing the math backward.

The non-residence usage is the portion that is not excludable.
Work your way through Sections B and C. I agree the math seems backwards but that's the way the worksheet seems to do it.
Section D, Worksheet 3 is your answer

Section D. Determine if you have taxable gain.

IF... your gain that is eligible for exclusion from Section C is less than or equal to your exclusion limit from Worksheet 1, Section C

THEN … your entire gain is excludible from your income and you have no gain to report on your tax return.

In other words:

IF... $300,000 is less than $500,000

THEN... $500,000 is excludible from your income and you have no gain to report.
Last edited by pizzy on Mon Sep 27, 2021 1:53 pm, edited 1 time in total.
Vanguard/Fidelity | 76% US Stock | 16% Int'l Stock | 8% Cash
Topic Author
fyre4ce
Posts: 2544
Joined: Sun Aug 06, 2017 11:29 am

Re: Home sale exclusion - non-qualified use gain

Post by fyre4ce »

pizzy wrote: Mon Sep 27, 2021 1:45 pm
fyre4ce wrote: Mon Sep 27, 2021 1:20 pm
TropikThunder wrote: Mon Sep 27, 2021 1:17 pm You’re doing the math backward.

The non-residence usage is the portion that is not excludable.
Work your way through Sections B and C. I agree the math seems backwards but that's the way the worksheet seems to do it.
I thought as long as you used the home as primary residence for 2 out of 5 years, it doesn't matter when the 2 years was?

From IRS 523: "If you owned the home and used it as your residence for at least 24 months of the previous 5 years, you
meet the residence requirement. The 24 months of residence can fall anywhere within the 5-year period, and it
doesn't have to be a single block of time. All that is required is a total of 24 months (730 days) of residence during the 5-year period. "
I don't think this is correct. There are two parts to the calculation. First, you determine the exclusion that you're eligible for. The order doesn't matter for this. Then, you determine the amount of the gain that is eligible for exclusion. If, within the prior 5 years, you have it as a rental for 3 years and then live in it for 2, your gain that is eligible for exclusion is limited, by the worksheet I worked through above. The order matters for this part. If you want to get the maximum exclusion on a rental property, you have to move in and live in it for 5 years (not 2), so Worksheet 3 Section B doesn't apply.
pizzy
Posts: 4339
Joined: Tue Jun 02, 2020 6:59 pm

Re: Home sale exclusion - non-qualified use gain

Post by pizzy »

fyre4ce wrote: Mon Sep 27, 2021 1:53 pm
pizzy wrote: Mon Sep 27, 2021 1:45 pm
fyre4ce wrote: Mon Sep 27, 2021 1:20 pm
TropikThunder wrote: Mon Sep 27, 2021 1:17 pm You’re doing the math backward.

The non-residence usage is the portion that is not excludable.
Work your way through Sections B and C. I agree the math seems backwards but that's the way the worksheet seems to do it.
I thought as long as you used the home as primary residence for 2 out of 5 years, it doesn't matter when the 2 years was?

From IRS 523: "If you owned the home and used it as your residence for at least 24 months of the previous 5 years, you
meet the residence requirement. The 24 months of residence can fall anywhere within the 5-year period, and it
doesn't have to be a single block of time. All that is required is a total of 24 months (730 days) of residence during the 5-year period. "
I don't think this is correct. There are two parts to the calculation. First, you determine the exclusion that you're eligible for. The order doesn't matter for this. Then, you determine the amount of the gain that is eligible for exclusion. If, within the prior 5 years, you have it as a rental for 3 years and then live in it for 2, your gain that is eligible for exclusion is limited, by the worksheet I worked through above. The order matters for this part. If you want to get the maximum exclusion on a rental property, you have to move in and live in it for 5 years (not 2), so Worksheet 3 Section B doesn't apply.
I edited my response.
Vanguard/Fidelity | 76% US Stock | 16% Int'l Stock | 8% Cash
Topic Author
fyre4ce
Posts: 2544
Joined: Sun Aug 06, 2017 11:29 am

Re: Home sale exclusion - non-qualified use gain

Post by fyre4ce »

pizzy wrote: Mon Sep 27, 2021 1:45 pm
fyre4ce wrote: Mon Sep 27, 2021 1:20 pm
TropikThunder wrote: Mon Sep 27, 2021 1:17 pm You’re doing the math backward.

The non-residence usage is the portion that is not excludable.
Work your way through Sections B and C. I agree the math seems backwards but that's the way the worksheet seems to do it.
Section D, Worksheet 3 is your answer

Section D. Determine if you have taxable gain.

IF... your gain that is eligible for exclusion from Section C is less than or equal to your exclusion limit from Worksheet 1, Section C

THEN … your entire gain is excludible from your income and you have no gain to report on your tax return.

In other words:

IF... $300,000 is less than $500,000

THEN... $500,000 is excludible from your income and you have no gain to report.
That isn't how I interpret that section. I think it means: "IF your gain that is eligible for exclusion from Section C is less than or equal to your exclusion limit from Worksheet 1, Section C THEN your entire gain [that is eligible for exclusion] is excludable from your income and you have no gain to report on your tax return."

Otherwise, why even bother with Section B at all? The multiplier in Section B Step 4 is always going to be <= 1, so if the gain before being reduced by Section B is less than the exclusion, it will also be after being reduced, and the taxable gain won't change.

Your interpretation also goes against the Taxpros.org link you gave above. In that example, let's say the maximum exclusion is $250k. Without rental use, the full $200k of gain would be excluded. Section B should reduce the gain eligible for exclusion from $200k to $100k. But on your reading of Section D, $100k is less than $250k, so the entire [$200k] gain would be excludable. No, that doesn't seem right. It means the entire $100k is excludable. The non-excludable $100k is still taxable.

Either way, I think this section is very poorly written.
pizzy
Posts: 4339
Joined: Tue Jun 02, 2020 6:59 pm

Re: Home sale exclusion - non-qualified use gain

Post by pizzy »

fyre4ce wrote: Mon Sep 27, 2021 2:45 pm
pizzy wrote: Mon Sep 27, 2021 1:45 pm
fyre4ce wrote: Mon Sep 27, 2021 1:20 pm
TropikThunder wrote: Mon Sep 27, 2021 1:17 pm You’re doing the math backward.

The non-residence usage is the portion that is not excludable.
Work your way through Sections B and C. I agree the math seems backwards but that's the way the worksheet seems to do it.
Section D, Worksheet 3 is your answer

Section D. Determine if you have taxable gain.

IF... your gain that is eligible for exclusion from Section C is less than or equal to your exclusion limit from Worksheet 1, Section C

THEN … your entire gain is excludible from your income and you have no gain to report on your tax return.

In other words:

IF... $300,000 is less than $500,000

THEN... $500,000 is excludible from your income and you have no gain to report.
That isn't how I interpret that section. I think it means: "IF your gain that is eligible for exclusion from Section C is less than or equal to your exclusion limit from Worksheet 1, Section C THEN your entire gain [that is eligible for exclusion] is excludable from your income and you have no gain to report on your tax return."

Otherwise, why even bother with Section B at all? The multiplier in Section B Step 4 is always going to be <= 1, so if the gain before being reduced by Section B is less than the exclusion, it will also be after being reduced, and the taxable gain won't change.

Your interpretation also goes against the Taxpros.org link you gave above. In that example, let's say the maximum exclusion is $250k. Without rental use, the full $200k of gain would be excluded. Section B should reduce the gain eligible for exclusion from $200k to $100k. But on your reading of Section D, $100k is less than $250k, so the entire [$200k] gain would be excludable. No, that doesn't seem right. It means the entire $100k is excludable. The non-excludable $100k is still taxable.

Either way, I think this section is very poorly written.
Use bigger numbers and I think you’ll see why.
Vanguard/Fidelity | 76% US Stock | 16% Int'l Stock | 8% Cash
humblecoder
Posts: 1531
Joined: Thu Aug 06, 2020 8:46 am

Re: Home sale exclusion - non-qualified use gain

Post by humblecoder »

TropikThunder wrote: Mon Sep 27, 2021 1:17 pm
fyre4ce wrote: Mon Sep 27, 2021 12:56 pm
pizzy wrote: Mon Sep 27, 2021 12:42 pm Have you used worksheet 1 to determine your exclusion limit?

And then compared to Worksheet 3, Section D?

https://www.taxpros.org/blog/a-twist-fo ... d-use/4838

Example: An individual taxpayer purchases a home on 1/1/13 and rents it. On 1/1/15, he occupies the property as his primary residence and then sells the home on 1/1/17 for a $200,000 gain. Prior to this law change, the entire $200,000 could have been excluded. However, effective after 2008, the taxpayer would have to apportion the gain between the periods when it was a rental and when it was a personal residence. In this example, he owned it four years, of which time use for two years was nonqualified. Thus, 50% of the gain ($100,000) would be attributable to a nonqualified use period and would not be excludable. As a result, the taxpayer would be able to exclude only $100,000 of the $200,000 gain. Note that had the taxpayer used the home as a second home instead of a rental, the results would have been the same.
Good point. In the first example, the maximum exclusion would be available (2 out of 5 years of residence) but in the second it would not, because the residence test would not be met. So I think that rules out those extreme examples.

The math still seems funky though. Suppose the second example were moving in 3 years before sale, instead of two. The maximum exclusion would still be available, and the non-residence factor (Worksheet 3 Section B Step 4) would be 0.4 instead of 0.6. So despite using the property as a main residence for longer, less gain would be excludable.

Edit: The example you cited uses a 50% non-residence factor, which is correct but obscures the problem. If the example were changed to moving in on 1/1/2014, there would be 1 year of non-qualified use and 3 years of qualified use. But that would mean the non-residence factor would be 25% and thus only 25% of the gain would be excludable. So more time as primary residence means less gain exclusion.
You’re doing the math backward.
In this example, he owned it four years, of which time use for two years was nonqualified. Thus, 50% of the gain ($100,000) would be attributable to a nonqualified use period and would not be excludable.
The non-residence usage is the portion that is not excludable.
That's what I thought at first. However, I went to the linked IRS Pub and this is what it says

If you completed Section B (regardless of whether you completed Section A) THEN your gain that is eligible for exclusion is your non-qualified use gain, from Section B, Step 5.

This seems backwards to me, too, but that's what the worksheet says if you read the words verbatim.
Topic Author
fyre4ce
Posts: 2544
Joined: Sun Aug 06, 2017 11:29 am

Re: Home sale exclusion - non-qualified use gain

Post by fyre4ce »

pizzy wrote: Mon Sep 27, 2021 3:22 pm Use bigger numbers and I think you’ll see why.
Let's say the total gain is $2M and the exclusion limit is $500k. Only $400,000 is eligible for exclusion due to non-qualified use. Under your interpretation of Section D, $400k < $500k, so the entire $2M gain is excludable and there is no gains to report. That makes even less sense to me.
MarkNYC
Posts: 2999
Joined: Mon May 05, 2008 7:58 pm

Re: Home sale exclusion - non-qualified use gain

Post by MarkNYC »

fyre4ce wrote: Mon Sep 27, 2021 1:20 pm
TropikThunder wrote: Mon Sep 27, 2021 1:17 pm You’re doing the math backward.

The non-residence usage is the portion that is not excludable.
Work your way through Sections B and C. I agree the math seems backwards but that's the way the worksheet seems to do it.
Here is how it would work if the property was owned for 5 years, and the first 3 years it was rental property, and the next 2 years it was a principal residence and then sold for a gain. The depreciation taken during the 3 rental years reduced the basis, and the portion of the gain attributable to that depreciation is carved out first and taxed as a Sec 1250 unrecaptured gain. Then, 3 of the 5 years of ownership is considered nonqualified use so 60% of the remaining gain is not eligible for the principal residence exclusion - 40% of the remaining gain is eligible for the exclusion.

IRS instructions, publications, and worksheets are usually helpful and accurate, but they are not authoritative, are not always correct, and are not the law. The correct explanation of the amount of gain eligible for the exclusion when nonqualified use exists can be found (and easily understood) in the language of the law itself, which is IRC Section 121 (b)(5).
Topic Author
fyre4ce
Posts: 2544
Joined: Sun Aug 06, 2017 11:29 am

Re: Home sale exclusion - non-qualified use gain

Post by fyre4ce »

MarkNYC wrote: Mon Sep 27, 2021 8:17 pm
fyre4ce wrote: Mon Sep 27, 2021 1:20 pm
TropikThunder wrote: Mon Sep 27, 2021 1:17 pm You’re doing the math backward.

The non-residence usage is the portion that is not excludable.
Work your way through Sections B and C. I agree the math seems backwards but that's the way the worksheet seems to do it.
Here is how it would work if the property was owned for 5 years, and the first 3 years it was rental property, and the next 2 years it was a principal residence and then sold for a gain. The depreciation taken during the 3 rental years reduced the basis, and the portion of the gain attributable to that depreciation is carved out first and taxed as a Sec 1250 unrecaptured gain. Then, 3 of the 5 years of ownership is considered nonqualified use so 60% of the remaining gain is not eligible for the principal residence exclusion - 40% of the remaining gain is eligible for the exclusion.

IRS instructions, publications, and worksheets are usually helpful and accurate, but they are not authoritative, are not always correct, and are not the law. The correct explanation of the amount of gain eligible for the exclusion when nonqualified use exists can be found (and easily understood) in the language of the law itself, which is IRC Section 121 (b)(5).
Mark, thanks very much, this is helpful. Sounds like the IRS Pub is inaccurate, as I thought. Thanks for the reference to the governing law. I assume major tax software is set up to calculate this correctly?
tomato2
Posts: 1
Joined: Mon Oct 03, 2022 8:48 pm

Re: Home sale exclusion - non-qualified use gain

Post by tomato2 »

Informative post. fyre4ace and humblecoder, is this the publication you guys read? https://www.irs.gov/pub/irs-pdf/p523.pdf

Section C now says IF... / you completed Section B (regardless of whether you completed Section A) / THEN your gain that is eligible for exclusion is... / your gain from line 7, under Worksheet 2 less your non-qualified use gain, from Section B, Step 5.

I'm wondering, can the IRS occasionally edit their publications? (if errors, etc). I'm new to US taxes (Canadian). Thanks
Topic Author
fyre4ce
Posts: 2544
Joined: Sun Aug 06, 2017 11:29 am

Re: Home sale exclusion - non-qualified use gain

Post by fyre4ce »

tomato2 wrote: Mon Oct 03, 2022 9:02 pm Informative post. fyre4ace and humblecoder, is this the publication you guys read? https://www.irs.gov/pub/irs-pdf/p523.pdf

Section C now says IF... / you completed Section B (regardless of whether you completed Section A) / THEN your gain that is eligible for exclusion is... / your gain from line 7, under Worksheet 2 less your non-qualified use gain, from Section B, Step 5.

I'm wondering, can the IRS occasionally edit their publications? (if errors, etc). I'm new to US taxes (Canadian). Thanks
The IRS update the Pubs every year, and it looks like they fixed this mistake in the latest version. Maybe they read Bogleheads! In general, I find the Pubs to be very useful and pretty accessible, but as has been pointed out, they are neither the basis of tax law, nor inerrant, and this was an example of that.
Post Reply