How to Avoid Capital Gains Tax on Home Sale in 2026
Home values have climbed so much that many sellers now hold gains larger than the federal exclusion can absorb. Knowing how to avoid capital gains tax on a home sale can mean keeping your full profit instead of handing tens of thousands of dollars to the IRS. A seasonedtax advisor can run the numbers before you list, andIRS Publication 523 spells out the official tests every seller must meet. This guide covers each strategy for 2026 sales, with a special focus on S corporation owners who work from home.
How the home sale exclusion works in 2026
The most powerful tool here is the Section 121 exclusion, which lets you remove up to 250,000 dollars of gain from your income as a single filer, or up to 500,000 dollars as a married couple filing jointly. These limits have not changed since 1997 and are not adjusted for inflation. Proposals to raise the cap have been introduced in Congress, but the One Big Beautiful Bill Act signed July 4, 2025 left Section 121 untouched. TheIRS sale of your home rules outline these requirements to qualify.
- You owned the home for at least two years during the five years before the sale.
- You lived in the home as your main residence for at least two years in that same window.
- The two years of ownership and use do not have to be consecutive or overlap perfectly.
- You have not excluded gain from another home sale within the two years before this one.
- For the 500,000 dollar limit, both spouses must meet the use test, while only one needs to meet the ownership test.
Here is how the math plays out. A married couple bought their home in 2014 for 420,000 dollars and spent 85,000 dollars on improvements. They sell in 2026 for 1,050,000 dollars and pay 60,000 dollars in selling costs. Their amount realized is 1,050,000 dollars minus 60,000 dollars, or 990,000 dollars. Their adjusted basis is 420,000 dollars plus 85,000 dollars, or 505,000 dollars. That leaves a gain of 485,000 dollars, which fits entirely under the 500,000 dollar joint limit, so they owe zero federal capital gains tax.
A single seller with identical numbers would exclude 250,000 dollars and owe tax on the remaining 235,000 dollars. At the 15 percent long-term rate, that comes to 35,250 dollars, which is exactly the kind of bill ourtax advisory services are built to shrink.
How to calculate your gain and raise your basis
Your taxable gain is not simply the sale price minus the purchase price. It equals your amount realized minus your adjusted basis, and every dollar you add to basis is a dollar of gain that disappears. First, start with what you paid for the home, including certain settlement fees such as title insurance, recording fees, and transfer taxes. Next, add the cost of capital improvements that add value, extend the home’s life, or adapt it to new uses. Finally, subtract any depreciation you claimed, along with casualty losses or energy credits that reduced basis. TheIRS basis of assets guide explains which costs count.
Improvements are where most sellers leave money on the table. A new roof, a kitchen remodel, an addition, a deck, central air, and new windows all qualify. Routine repairs, such as patching drywall, generally do not unless they are part of a larger remodel.
Consider a single owner who bought a home for 380,000 dollars and sells it for 720,000 dollars with 40,000 dollars in selling costs. Without tracking improvements, the gain is 720,000 dollars minus 40,000 dollars minus 380,000 dollars, or 300,000 dollars. After the 250,000 dollar exclusion, 50,000 dollars is taxable, which costs 7,500 dollars at a 15 percent rate.
Now suppose that owner documents a 38,000 dollar kitchen remodel and a 17,000 dollar roof replacement. Basis rises to 435,000 dollars, the gain drops to 245,000 dollars, and the entire amount is excluded. Simply finding old receipts saved 7,500 dollars in federal tax. If records are scattered, atax advisor can help rebuild them from bank statements and permits.
Can you get a partial exclusion if you sell early
Life does not always cooperate with a two-year timeline. If you sell before meeting the ownership and use tests, you may still qualify for a reduced maximum exclusion when the sale is driven by one of three IRS-recognized reasons. Thepartial exclusion rules in Publication 523 describe the safe harbors, and the qualifying categories work like this.
- A change in place of employment, generally when your new job is at least 50 miles farther from the home than your old job was.
- A health reason, such as moving to obtain, provide, or facilitate care for a disease, illness, or injury, often documented by a physician recommendation.
- An unforeseen circumstance, including death, divorce or legal separation, job loss qualifying for unemployment, multiple births from one pregnancy, or damage to the home from a disaster.
- A qualifying event affecting a spouse, co-owner, or household member, which can count the same way as an event affecting you.
The reduced limit is a fraction of the full exclusion. A single owner who lived in the home for 15 months before relocating for a new job divides 15 by 24, which equals 0.625. Multiply 0.625 by 250,000 dollars and the reduced maximum exclusion is 156,250 dollars. If that owner’s gain is 140,000 dollars, every dollar is still excluded. Working with ourtax advisory services team helps you document the reason for the move before the IRS ever asks.
Home office rules for S corporation owners
If you run an S corporation from home, your residence often plays a double role, and that affects the sale. When the office sits inside your house, you do not need to split the sale between business and personal use. The full gain can still qualify for the exclusion. The catch is depreciation. Any depreciation allowed for business use after May 6, 1997 cannot be excluded and is taxed as unrecaptured Section 1250 gain at a maximum rate of 25 percent.
For example, 9,000 dollars of home office depreciation could create up to 2,250 dollars of tax at sale. TheIRS business use of your home guide covers how this recapture is figured.
Most S corporation owners skip the personal home office deduction. Instead, the corporation reimburses them through an accountable plan, which turns rent, utilities, and insurance into a deductible business expense and tax-free cash to you. If depreciation is included in that reimbursement, expect it to show up as taxable gain when you sell. Some owners leave depreciation out for that reason. Our breakdown of thefive accountable plan mistakes S corporation owners make shows where these arrangements go wrong.
Two more points matter. A detached office, studio, or workshop is treated as separate property, so the gain allocated to it does not qualify for the exclusion. Meanwhile, renting your home to your company for up to 14 days a year under theAugusta rule for S corporation owners does not convert your residence into a rental, so it will not jeopardize your exclusion. Atax advisor can weigh the annual write-off against the future recapture before you sell.
Rental conversions and nonqualified use
Converting a rental into your main home, or the reverse, changes the math. Gain tied to nonqualified use after 2008 cannot be excluded, even if you later meet the two-year tests. Before you convert a property, review theIRS residential rental property guide and keep these rules in mind.
- Nonqualified use is time after 2008 when the home was not your main residence, such as years it served as a rental or second home before you moved in.
- Time after you move out does not count as nonqualified use, as long as it falls within the five-year window before the sale.
- Selling within three years of moving out generally preserves the full exclusion because you still lived there two of the last five years.
- Depreciation claimed while the home was rented is always taxable at up to 25 percent, regardless of the exclusion.
- A 1031 exchange can defer gain on the rental portion, and IRS guidance allows the exclusion and an exchange to be combined on the same property.
For example, you buy a property in 2018, rent it out for three years, move in at the start of 2021, and sell it in late 2026 after living there for nearly six years. You owned it roughly eight years, three of which were nonqualified use. With a 320,000 dollar gain, three-eighths of it, or 120,000 dollars, is ineligible for the exclusion. The remaining 200,000 dollars is excluded.
Depreciation from the rental years is taxed on top of that. Had you lived there first and rented it afterward, the rental years would not have reduced your exclusion. TheIRS like-kind exchange tips explain how deferral fits into the picture. Ourtax advisory services can map out the best sequence before you sign a lease or a listing agreement.
Smart timing moves to shrink a large gain
When your gain exceeds the exclusion, timing becomes your next lever. First, make sure you have owned the home for more than one year so the gain is long-term. For 2026, the 0 percent long-term capital gains rate applies to taxable income up to roughly 49,450 dollars for single filers and 98,900 dollars for married couples filing jointly. The 20 percent rate starts above roughly 545,500 dollars for single filers and 613,700 dollars for joint filers. TheIRS capital gains and losses topic explains how these brackets stack on top of your other income.
Stacking is where business owners need extra care. S corporation profits flow through to your personal return whether you take them as salary or distributions, as we explain in our guide toS corporation distributions vs. W-2 salary. A strong business year combined with a large home sale can push part of your gain into the 20 percent bracket. Selling in a lower-income year or maximizing retirement contributions can keep more of the gain at 15 percent.
Next, watch the 3.8 percent net investment income tax. It applies when modified adjusted gross income exceeds 200,000 dollars for single filers or 250,000 dollars for joint filers, and those thresholds are not indexed for inflation. Excluded gain is not counted, but the taxable portion is. TheIRS net investment income tax page details who owes it. Finally, consider harvesting capital losses in your investment accounts during the same year to offset the taxable portion of the gain. Holding the property until death gives heirs a stepped-up basis, while gifting it during life passes along your built-in gain. Atax advisor can compare these paths side by side.
How to report your home sale to the IRS
Even a fully excluded sale can require paperwork. If your closing agent issues aForm 1099-S for real estate proceeds, you must report the sale on your return even when no tax is due.
- Gather your closing statement, original purchase documents, and every receipt for improvements made during ownership.
- Calculate your amount realized and adjusted basis, then confirm whether you meet the full or partial exclusion tests.
- Report the sale onForm 8949, entering the exclusion as an adjustment so only the taxable portion remains.
- Carry the totals to Schedule D, and report any unrecaptured depreciation separately at its own rate.
- Keep all records for at least three years after filing.
If you did not receive a 1099-S and your entire gain is excluded, you generally do not need to report the sale. State taxes are a separate question, since some states follow the federal exclusion while others treat home sale gain differently. Ourtax advisory services cover both federal and state reporting so nothing slips through.
Keep more of your home sale profit
Avoiding capital gains tax on a home sale starts long before closing day. Meet the two-year ownership and use tests, document every improvement, claim a partial exclusion when life forces an early move, and plan around depreciation if you have used your home for business or rental. When your gain exceeds the exclusion, timing your sale and managing your other income can keep more of the profit at lower rates. Review theofficial home sale worksheets early, and bring in atax advisor before you accept an offer, not after.
Schedule your free tax strategy call with BorisMTax
At BorisMTax, we’re experts at tax strategies like the Section 121 exclusion, home office planning, accountable plans, and income timing for S corporation owners. Whether you are listing soon or just exploring, our team will model your numbers and show you every legal way to keep more of your profit. Connect with atax advisor today andschedule your free tax strategy call.
Frequently asked questions
Q: Do I have to buy another home to avoid capital gains tax?
A: No. The old rollover rule that required buying a replacement home ended in 1997. Today, the Section 121 exclusion applies whether you buy another home, rent, or move in with family, as long as you meet the ownership and use tests.
Q: How often can I use the home sale exclusion?
A: You can generally use it once every two years. There is no lifetime limit, so you can exclude gain on each qualifying sale.
Q: Does my home office affect my capital gains exclusion?
A: An office inside your home does not reduce the exclusion, but any depreciation claimed or reimbursed for it is taxed at up to 25 percent when you sell. A detached office is treated as separate property. Ourtax advisory services can calculate your exposure before you list.
Q: What happens if my gain is more than 500,000 dollars?
A: The amount above the exclusion is taxed as a long-term capital gain at 0, 15, or 20 percent, plus the 3.8 percent net investment income tax if your income is high enough. Raising your basis and timing the sale can lower that bill, and theIRS sale of your home topic explains how the excess is reported.
