– Hi guys, this is TobyMathis, from Anderson Business Advisors, and today we'regonna talk about nothing but selling your house,and when I say your house, I mean something that you'velived in, in the last two years as a personal residence or,excuse me, last five years that you had two of the five years as your personal residence.

So what we're really lookingat, is something that you have lived in as your primary,personal residence; not a vacation house,or anything like that.

Something that you actuallylived in as your primary residence, and, we'll goahead and go over the tests because there are someexceptions, but we're just gonna start from the basis thatyou need to have lived in it 24 of the previous 60months before you sold it.

And then we'll go over whatall the exceptions are, et cetera, for that.

So first thing to know: allassets that you own, whether it's a car, your house, anythinglike that, is considered a capital asset, and whenyou sell it, if it's gone up in value, or if youwrote it off completely and it's gone up in value,you're gonna have some amount of taxable gain.

So if you bought yourhouse, and we'll talk about how to do the calculations,but if you bought a house, and it's gone up in value,you're gonna have some sort of capital gain.

If you lose value, if youused it for personal use, you don't get to write it off.

That's whey if you buy a houseand it tanks, you sell it, you don't get any benefit.

If you buy a rental property and it tanks, you get to take the benefit.

If you buy a house, convertit to a rental property, then it tanks, you get to write it off.

If you buy a house, live init as your private residence, and it tanks, and then youconvert it to a rental, then you sell it, not the same thing.

There's all little variations,but I hope you guys get the gist: capital gainsis what we're talking about when you sell an asset.

For homes, there's anexclusion to the capital gains.

It's found in internal revenue code 121.

That's why they call it a 121exclusion, and this is the part of the code thatsays, if you've lived, and you meet a certaintest, if you own the home, and you lived in it as yourprimary, personal residence for two of the precedingfive years, you have a capital gains exclusionof, as a individual, up to $250,000, as a marriedcouple filing jointly, up to $500,000.

So in English, I buy a house for $100,000, my spouse, and own itfor 10 years, lived in it always as my personalresidence, and I sell it for $600,000, I'm gonnapay zero capital gains, because, when you lookat the lookback period, this five year period, didyou live in it two of the last five? Yes.

Was it your primaryresidence during that period? Yes.

Great, then we have this excludement.

Do we have any periodsof non-qualified use? In other words, did you rentit out any period of time? No.

Then we don't have to worry about it.

Great.

100% exclusion.

That $500,000 of gain is excluded.

You don't have to report the gain.

You pay zero capital gains tax.

That's why it's so powerful.

So first off, I'm gonna contrast this, this 121 exclusion, whichis for the house that you lived in– Keep in mind, primaryresidence, two of the last five years.

It's not the last two years.

It's two of the last five.

So in theory, I could havelived in it for a number of years, and thenrented it for five years, and I would still get my 121 exclusion.

It's capital gains exclusion.

If I rented it for threeyears, there's a good chance that I would have depreciation.

That is not part of the equation.

I do not get to avoid depreciation.

For you guys that had homeoffices, that where you did the home office deductionas a sole proprietor, that's also considered depreciation.

You also get to recapture that.

So there's some littlepoints in here that, and that can make itcomplicated, which is why it's so important that youlisten to these types of videos, 'cause there's lotsof little pieces to it.

And you're gonna see that theexceptions and the variations can get maddening at times,but what we're lookin' at is in, in the last fiveyears that I owned it, did I meet the use test? In fact, I actually used a step-by-step, so I say, step numberone will be like, hey, what do I get, like,what will automatically disqualify me? Like what things wouldmake it to where I do not get to use 121? Number one, if you're an expat.

You don't get to, infact, what do they say, you are subject to the expatriation tax.

You're done.

You don't get to take the 121 exclusion.

How about, I 1031 exchangeda property, and now I've lived in it, butI have not lived in it for at least five years? Or let's see, that youacquired the property in exchange in the last five years.

You're done.

You do not get to take this.

If it's longer than that, youcan actually still qualify.

And then if you don't meet the use and ownership test, thenyou do not get to take the 121 exclusion.

Now, to that last test,the use and ownership, there are some exclusions for partial use, where there are someperiods of time where we can actually defer, which iswhen you are active military, peace corps, things likethat, and you get deployed.

And we'll go over that.

But, the first thing isto look at this and say, first off, do I fall intoone of these exclusions? If I do not follow intoone of the exclusions, then I can start lookingand I'm gonna be able to work underneath the statute, the 121, and I might be able to exclude.

Then we look at the limitations.

It's not 100% of the gain,it's not a percentage, it's a dollar amount,and so if you're single, the dollar amount of capitalgains you can exclude is $250,000.

If you are married filingjointly, the exclusion is $500,000, but, bothspouses must meet the use and ownership test.

This is where it gets funky.

What if you get a divorce,and you give the house under a decree, to your spouse? Guess what? You no longer meet the usetest, if you're the one who got rid of it.

The person who is sellingcould actually use your use and ownership as part of their time.

I mean your use, 'causethey're the owner now.

So let's say that I getdivorced from my spouse, spouse takes the property,spouse sells the property.

They can use, the groupof us, even just mine, if I'm the divorced spouse,they can use my use, but since the ownershipis just in the spouse that cut the property, if it'sin their name underneath the decree, and they transferthat property into their name, they're the only onewho can have ownership.

So you, as the person whodivorced, it's not your exclusion.

It's their exclusion,but they can use both.

They can use both to qualify.

Now if it's just them, what do we have? We have a $250,000 exclusion.

If you guys are tryingto do it for yourselves, then when you divorce,you better make sure you're both listed on that property, and they're gonna calculateup, you still have to meet the use and ownership test.

You're both owners.

Now you both have to meet that use test.

So you're gonna add you bothup, which can be a very– That could be a boon, orit could be a horrific mistake if the lawyer doesn't catch it, and you guys transfer title to somebody.

There's a few others, which we'll go over.

But we look at it and wesay, are you the owner? And what they look atis if you owned the home for at least 24 months,two years, out of the last five years, leading upto the date of sale, you meet the ownership requirement.

For a married couple,if you're still married, only one spouse has to meetthe test for ownership.

You still both have to meet per use.

And that's the next stepis where we look at it and say, what is it used? It has to be your primary residence.

So here's where it gets fun.

If you did, then, andthe 24 months can fall anywhere in that fiveyears, then it has to be your primary, personal residence.

So some people havetwo personal residence.

It has to be the primary,and they actually do some tests, and so they'realways gonna look and say: where did you actually stay? Now there are some exceptions,if you can't take care of yourself and things likethat, but we're not gonna get that into that.

That's for somebody who hasto, who needs assistance and actually has to beremoved from the home for reasons, which we'll getinto, but, let's just say for general purposes, youmust own it and have used it as a personal residence.

You have to own it at thetime that you're selling it.

You have to have used itas a personal residence in 24 of the, or two yearsof the previous five.

And we look back, and wesay are there any exceptions to that eligibility,and that's where we have some exceptions, and so let's take a look.

A separation or divorce duringthe ownership of a home, and then we take a look, like,that's gonna be exception for the use, not the ownership.

So again, if you no longerown the house, and it sells, it's not your exclusion,it's the spouse that owns it.

If you both still own it,you're both still on title, then we can add it upand you guys can actually both get your exclusion.

Death of the spouse, andthen you have a period, you have a two-year windowof where you would sell it and they would treat it asthough you would be able to take advantage of both spouses as owners.

Vacant land would becarved out potentially, if it was used as part of your residence.

So like, if you had a bigyard, and you sold part of the yard, then it maybe part of your exclusion.

You might be able to get a portion of it.

And finally there's someother exceptions, but we won't get into those right now.

I just wanted to touchon each one of those.

If you are spouses, andyou don't make up and you don't meet the 24 monthtest, and you're looking back at the use, what theywould do is they would say, we're gonna treat you eachas single individuals, so the spouse that livedin it previously that still owns it, and you'reselling it, so you know, example, I lived in ahouse, I get married, we sell it a year after we getmarried, and they would say: oh, you're not completelytoast, you're not completely excluded, you would just treatyou each as single people and so my use and ownership,I might meet it, so I might get a $250,000 exclusion,even though we're married, filing jointly.

I don't get the full 500,but at least I get the 200, or the 250.

And let's say that it'sjumped up in value, and I meet one of the exclusions tothat eligibility test.

The exclusion, like wehad to move for work, or for health or go over what those are.

Then even my spouse, eventhough, let's just say she did not live in it fortwo of the last five years, she would fall under oneof the exceptions for a partial exclusion, thenyou would get hers as well.

So, there's always little nuances.

Like I said, this stuff can get maddening.

If anybody ever says, "Oh,it's just straightforward "and easy.

", it is not.

I assure you.

So then we look at the limits.

And so we look and say,do you meet the use and ownership test? And then let's take a lookand see, are there any periods of disqualified use? And here's what I'm talkin' about.

Disqualified use kinda goeslike this: I'm a landlord.

I own my rental property,and then some smart lawyer says, hey make it your house.

And if you sell it, youhave this big exclusion.

Okay, I have a period of disqualified use.

So let's say that I hadit a rental for 10 years, and then I lived in itfor two, and I sold it.

I would have a large portionof the gain disqualified.

The 10 compared to the two.

That's the proportionalityand they would say, hey you're gonna get atwo 12th portion of the exclusion, because youlived in it, when we add up all the days, and they actuallygo by days, not by months.

You go by days, and yousay, what portion of it was the residence, and what portionof it was used for business? So, there's a big portionthat could be disqualified, and we call that disqualifieduse, that's gonna give you a partial exclusion.

The other portion is, like,things that will automatically exclude you, is you'reonly allowed to take the 121 exclusion once every two years.

So, I can't have a housethat I lived in for two years as my primary residence, buyanother one, live in that two years, and then sellthem both in the same year and expect my exclusion.

I get to take oneexclusion every two years.

What I would have to dois sell one of the houses, make sure that I'm stillqualifying for the other one, and then wait two years and sell another.

There's people that do that,and they use the exclusion every two years.

If you try to sell one within two years, it's just an automatic denial.

That's just an automatic exclusion.

The other exclusion, as wetalked about, was if you 1031 exchange within five years.

Just done.

You 1031 one of your rentalproperties and then you moved in it for two years,and then you sell it, you 1031'd within five years, done.

You don't get to use the 121 exclusion.

You're just done.

And then the other wayis just to fail the use and ownership test, in whichcase, there, we have some exceptions, what we callpartial exclusions that we could use.

So just kinda step numberone, going all the way back to the beginning, is youdetermine whether there's things that automatically keepyou from qualifying, assuming that you're not anexpat, that you didn't just 1031 exchange it, that um,you haven't done an exchange within the last 24 months,then we're gonna take to step number two which is tolook at the use and ownership test, and we're gonna go through that.

We're gonna determinewhether there's a period of disqualified use, andwe're gonna calculate all this fun stuff.

Remember, this is only for capital gains.

So, there might be somedepreciation that gets to be recaptured, and when you do the worksheet, when you actually lookat what the IRS requests when you actually do thecalculations, you're gonna see that that gets excluded from gain.

And I'll go over how youactually do the calculation here in a second.

And that portion's gonna besubject to divided recapture.

So again, going back to theexample of: I owned it as a rental for 10 years,then I lived in it for two, then I sold it, there's10 years of depreciation.

That's not part of the gain.

That actually comes off thetop, and that's subject to depreciation recapture, whichwould be at 25% right now.

That would be subject to that taxation.

I can exclude a portion of the gain.

Like, I don't just lose it.

I would get two 12thsunder that example of the gain excluded.

So there's always thesekind of exceptions.

The other area of exceptionis if I was forced to move.

So let's say that Iowned it, and I sold it, but I didn't meet the use test.

Then there are a few exceptionsand this is when we look and say do I get a partial exclusion? And here's the partial exclusions.

So, this scenario is,I lived in the house.

I lived in it for a yearas my primary residence, and then I had to sell thehouse because I was forced to move for work.

And if you worked, thenit's gonna be at least 50 miles farther than the old location.

50 miles farther from your home.

So it's not just 50 miles away.

It's 50 miles farther awaythan your old location, and so, let's say thatyou had a house, and you commuted 15 miles to work.

The new house needs to beat least 65 miles away.

Hope that makes sense.

And then I can get a partial exclusion.

So if I'd be entitled to a$250,000 exclusion if I had lived in it for 24 months,but I only lived in it for 12, then I would get a $125,000 exclusion.

I would get half of theexclusion, 'cause I lived in it half of the time.

That's the partial exclusion.

A health related move willwork also, and that's if you had to do it tofacilitate a diagnosis, to cure some health issue,or if you had to care for family members, and thefamily members can be a child, grandparents.

They actually have a list:brother, sister, mother-in-law, aunt, uncle, nephew, niece,all these things could be included.

And then they have some catch-alls.

They say unforeseeable events,and so unforeseeable events can be the death of aspouse, could be a divorce or separation, those thingswould might allow you.

So if you buy a house andthen your spouse pops on you that they wanna get divorced,and you sell it a year after you guys move in it,you didn't meet the 24 months, but you have ownership.

You guys both on ownership,but then the use wasn't, you'd get a partial exclusion,if that was the cause for the move.

If you have twins, triplets,quadruplets, quintuplets, you know, you just keep going.

If you had more thanone child unexpectedly, then that's gonna giveyou grounds, also, for a partial exclusion.

And then if you lost a jobor something like that, that could also giveyou a partial exclusion.

Other facts and circumstances,they would look at, basically this is whereyou throw the kitchen sink at 'em, saying hey we didn'tanticipate something occurring, and this is the reason wehad to move, and you can try your best on that oneto get a partial exclusion.

I've never seen too manyof those come along, but they do happen.

Now here's another littlething: there's a few points of clarity if you've beenusing your house at all as a personal residenceafter you've been renting it, or if you rented it afteryou used it as a personal, after the personal use,because they're treated very differently.

So first off, we'll go to thefirst thing we were talking about which is the disqualified use.

If you'd used it as a rentaland you had a rental property then you moved into it,the period of the rental is disqualified use, as we talked about.

However, if you use it asyour personal residence, your primary, personalresidence for two years, and then rent it afterthat, and then sell it, as long as that sale is withinthree years, so that you still meet the two out of five,that portion doesn't count.

We don't count that.

Put another way, if I'velived in a house for 20 years, and then I decide I'mgoing to rent it out, and I rent it out for less thanthree years, the way the rule is written is they don'tcount that as disqualified use so long as the date thatyou sell two of those last five years, you used itas your primary residence.

They don't count thatportion as disqualified use.

So, in one case, somebodyhas it as a rental, they move into it, and theyuse it for their personal residence for two years, then they sell.

There'd be a period ofdisqualified use that would mean that they'd lose a substantialportion of the exclusion.

So, let's just use round numbers.

I rented it for two years,lived in it for two years, sold it, so I owned it forfour years total, I would get half of the exclusionthat I'm entitled to.

So a married couple,married filing jointly, they'd have a $250,000 exclusion.

A single person wouldhave a $125,000 exclusion.

You just cut the numbers in half.

There's another portionof that, of course, which is the depreciation, if they depreciated that property.

That's not part of thegain, that's not part of the exclusion, that's depreciation recaptured.

It's actually 25%, soyou'd end up having to do that calculation.

If, let's flip it around, Ilived in it for two years, then rented it for two years and sold it, and I only owned it forfour years, I get 100% of the exclusion, 'causewe don't count those years after I lived in it asmy primary residence, so the one, the reason that rule is there, is to prevent landlordsfrom just going in and moving in to their housesfor two years and selling, and every two years justselling one of their properties that may have substantial appreciation.

They just wanna– They don't want anybodyto be gaming the system in that way.

Now, where it's fullyallowed, and the IRS actually has the calculationwritten out on its website, it is when you have appreciation,that's far in excess of what you're allowed to take.

So for example, in the,let's say you're in San Jose, or San Francisco area,where you've had this big, huge run up and you buya house for $500,000, 10 years ago and nowit's worth 2.

5 million.

So if you were to sell it,you'd have two million dollars of gain, and you might beable to exclude $500,000 of it if you're married, filing jointly, if you're following me.

So, you meet the use andownership test, you get the full exclusion, but it's not enough.

It's a half a milliondollars that's just gonna put a, just a little dent.

So you paid half a million,you got two million dollars in gain, so you're gonna get– You're gonna get exclude $500,000 of that.

You're still gonna pay a big chunk of tax.

If you want to avoid all thegain, here's how you do it, and they spell it out.

You would take the house that you lived in as your personal residence,and you'd convert it into a rental, and I wouldsuggest that you rent it for at least a year.

There's not a hard and fast rule on that.

You just have to make itinto a rental property, an investment property.

Once it's an investmentproperty, it can qualify under 1031 exchange.

So, you're allowed to goout and buy other investment properties with it.

Now it doesn't mean you cango out and buy another house you're gonna live in, but you could buy investment properties andafter a while make those into your personal residence.

Again, you work witha tax advisor on this, but you could exclude the1.

5 million dollars in gain.

So, I could actually takea house, I've lived in it for five, you know say,lived in it for five years, it's a highly appreciated,half a million dollars of gain, we're gonna get to write offhalf of it, and I want to avoid the gain on the other half.

I could convert that into arental property, rent it to somebody, and what am Igonna do in the meantime? You could either go renta house, you can go and buy another house, becauseyou're allowed to use the 121 exclusion every twoyears, but you don't have to live in it the day that you sell it.

It doesn't have to be yourprimary, personal residence the day you sell it.

You just have to havemet the use and ownership requirements of two out offive years prior to sale.

So then you would sellthat, say a year later, and you would be ableto 1031 exchange it into other properties.

And then those otherproperties, after you buy them, technically, you couldactually go and move into those at some point and make 'eminto your primary residence.

You'd probably say let's justkeep 'em as rental properties.

Let's go buy a bunch ofrental properties and go buy another house that youcould live in, or rent another house if you wanted to livein it or just, you know, if you're in this situation,chances are you have the means to go out and buy anotherhome, and you wouldn't have to worry about it.

But, you can avoid the gainentirely if you want to.

So it is a possibility.

Last thing is how youactually calculate gain.

And so as you've heard mesay, depreciation is not included in the capital gains exclusion.

So the way the IRS has youdo the test, is they say what is your basis? You've gotta calculate up your basis, and I'll go over that in a second.

You take the gain, and yousubtract the basis off the gain and that gives you a number.

I mean the total sale minusthe basis is gonna give you your gain, kinda the first level of gain.

They say write down thisnumber, then you exclude from that gain any depreciationrecapture that comes from having done your house asa home office, or having taken deprecation if itwas an investment property.

So, if you have any of thosenumbers, let's say you had $500,000 of gain, but youhad $25,000 of depreciation recapture, you no longerhave $500,000 of gain for purposes of this section,you have $475,000 of gain, and then you'd actually takethat $25,000 of depreciation recapture and recognizeit on your schedule D.

So, there's a portion ofit that would be excluded from tax, and then you'dhave a 25% tax on that depreciation recapture.

The way you calculateall these things, and the most important numbers are:what are you selling it for? It doesn't have to just be cash.

It could be other propertiesthat you get in exchange or other services that you,you figure out what's the actual sale price? 99.

9% of the time, it'sjust gonna be cash.

It's gonna be, you know, I'mselling it for US currency and it's easy to calculate.

Make life, your world moredifficult is to try to add bitcoin.

I don't even know anyescrow companies that really wanna deal with that rightnow, but whatever you do, whatever you exchange,whatever the value is, is what your sale priceis, and then from that you remove the basis, andbasis is what you purchased the property for, plus we getto add things into it, and like, that add into it isyour fees and closing costs.

For example, abstractfees, utility services that you had to pay, recordingfees, survey fees, transfer.

You may have paid these whenyou bought the property, but they get added in to your basis.

You never got to write them off.

Construction, you would addin the cost of labor materials on any construction that youdid, even if you had to pay real estate taxes up throughthe date of the sale date, if you were paying it forsomething that you paid to the seller, for example:hey, I'm gonna pay off some of the taxes, youdidn't get to write that off, 'cause you didn't own it.

So you would just add it into your basis.

Bank, or back interest,even recording fees, if you agreed to pay someof the closing costs, and even if you paid someof the sales commissions, like, hey I really wantthis house and they shifted them over to you.

That gets added into your basis.

Don't forget to calculate that.

Big things that are exampleof improvements that we see some people miss, and I'mgonna go through a whole bunch, just to make sure thatyou're filling your head in with what things get addedinto basis, 'cause this comes right off the gain.

This is something you immediatelywrite off, so it's like, makes life easy if we havezero net gain, and we don't have to worry about anything, right? Additions are anything thatyou added as a bedroom, bathroom, deck, garage, a porch, a patio.

Any of that stuff getsadded into your basis.

Your lawns and grounds, yourlandscaping, if you added a driveway, walkways,fences, retaining walls, swimming pool, any of thatgets added into your basis.

Systems like your heatingsystems, air conditioning, furnace, duct work, centralhumidifier, air filtration, water filtration, wiring,security system, even if you put in a sprinkler system for your lawns, all that stuff goes in.

Plumbing is your septicsystem, your water heater, soft water, if you livein, like I do in Las Vegas, everybody has a soft water system.

All that gets added into your basis.

Interior, if you have builtin appliances, those got added into your basis.

Kitchen modernization, ifyou upgrade your, you know, the doors on all yourcabinets, that type of thing, flooring, wall-to-wallcarpeting, all that stuff comes in.

Fireplaces, even if you putin insulation into your attic or into your garage.

Some people are doing thatnow underneath the floors, pipes, all that stuff, ifyou're in, all that gets added.

Big things that you mightdo outside, satellite dish, and your siding, evenputting on a new roof.

All that gets added in to your basis.

And so when you're calculatingout what gain you have, you gotta know what's thesale price minus what's the sale price minus what thebasis is, and that's gonna give you your primary number.

If you did not, if younever rented out your house, or if you never used a homeoffice, or even if you did, you did not take the deduction.

In other words, you didn'tdo it on your schedule C during the period of timewhen we had the dividend, they consider that adividend, which isn't anymore, but if you did in the pastfive years or so, you may have some dividend recapture,and this does not include reimbursements that you took.

Like if an employerreimbursed you for the use of your house, that doesn'tget reported anywhere.

That's not depreciation recapture.

But if you did not haveany of that, or if you did rent your house out, but you did, you took zero depreciationthen you don't have to worry about it.

You just use the capital gains exclusion that you have under 121.

I hope that this helps,and I hope that you realize that anybody who says,"Oh 121 exclusion, this is "what it is.

", it's not.

There are lots of little exceptions.

We didn't even, like there'ssome crazy ones that are out there, I don'twanna bend your head on, but if you're a member of theservice and things like that, we can actually have periodsof deferment that are up to 15 years that wecan stretch the test on.

Even if you're deployedfor 10 years, we can still go back and capture this.

So, the point of this is just to know that 121 is a boon if you'reselling a house you don't wanna pay capital gains.

If you have too muchappreciation, you can actually couple this with your 1031exchange, or actually do the 121 exclusion plus the 1031 exchange.

Way it works is the 121exclusion gets added into basis, so if you have the 2.

5million dollar house that you bought for $500,000, the newbasis and the new properties is a million.

You get to use the 121exclusion and the $500,000, hit a million.

You get to, if you'rerolling it into other investment properties, you exclude the 1.

5 million dollars gain.

It's amazing, 'mazing tool,but there's a lot of different nuances to this that makesit something that you really should have somebodyrun the numbers with, for you, doing it.

But I hope that helps.

Toby Mathis with AndersonBusiness Advisors.