Capital gains tax hits when you sell real estate for more than the original purchase price plus improvements. The IRS taxes short-term gains at ordinary income rates (up to 37%) for properties held under one year, while long-term gains (on properties held over a year) get taxed at 0%, 15%, or 20% based on your taxable income.
This can add up to a lot of money, but there are ways to keep more of the proceeds in your pocket. In this guide, we’ll explain how you can defer, avoid, or reduce the capital gains tax on your real estate transactions. This includes primary residence exclusions, executing 1031 exchanges, investing in Opportunity Zones, and more.
USA Tax Gurus is a team of enrolled agents and licensed CPAs who can help you take control of your business finances to maximize profits, reduce taxes, and provide increased financial clarity. We’re QuickBooks Pro Advisors, but our tech-savvy team can work in almost any accounting platform, including Wave, Zoho, and more. Schedule your free consultation today with a member of our team to learn more!
Primary Residence Exclusion Strategy
IRC Section 121 lets you exclude up to $250,000 in gains as a single filer or $500,000 as a married couple filing jointly when you sell your primary residence. You must have owned it for at least two years and lived in it as your main home for at least two of the five years before the sale date.
Pro Tip: These two years don’t need to be consecutive, but they must total 730 days within the five-year window. If you bought a home in January 2020, lived there until December 2021, rented it out for two years, and sold it in December 2024, you still qualify because you met the two-year requirement within the five-year lookback period.
You can’t claim this exclusion if you acquired the home through a 1031 exchange within the past five years. The IRS also denies the exclusion for gains attributable to depreciation claimed after May 6, 1997. If you converted a rental property to your primary residence, you’ll pay 25% depreciation recapture on all depreciation taken, even if you lived there for two years before selling.
Keep records proving residency: utility bills in your name, voter registration at the address, bank statements showing the address, and your driver’s license. The IRS can ask for this documentation years after your sale if they audit your return.
Ownership vs. Use Tests
The ownership and use tests operate independently. Married couples can combine their use periods, but both spouses must meet the ownership test to claim the full $500,000 exclusion. If one spouse owned the home for two years but the other spouse only owned it for one year, you’re limited to the $250,000 single filer exclusion. You can only use this exclusion once every two years, so selling multiple properties in quick succession won’t work.
Partial Exclusions
Partial exclusions apply when you sell early due to a job change, health reasons, or unforeseen circumstances. Here’s what you need to know:
- A job change qualifies if your new workplace is at least 50 miles farther from your home than your old workplace was.
- Health reasons include a doctor’s recommendation to move for treatment or care.
- Unforeseen circumstances include divorce, multiple births from one pregnancy, death, unemployment, qualifying for benefits, or natural disasters damaging your home.
The IRS calculates your partial exclusion by dividing the months you lived there by 24, then multiplying by the full exclusion amount. If you lived in your home for 18 months before selling due to a job relocation, you can exclude $187,500 as a single filer (18/24 × $250,000).
1031 Like-Kind Exchanges
IRC Section 1031 lets you defer capital gains taxes by exchanging one investment property for another of equal or greater value. For example, you can swap an apartment building for a retail center, a rental house for raw land, or a storage facility for an office building.
Pro Tip: The properties must be held for business or investment use: personal residences or properties you flip for quick profit don’t count. If you sell a rental property for $800,000 with a $300,000 adjusted basis, generating $500,000 in gains, you can defer all taxes by purchasing a replacement property worth at least $800,000.
Delaware Statutory Trusts let you pool money with other investors to buy fractional interests in institutional-grade properties, which counts as like-kind property for exchange purposes and solves the problem when you can’t find suitable replacement property on your own.
Here’s an overview of the rules and requirements:
- You have 45 days from closing on your relinquished property to identify potential replacement properties in writing to your qualified intermediary.
- You can identify up to three properties (or more than three if their total price doesn’t exceed 200% of your sold property’s value). So if you sold a property for $1 million, you can identify unlimited properties as long as their combined value stays under $2 million.
- You must close on at least one identified property within 180 days of selling your original property, or by the due date of your tax return, including extensions, whichever comes first.
Your intermediary receives the funds at closing, holds them in a separate account, and releases them to purchase your replacement property. (Using your real estate agent, attorney, accountant, or employee as your intermediary disqualifies the exchange.) The intermediary fee typically runs $800 to $1,500 for standard exchanges.
Types of 1031 Exchanges
| Exchange Type | How It Works | Timeline | Typical Cost | Best For |
| Standard (Forward) | Sell the property first, then buy a replacement | 45 days to identify, 180 days to close | $800 – $1,500 | Most common scenario when you’ve found a buyer before identifying replacement |
| Reverse | Buy replacement property before selling the current property | 180 days total to complete both transactions | $3,000 – $5,000 | Hot markets where you need to secure replacement property immediately |
| Improvement (Build-to-Suit) | Use exchange funds to improve replacement property before taking title | All improvements must finish within 180 days | $2,000 – $4,000 | When replacement property needs renovations to meet value requirements |
| Delayed | Most common type – intermediary holds funds between sale and purchase | 45 days to identify, 180 days to close | $800 – $1,500 | Standard investment property exchanges with time between transactions |
How Does Boot Affect This Tax Arrangement?
Boot includes any cash you receive, debt relief when your new property has a smaller mortgage than your old one, or personal property thrown into the deal. This means that if you sell a property with a $400,000 mortgage and buy one with a $350,000 mortgage, you have $50,000 in debt relief boot that gets taxed at your capital gains rate. Receiving $25,000 in cash at closing plus trading properties triggers tax on that $25,000. You can add cash to a deal without creating boot, but you can’t receive cash and maintain full deferral.
Reverse Exchanges
Reverse exchanges let you buy your replacement property before selling your current one. Your qualified intermediary takes title to either your new property or your old property through an Exchange Accommodation Titleholder, giving you 180 days to complete both transactions. This costs more and requires parking arrangements for whichever property the intermediary holds.
Improvement Exchanges
Improvement exchanges let you use exchange funds to improve your replacement property before taking title, but you must complete all improvements within the 180-day window, and the property value, including improvements, must equal or exceed your relinquished property’s sale price.
Exceptions
Vacation homes you use personally for more than 14 days per year or 10% of rental days don’t qualify for 1031 treatment. Nor do properties you bought to fix and flip, as they aren’t held for investment. You also can’t exchange U.S. property for foreign property.
Opportunity Zones and Deferred Gains
Qualified Opportunity Zones are economically distressed census tracts designated by state governors and certified by the Treasury Department. There are over 8,700 Opportunity Zones across all 50 states, Washington D.C., and five U.S. territories.
You can invest capital gains from any source into a Qualified Opportunity Fund within 180 days of realizing the gain to defer taxes until December 31, 2026, or when you sell your QOF investment, whichever comes earlier. If you sold stock in March 2024 with $100,000 in gains, you have until September 2024 to invest that $100,000 into a QOF and push your tax bill to 2026.
What is a Qualified Opportunity Fund?
A Qualified Opportunity Fund is an investment vehicle, organized as a corporation or partnership, that holds at least 90% of its assets in Qualified Opportunity Zone property. The fund manager must substantially improve any existing buildings by investing an amount equal to the property’s purchase price within 30 months. For example, buying a warehouse for $2 million requires putting another $2 million into renovations to qualify.
The tax benefits stack up over time. Your original gain stays deferred until 2026 or until you sell your QOF investment. You don’t get basis step-ups anymore since the deadlines passed in 2021 and 2024, but the real benefit is the 10-year hold: if you hold your QOF investment for at least 10 years, all appreciation in the fund becomes permanently tax-free.
IRS Notice 2018-48 and subsequent guidance clarify the rules:
- You can invest gains from real estate, stocks, bonds, business sales, or collectibles.
- The 180-day clock starts on the date of sale for individuals, the last day of the tax year for partnerships, or the due date of the return for passthrough entities.
- You must invest the gain amount only, not the entire proceeds. Selling a rental property for $500,000 with a $300,000 basis means you invest $200,000 in gains, not the full $500,000.
- You can invest in multiple QOFs and split your gains across different funds to diversify risk.
State tax treatment varies. Some states conform to federal Opportunity Zone rules and offer similar deferral and exclusion benefits. Others don’t recognize OZ investments for state tax purposes, meaning you’ll still owe state taxes on the original gain and might not get the 10-year exclusion at the state level. California conforms partially but caps benefits, while New York hasn’t conformed at all. Check your state’s rules before assuming you’ll get the same tax treatment at both levels.
Installment Sales and Debt Financing
IRC Section 453 lets you spread capital gains over multiple years by receiving payments over time instead of a lump sum at closing. You report gains proportionally as you receive each payment, paying tax only on the gain portion of each installment.
So how does this look in practice? If you sell a rental property for $600,000 with a $300,000 adjusted basis, your gain is $300,000 or 50% of the sale price. Receiving $200,000 at closing and $200,000 per year for two more years means you report $100,000 in gains each year instead of $300,000 up front.
Seller financing makes this work. You act as the bank, taking a down payment and promissory note secured by the property, while the buyer makes principal and interest payments to you monthly or annually based on your agreement. You set the interest rate: typically 1% to 2% above current mortgage rates to compensate for the risk you’re taking. The IRS requires you to charge a minimum interest rate under Section 1274, or they’ll impute interest and tax you on it anyway.
The tax math splits each payment into principal, interest, and return of basis. Using the example above with 50% gross profit ratio, a $100,000 payment breaks down as follows:
- If $7,000 is interest, $93,000 is principal, and 50% of that principal ($46,500) is taxable gain, the other $46,500 is a tax-free return of your basis.
- You pay ordinary income tax rates on the $7,000 interest and capital gains rates on the $46,500 gain. Your total tax hit for that year is much smaller than if you’d taken $300,000 in cash at closing and paid tax on the entire gain immediately.
Installment sales work best when you don’t need all your money right away, and the buyer can’t get traditional financing or wants flexible terms. At the same time, you risk buyer default: if they stop paying, you must foreclose to reclaim the property. You’re also locked into receiving payments instead of having cash to reinvest elsewhere. If real estate values drop and the buyer walks away owing $200,000 on a property now worth $150,000, you’ll take a loss.
Pro Tip: You can’t use installment sale treatment with related parties like family members if they resell within two years, and you can’t combine installment sales with 1031 exchanges. Dealer property (inventory you bought to resell quickly) doesn’t qualify for installment treatment at all.
Primary Residence Conversion
Converting a rental property to your primary residence lets you claim the Section 121 exclusion on appreciation that occurs after the conversion. You must live in the property as your main home for at least two of the five years before selling to qualify for the $250,000 or $500,000 exclusion. If you bought a duplex in 2015 as a rental, moved into it in 2022, and sold it in 2024, you can exclude gains attributable to the two years you lived there, but you’ll pay tax on gains from the seven rental years plus depreciation recapture on all depreciation claimed.
The IRS pro-rates your gain based on non-qualified use periods after 2008. (Non-qualified use means any period when the property wasn’t your primary residence, a vacation home, or vacant while listed for sale.) The formula divides non-qualified use years by total ownership years, then multiplies your total gain by that percentage to determine the taxable portion.
Depreciation recapture hits regardless of conversion. If you claimed $80,000 in depreciation during rental years, you’ll pay 25% on that full amount ($20,000) even after converting to personal use. However, the Section 121 exclusion doesn’t cover depreciation taken after May 6, 1997. This rule prevents landlords from claiming depreciation deductions for years and then escaping recapture by moving in before the sale.
Converting rental property to personal use works best when the property has appreciated significantly, and you’re ready to sell within a few years. Markets with rapid appreciation let you capture the post-conversion gains tax-free while paying tax only on the earlier rental period gains.
Additional Deductions and Offsets
- Increasing Adjusted Basis: Your adjusted basis determines your taxable gain, and increasing that basis through legitimate additions cuts your tax bill. If you paid $8,000 in closing costs when you bought, that $8,000 adds to your basis and reduces your gain by the same amount. Settlement fees and abstract costs also qualify, but homeowner’s insurance premiums, mortgage interest, and property taxes don’t because they’re operating expenses you already deducted or could have deducted on Schedule A.
- Capital Improvements: Capital improvements add to the basis. Replacing a roof, adding a bedroom, installing central air conditioning, paving the driveway, or putting in a new HVAC system all count as improvements. On the other hand, painting walls, fixing a broken window, patching a leak, or replacing a few shingles are repairs that maintain the property but don’t add basis. receipt, permit, and contractor invoice because the IRS can ask for proof years later.
- Selling Expenses: Selling expenses reduce your gain dollar for dollar. Real estate commissions (typically 5% to 6% of the sale price) come right off the top. On a $500,000 sale with a 6% commission, that’s $30,000, reducing your gain. Title insurance you pay as the seller, attorney fees for the sale transaction, advertising costs, inspection fees you cover for the buyer, and transfer taxes also count.
- Capital Losses: Capital losses offset capital gains on your tax return. If you sold stock at a $50,000 loss in the same year you realized $200,000 in real estate gains, your net capital gain drops to $150,000. The IRS lets you deduct up to $3,000 in net capital losses against ordinary income annually if your losses exceed your gains.
- Tax-Loss Harvesting: Tax-loss harvesting before a real estate sale lets you create offsetting losses. For example, you can sell underperforming stocks, mutual funds, or other investments at a loss in the same tax year you plan to sell property. This strategy works best in down markets when your portfolio has unrealized losses you can trigger.
Advanced Strategies for High-Net-Worth Sellers
Charitable Remainder Trusts let you sell highly appreciated property without paying capital gains tax while creating an income stream for yourself. You transfer property into an irrevocable CRT, the trust sells it tax-free, and you receive annual payments based on a percentage of the trust’s value for a term of years or your lifetime.
CRTs work in two forms: Charitable Remainder Annuity Trusts pay a fixed dollar amount each year, while Charitable Remainder Unitrusts pay a fixed percentage recalculated annually based on the trust’s value. CRATs provide predictable income but can’t accept additional contributions, while CRUTs adjust payments up or down with investment performance and allow you to add more assets later.
Similarly, Qualified Small Business Stock under Section 1202 lets you exclude up to 100% of gains on stock held more than five years, up to the greater of $10 million or 10 times your basis. Real estate operating companies may qualify if structured as a domestic C corporation with gross assets under $50 million at all times before and immediately after stock issuance. At least 80% of assets by value must be used in an active trade or business; passive real estate holdings, such as rental properties or land ownership, do not qualify as they fail the active business test under §1202(e)(1).
Reduce Your Capital Gains Tax With USA Tax Gurus
If you want to reduce or eliminate capital gains taxes on your real estate sales, you need to plan before you list the property. At USA Tax Gurus, we provide customized tax planning for real estate investors and high-net-worth individuals selling property.
Our CPAs analyze your situation, model different strategies with actual tax calculations, and prepare documentation to support your chosen approach. We handle 1031 exchange coordination with qualified intermediaries, Opportunity Zone fund due diligence, CRT structure and administration, and audit defense if the IRS questions your returns. To book a free consultation, please fill out a contact form or call 213-212-8737 today.