Owners who have lived in a Richmond-area home for a decade or more often ask the same question before listing: will I owe tax on the profit? For many people the answer is no, because federal law lets you exclude part of the gain on the sale of a main home. The rules have tests, limits and paperwork, though, and a Midlothian owner who bought years ago can cross a limit more easily than expected. This guide summarizes what the IRS says in Topic 701 and Publication 523 as we read them in October 2026. It is general information, not tax advice, so confirm your situation with a tax professional.
The limits and the two tests
The exclusion as the IRS describes it
| Item | What the IRS says |
|---|---|
| Amount | Up to $250,000 of gain if filing individually, up to $500,000 if filing jointly |
| Ownership test | You owned the home for at least 24 months out of the last 5 years |
| Use test | You used it as your main home for at least 24 months of the previous 5 years |
| Frequency | Generally not available if you excluded gain on another home sale in the prior two years |
| Reporting | Report the sale if you receive a Form 1099-S or cannot exclude all your gain |
The two years do not have to be the same two years, and they do not have to be consecutive, but both tests must be met inside the five-year window before the sale. That is useful for owners who moved out and rented the house for a while before selling.
How gain is measured
Gain is not the sale price minus what you paid. The IRS lets you add the cost of improvements, such as an addition, a new roof system or a finished basement, and certain closing costs to your basis, which lowers the gain. Ordinary repairs and painting do not count. This is why keeping receipts for projects matters. Our posts on how to choose an agent to sell a Midlothian home and the cost to sell a house in Richmond cover the selling side of the same math.
A hypothetical example
Hypothetical sale, illustration only
| Line | Amount |
|---|---|
| Original purchase price | $310,000 |
| Capital improvements over the years | $45,000 |
| Adjusted basis | $355,000 |
| Sale price | $640,000 |
| Selling expenses | $30,000 |
| Gain | $255,000 |
These figures are invented for illustration and do not describe any property.
On those numbers, a single filer who meets the tests would exclude $250,000 and have $5,000 of gain left to report. A married couple filing jointly who meet the tests could exclude the whole $255,000. The point is not the exact result. It is that a long ownership and a rising market can push a single owner over the limit even with improvements.
When you do not meet the full tests
Publication 523 describes a reduced exclusion for people who sell before meeting the two-year tests because of a work-related move, health reasons or certain unforeseen events. If that might apply, read the publication or ask a tax professional before setting a timeline. Owners also need to know that gain above the exclusion is taxed under the capital gains rules, and the IRS says an asset held for more than one year produces long-term gain, which is treated more favorably than short-term gain. See the IRS page on capital gains for the current rate tables.
Planning around the sale
If you may exceed the limit, start gathering improvement receipts now, check how long you have owned and lived in the home, and ask your tax preparer before you sign a contract. Property taxes and prorations affect your net on closing day, so read our guide to prorations and the real estate tax due dates by locality. Owners in Midlothian, Bon Air and Short Pump can find local context on our community pages, and our Chesterfield and Henrico agent pages list who works each market.
Get our closing-timeline checklist
Thinking about selling? Ask us for the Mission Realty closing-timeline checklist, and we will walk you through where the sale date, tax items and moving date line up. Call (804) 601-4960, or browse our neighborhood guides.
Frequently asked questions about the home sale gain exclusion
How much gain can I exclude when I sell my main home?
The IRS says up to $250,000 if you file individually and up to $500,000 if you file jointly, if you meet the ownership and use tests.
What are the ownership and use tests?
You must have owned the home for at least 24 months and used it as your main home for at least 24 months during the 5 years before the sale. The two periods need not be the same.
Do the two years have to be consecutive?
No. The IRS describes the tests as being met within the five-year window, not necessarily as one continuous stretch.
Can I use the exclusion every time I sell?
Generally not if you excluded gain from another home sale during the two years before this one.
Do home improvements reduce my taxable gain?
Capital improvements and certain closing costs can be added to your basis, which lowers the gain. Ordinary repairs and painting do not count.
What if I have to sell before two years?
Publication 523 describes a reduced exclusion for certain work, health or unforeseen circumstances. Check the publication or ask a tax professional.
Do I have to report the sale?
The IRS says you must report it if you receive a Form 1099-S or if you cannot exclude all of your gain.
Is this tax advice?
No. It is general information based on IRS publications as we read them in October 2026, so confirm your facts with a tax professional.
