Be In The Know

rss logo RSS Feed
Buying | 65 Posts
Real Estate News | 43 Posts
Selling | 45 Posts
October
19

If you sell your main home at a gain, the IRS says you may be able to exclude up to 250,000 dollars of that gain from your income, or up to 500,000 dollars if you file a joint return with your spouse. To qualify you must pass an ownership test and a use test. You must have owned the home for at least 24 months and lived in it for at least 24 months during the 5 years before the sale.

That is the short version, and the rest of this guide fills in what it leaves out. If you are weighing homes for sale in Rockford or thinking about selling the one you own, the exclusion is a federal tax rule and it works the same way in Rockford as anywhere else in the country. Gambino Realtors is a Rockford brokerage that has been in business since 1923, and it is not a tax adviser. Everything below comes from the IRS itself: Topic no. 701, Topic no. 409, and Publication 523 for 2025, which is titled Selling Your Home. Read it as an explanation of what those pages say, then take your own numbers to a tax professional.

The Two Tests, And The Calendar They Run On

Start with the words the IRS uses. The exclusion applies to the sale of your principal residence, which Publication 523 calls your main home. The publication is blunt about it: an individual has only one main home at a time. If you own and live in just one home, that property is your main home. If you own or live in more than one, the IRS applies what it calls a facts and circumstances test. The most important factor is where you spend the most time. Other factors count too, and the more of them that are true of a given home, the more likely it is your main home. The publication lists them. They include the address on your U.S. Postal Service records, your voter registration card, your federal and state tax returns, and your driver's license or car registration. They also include whether the home is near where you work and where you bank.

The type of building does not decide the question. Publication 523 says the exclusion can apply to many kinds of housing. A single-family home, a condominium, a cooperative apartment, a mobile home and a houseboat can each be a main home.

Now the two tests. The ownership test asks whether you owned the home for at least 24 months out of the last 5 years leading up to the date of the sale. The use test asks whether you used it as your residence for at least 24 months of the previous 5 years. Both tests are measured over the same 5-year window, which ends on the date of the sale. The IRS gives you some room inside that window. The 24 months of residence can fall anywhere within the 5 years, and they do not have to come in one block. Publication 523 says all that is required is a total of 24 months, which it also states as 730 days. You can also meet the ownership test and the use test during different 2-year periods, as long as you meet both inside the 5-year window.

Those two stretches add up to 24 months of residence. Nothing in the IRS pages requires the stretches to touch each other. This is an illustration of the counting rule, not a ruling on anyone's situation, and the full 5-year window still has to contain both the ownership and the residence.

Short absences are treated generously. A vacation or other short absence counts as time you lived at home, even if you rented the home out while you were gone. There is also a rule for people who become physically or mentally unable to care for themselves. If you used the home as your main home for at least 12 months in the 5 years before the sale, time you spend in a licensed care facility, such as a nursing home, counts toward the 2-year residence requirement. The facility must have a license from a state or other political entity to care for people with your condition.

Married couples face a split rule that is easy to miss. For a joint return, only one spouse has to meet the ownership test. But each spouse must meet the residence test individually to get the full exclusion. Publication 523 puts the joint limit this way: the 500,000-dollar figure applies when both spouses meet the residence and look-back requirements and one or both meet the ownership requirement. A single filer, or a married person filing separately, gets the 250,000-dollar limit by meeting the residence, ownership and look-back requirements.

The look-back requirement is the third leg. It asks whether you sold another home during the 2-year period before this sale and took the exclusion on it. If you did not sell another home in that period, or you did but did not take the exclusion on that gain, you meet the look-back requirement. The IRS summarizes it in one sentence: you may take the exclusion only once during a 2-year period.

Two things shut the door completely, according to the first step in Publication 523. A home you acquired through a like-kind exchange, also called a section 1031 exchange, during the past 5 years is not eligible. Neither is a sale by someone who is subject to expatriate tax. The publication adds a related note about exchanges. A main home is not itself available for a like-kind exchange, because that kind of exchange must involve real property held for productive use in a trade or business or for investment.

One more preliminary point concerns the date. The IRS uses the date of sale to count the 5-year window backward. If you received Form 1099-S, the date of sale appears in box 1. If you did not receive that form, the date of sale is the earlier of two dates: the date the title transferred, or the date the economic burdens and benefits of ownership shifted to the buyer. The publication notes that in most cases these two dates are the same. Publication 523 also describes the ownership period as running to the date of sale, or date of the closing.

When The Limits Change: Spouses, Service Members And Partial Exclusions

The two numbers, 250,000 and 500,000 dollars, are the headline. The IRS pages also describe several situations that change the numbers or the clock. Each one is a rule with specific conditions, so it helps to see them one at a time.

Start with a surviving spouse. Publication 523 says that if you do not meet the 2-year tests on your own and you have not remarried at the time of the sale, you may include the time when your late spouse owned and lived in the home. The exclusion can also rise from 250,000 dollars to 500,000 dollars, but only if all four of these conditions are true. You sell the home within 2 years of your spouse's death. You have not remarried at the time of the sale. Neither you nor your late spouse took the exclusion on another home sold less than 2 years before this sale. And you meet the 2-year ownership and residence requirements, counting your late spouse's time where that applies.

Separation and divorce get their own paragraph in the publication. If you were separated or divorced before the sale, you can treat the home as your residence if you are a sole or joint owner and your spouse or former spouse is allowed to live in the home under a divorce or separation instrument and uses it as a main home. If the home was transferred to you by a spouse or ex-spouse, you can count any time that person owned it as time you owned it. You still have to meet the residence requirement on your own. A related rule applies when the transfer itself is part of a divorce settlement. In that case the IRS generally treats the transfer as producing no gain or loss, and Publication 523 says the rest of the publication does not apply to the transfer. The exception is when the spouse or ex-spouse is a nonresident alien.

Military and similar service has its own rule, and it is one of the more generous ones. A member of the Uniformed Services, the Foreign Service or the intelligence community can elect to suspend the 5-year test period for up to 10 years. The suspension applies while the person is on qualified official extended duty. The IRS defines that as being called or ordered to active duty for an indefinite period or for a definite period of more than 90 days, and serving at a duty station at least 50 miles from the main home or living in government quarters under government orders. The election is made by filing the tax return for the year of the sale and excluding the gain.

The limits on the election are spelled out. The suspension cannot last more than 10 years. Together, the 10-year suspension and the 5-year test period can be as long as 15 years but no longer. You cannot suspend the 5-year period for more than one property at a time, and you can revoke your choice at any time. Publication 523 gives a worked example. A person bought and moved into a home in 2016 and lived in it as a main home for 3 and a half years. For the next 6 years the person did not live there because of qualified official extended duty with the Army. The home was sold at a gain in 2025. By suspending the test period for those 6 years, the person's 5-year window becomes the 5 years before the duty began. Inside that window the person owned and lived in the home for 3 and a half years, which is more than the 2 years the tests require.

Not everyone who falls short of the tests loses the exclusion altogether. Publication 523 describes a partial exclusion. You can still qualify for part of it if the main reason for the sale was a change in workplace location, a health issue or an unforeseeable event. Each category has its own list.

For a work-related move, the IRS gives two situations. In the first, you took or were transferred to a new job in a work location at least 50 miles farther from the home than your old work location. The publication's own example has an old work location 15 miles from the home and a new one 65 miles from it. In the second, you had no previous work location and began a new job at least 50 miles from the home. Either situation can also be true of a spouse, a co-owner of the home, or anyone else for whom the home was their residence.

For a health-related move, the qualifying reasons are these. You moved to obtain, provide or facilitate the diagnosis, cure, mitigation or treatment of a disease, illness or injury for yourself or a family member. Or you moved to obtain or provide medical or personal care for a family member suffering from a disease, illness or injury. Or a doctor recommended a change in residence because you were experiencing a health problem. The publication defines family member broadly, and the list runs from parents and grandparents through children, siblings and in-laws to uncles, aunts, nephews and nieces.

For unforeseeable events, the publication lists a home that was destroyed or condemned, a casualty loss from a natural or man-made disaster or an act of terrorism, and several events involving the owner or anyone else for whom the home was their residence. Those events are a death, a divorce or legal separation, the birth of two or more children from the same pregnancy, eligibility for unemployment compensation, and an inability to pay basic living expenses because of a change in employment status. An event can also qualify if IRS published guidance determines it to be unforeseeable. If none of these standard situations fits, the publication says you may still qualify based on facts and circumstances. The important factors are whether the situation arose while you owned and used the home as your residence, whether you sold not long after, whether you could have reasonably anticipated it when you bought, whether you began to have significant financial difficulty maintaining the home, and whether the home became significantly less suitable as a main home for a specific reason.

A partial exclusion is a fraction of the full one, and the formula is on the IRS worksheet. First find the shortest of three periods: your time of residence in the home during the 5 years before the sale, your time of ownership, and the time that has passed since you last sold a home for which you took the exclusion. Divide that shortest period by 730 if you are counting days or by 24 if you are counting months. Multiply the result by 250,000 dollars. For a joint return, repeat the steps for the spouse and add the two results. As a pure arithmetic illustration, a shortest period of 12 months gives one half, and one half of 250,000 dollars is 125,000 dollars. That is the formula at work, not an IRS example and not a prediction about any real sale.

Vacant land next to the home has a separate rule. You can include the sale of vacant land adjacent to the land on which your home sits as part of the home sale if three conditions all hold. You owned and used the land as part of your home. The sale of the land and the sale of the home happened within 2 years of each other. And both sales either meet the eligibility test or qualify for partial benefits. If all that is true, the two sales are treated as a single transaction, which means the exclusion can be applied only once.

What Counts As Gain: Basis, Closing Costs And Records

The exclusion applies to gain, so the question that comes first is how much gain there is. The IRS lays out the arithmetic in three lines. Take the selling price and subtract selling expenses to get the amount realized. Subtract your adjusted basis from the amount realized. A positive number is a gain and a negative number is a loss.

The selling price is everything you received. The publication's worksheet includes all money, the fair market value of any other property or services received (digital assets are named), the value of debts the buyer agreed to take over, real estate taxes the buyer paid on your behalf, and any amount you received for granting an option to buy that was exercised. Payment for personal property is left out. So is a payment or reimbursement from an employer because of a job transfer, which the employer reports as wages. Selling expenses are the costs directly tied to the sale. The worksheet's examples are sales commissions, such as a real estate agent's commission, and advertising fees. If you received Form 1099-S, the gross proceeds appear in box 2.

Adjusted basis is where most of the work happens. Generally an asset's basis is what it cost its owner. For a home, you then add the cost of improvements and make a few other adjustments. Publication 523 defines an improvement as something that adds to the value of the home, prolongs its useful life, or adapts it to new uses. Its list of examples is long. It covers additions such as a bedroom, bathroom, deck, garage, porch or patio. It covers lawn and grounds work such as landscaping, a driveway, walkway, fence, retaining wall or swimming pool. It covers systems such as heating, central air conditioning, a furnace, wiring, a security system and a lawn sprinkler system. It covers exterior items such as a new roof, new siding and storm windows and doors. And it covers interior items such as built-in appliances, kitchen modernization, flooring, wall-to-wall carpeting and a fireplace.

The publication also says what does not count. Repairs and maintenance that keep the home in good condition but do not add value or prolong its life stay out of basis. Its examples are painting, fixing leaks, filling holes or cracks and replacing broken hardware. The cost of an improvement that is no longer part of the home also stays out, and the IRS gives wall-to-wall carpeting that you later replaced as its example. The same goes for an improvement with a life expectancy of less than 1 year when it was installed. There is one exception that works in the owner's favor. When repair-type work is done as part of an extensive remodeling or restoration job, the whole job is considered an improvement. The publication's example: replacing a broken windowpane is a repair, but replacing the same window as part of replacing all the windows in the home counts as an improvement. Casualty repairs work a little differently. Money spent on repairs that restore the property to its condition before the casualty increases basis, but basis must be reduced by any insurance reimbursement you received or expect to receive.

Energy credits are a place to be careful. If you put the cost of an energy-related improvement, such as a solar energy system, into your basis and you received tax credits or subsidies for it, the IRS says you must subtract those credits or subsidies from your total basis.

Closing costs matter on both ends of the ownership. On the purchase side, Publication 523 says some settlement fees and closing costs can be added to basis. Its list includes abstract fees, charges for installing utility services, legal fees such as title search and preparing the sales contract and deed, recording fees, survey fees, transfer or stamp taxes, and owner's title insurance. Amounts placed in escrow for future payment of taxes and insurance are not settlement costs for this purpose. Other closing items stay out of basis: fire and casualty insurance premiums, rent for occupancy before closing, utility charges before closing, and charges connected with getting a mortgage loan. The loan charges named in the publication include mortgage insurance premiums, loan assumption fees, the cost of a credit report, a lender-required appraisal fee, points and refinancing fees. For the Illinois side of those costs, our guide to transfer taxes and closing costs in Rockford explains what appears on a Rockford closing statement. The federal rule on what goes into basis is the part this guide covers.

How you got the home changes the starting number. If you inherited it, the IRS says your basis is generally the fair market value of the property on the date of the decedent's death, or on the later alternate valuation date if the personal representative chose one. If a federal estate tax return, Form 706, was filed or required, the value listed there is your basis. If Form 706 did not have to be filed, your basis is the appraised value at the date of death for purposes of state inheritance or transmission taxes. A surviving spouse who owned the home jointly gets a mixed result. For joint tenants with right of survivorship or tenants by the entirety, each spouse is considered to own half. The new basis is the survivor's own half at its old basis plus the deceased spouse's half at its fair market value on the date of death. Publication 523 gives an example. A home with an adjusted basis of 50,000 dollars and a fair market value of 100,000 dollars on the date of death produces a new basis of 75,000 dollars, which is 25,000 plus 50,000. The publication names nine community property states for a different rule, and Illinois is not among them. Our guide to selling an inherited home in Illinois covers the state side of that situation.

A gift follows another rule. As a general rule you use the donor's adjusted basis at the time of the gift. The exceptions depend on whether the donor's basis was higher or lower than the fair market value at the time of the gift and whether the donor paid gift tax. A home received in a divorce after July 18, 1984 generally carries the former spouse's adjusted basis, or the combined adjusted basis of both half-shares if the spouses co-owned it. If a home had more than one owner, your gain or loss is the gain or loss on the entire sale multiplied by your percentage of ownership.

A loss is not a deduction. Publication 523 says that if your adjusted basis is greater than the amount realized, you sold at a loss. You cannot deduct the loss, but you owe no tax on the money you received from the sale. Topic no. 409 says the same thing in general terms: losses from the sale of personal-use property, such as a home or car, are not tax deductible.

Last on this subject is paperwork. The IRS says to keep records that document the property's adjusted basis. In general, keep them until 3 years after the due date for your tax return for the year in which you sold the home.

Rental And Business Use, Depreciation And Reporting The Sale

Using the home to earn money changes the picture. The IRS draws a line based on where the business or rental part sits. If it is inside the living area, such as a home office, a rented spare bedroom or attic space used as an office, you do not have to allocate the gain between business and home, and you do not report that part on Form 4797. There is a catch. You cannot exclude the portion of the gain equal to any depreciation allowed or allowable after May 6, 1997, and that amount must be recaptured and reported under section 1250. The publication's example is a sole attorney who used part of a house as a law office. The attorney bought the house in 2013, claimed 2,000 dollars of depreciation, and sold in 2016 with a gain of 13,000 dollars. Of that gain, 2,000 dollars was recognized as unrecaptured section 1250 gain and the other 11,000 dollars could be excluded.

If the business or rental part is separate from the living area, the rules are stricter. The publication's examples are a working farm on which the house sits, a duplex in which you lived in one unit and rented the other, and a store building with an upstairs apartment where you lived. You generally cannot exclude gain on the separate portion unless you owned and lived in that part for at least 2 years during the 5-year period. If you did not, you allocate the basis and the amount realized between the two portions, using the same method you used to figure depreciation, and report the business or rental part on Form 4797. A space that used to be a business or rental space can still qualify if you converted it to your principal residence for a total of 2 years or more within the 5 years before the sale. Depreciation claimed during the earlier business use is still recognized as unrecaptured section 1250 gain.

The depreciation rule has a quiet trap. The IRS says that if you did not deduct depreciation you were entitled to, you still decrease your basis by the amount you could have deducted. The publication's phrase is depreciation allowed or allowable. Recapturing depreciation means including it as ordinary income on your return.

A different rule covers time when nobody lived in the home as a main home. The exceptions are specific. Time in the 5-year window after the last date you used the property as your main home does not count as nonqualified use. Neither does a period of qualified official extended duty, up to 10 years, nor a temporary absence of up to 2 years in total because of a change of employment, health conditions or other unforeseeable circumstances that the IRS specifies.

Two examples from Publication 523 show the difference. In the first, a buyer bought a property on January 1, 2020 for 400,000 dollars and rented the whole property for 2 years, claiming 20,000 dollars of depreciation. The buyer then lived in it as a main home from January 1, 2022 to January 1, 2024 and sold it on January 1, 2025 for 700,000 dollars. The total gain was 320,000 dollars. After setting aside the 20,000 dollars of depreciation, 300,000 dollars remained. Because 2 of the 5 years were nonqualified rental use, 40 percent of that amount, or 120,000 dollars, was ineligible for the exclusion and was reported as long-term capital gain. The other 180,000 dollars was excluded, and the unused balance of the 250,000-dollar limit could not be used for anything else. In the second example, an owner bought a home on January 1, 2020 for 400,000 dollars, lived in it, moved out on January 1, 2023, rented it, and sold it on December 1, 2024 for 600,000 dollars. The rental period came after the last qualified use, so it was not nonqualified use. The owner could exclude gain up to 250,000 dollars, except for the 27,000 dollars of depreciation claimed on the rental. After removing that depreciation, the remaining 200,000 dollars of gain was fully excludable.

Reporting comes next. Topic no. 701 says that if you receive an information document such as Form 1099-S, you must report the sale even if the gain is excludable. You must also report it if you cannot exclude all of the gain. Publication 523 lists three triggers for reporting. You have taxable gain and do not qualify to exclude all of it. You received Form 1099-S, in which case the sale goes on Form 8949 even if there is no taxable gain. Or you choose to report the gain even though it could be excluded. The publication gives a reason someone might make that choice, which is planning to sell another main home within the next 2 years and expecting a larger gain on that one. A choice to report instead of exclude can be undone by filing an amended return within 3 years of the due date of the return for the year of the sale, not counting extensions. If none of the three triggers applies, you do not need to report the sale at all.

Gain that cannot be excluded generally goes on Form 8949 and Schedule D of Form 1040. The IRS says to report it as short-term or long-term depending on how long you owned the home. Taxable gain may also mean you need to increase your withholding or make estimated tax payments, and Publication 505 covers that.

Seller financing is the last wrinkle. If you finance the buyer's purchase and the buyer pays you over time, the IRS says you probably have an installment sale. You generally report part of each payment as interest, and you use Form 6252. Topic no. 701 adds that using the installment method does not take away the exclusion. It stays available.

Bottom Line

The federal exclusion is simple at the center and fussy at the edges. Own the home 24 months, live in it 24 months, inside the 5 years before the sale, and do not take the exclusion on another home in the 2 years before. That gets a single filer up to 250,000 dollars of excluded gain and a qualifying couple filing jointly up to 500,000 dollars. The edges are where rental use, depreciation, divorce, a death in the family, military service and a job change move the numbers, and each of them has a written rule in Publication 523.

The date of sale is the date the IRS counts from, and the 5-year window runs backward from it. The IRS says to keep records that document your adjusted basis, and improvements and certain closing costs go into that basis. If you are looking at homes for sale in Rockford or getting ready to sell one, ask a tax professional to run the worksheets in Publication 523 with your actual dates and costs. Those worksheets, not a general guide, produce the number that goes on a return. For the other guides that sit alongside this one, the Illinois Real Estate Guide lists every Gambino Realtors article.

The facts in this guide were read on irs.gov on October 19, 2026. Publication 523 covers sales for tax year 2025 returns. This is general information about published IRS rules, not tax, legal or financial advice.

Some questions come up again and again once a seller sees these rules written out. Here are the ones the IRS pages answer most directly.

Frequently Asked Questions

How long do I have to live in a home before I can use the home sale exclusion?

The IRS requires at least 24 months of residence, which Publication 523 also states as 730 days, during the 5 years before the sale. The months do not have to be consecutive, and a vacation or other short absence counts as time at home. You must also have owned the home for at least 24 months in the same 5-year window. Your ownership and your residence can fall in different 2-year periods inside that window.

Is the 500,000 dollar exclusion automatic for a married couple?

No. For a joint return, the IRS says one spouse or both may meet the ownership requirement, but each spouse must meet the residence requirement individually, and both must meet the look-back requirement. If both spouses meet the residence and look-back requirements and at least one meets the ownership requirement, the limit is 500,000 dollars.

Can I use the exclusion if I sold another home last year?

Only if you did not take the exclusion on that earlier sale. Publication 523 says you meet the look-back requirement if you did not sell another home during the 2 years before the sale, or you did sell one but did not take the exclusion on its gain. The rule is that you may take the exclusion only once during a 2-year period. If you sold within that period and took the exclusion, you may qualify only for a partial exclusion, if one of the reasons in the publication applies.

What if I have to sell before 2 years because of a job change or a health problem?

You may qualify for a partial exclusion. Publication 523 says the main reason for the sale must be a change in workplace location, a health issue or an unforeseeable event. For a job change, the new work location generally has to be at least 50 miles farther from the home than the old one. The partial amount is the shortest qualifying period divided by 730 days or 24 months, multiplied by 250,000 dollars. A tax professional can confirm which reason fits your facts.

Do I report the sale to the IRS if all of my gain is excluded?

Sometimes. Topic no. 701 says that if you receive Form 1099-S you must report the sale even if the gain is excludable, and you must report it if you cannot exclude all of the gain. Publication 523 says you also report it if you choose to report a gain that could be excluded. If you did not get a Form 1099-S, you have no taxable gain and you did not make that choice, the publication says you do not need to report the sale.

Can I deduct a loss if I sell my home for less than I paid?

No. Publication 523 says that when your adjusted basis is greater than the amount realized, you sold at a loss, you cannot deduct the loss, and you do not owe tax on the money you received. Topic no. 409 says losses from the sale of personal-use property, such as a home or car, are not tax deductible. Ask a tax professional how any rental period affects your own sale.

What happens to the exclusion if I rented the home out before I sold it?

It depends on when the rental happened. Rental time after you last used the home as your main home, within the 5-year window, is not counted as nonqualified use under Publication 523. Rental time before you moved in can create nonqualified use gain that is not excludable, and any depreciation claimed or allowed after May 6, 1997 cannot be excluded. The publication works two examples with figures. Bring your dates and any depreciation records to a tax professional.

Does the exclusion cover a house I inherited and sold?

The exclusion applies only to a home that was your main home and met the ownership and use tests. For an inherited home, Publication 523 says your basis is generally the fair market value on the date of the decedent's death. Whether you can also exclude it depends on whether you owned and lived in the home yourself for 24 months. A tax professional can apply the rules to your situation.

Login to My Homefinder