Capital Gains Tax on Sale of Property: Rules, Rates & Calculator
When you sell real estate for more than you paid, the profit is a capital gain — and the IRS wants its share. How much you owe depends on how long you held the property, your income level, whether it was your primary residence, and whether you use strategies like 1031 exchanges to defer the tax.
This guide breaks down the capital gains tax rules for real estate investors, with clear examples and practical strategies for minimizing your tax burden.
Short-Term vs. Long-Term Capital Gains
The holding period is the single biggest factor in your tax rate:
Short-Term (Held Less Than 1 Year)
Gains on property held for less than 12 months are taxed as ordinary income — the same rate as your salary. For most investors, this means 22-37% federal tax, plus state income tax. This is why house flippers face some of the highest tax rates in real estate.
Long-Term (Held More Than 1 Year)
Property held for more than 12 months qualifies for long-term capital gains rates, which are significantly lower:
| Taxable Income (Single Filer, 2026) | Long-Term Rate |
|---|---|
| $0 - $47,025 | 0% |
| $47,026 - $518,900 | 15% |
| Over $518,900 | 20% |
High earners may also owe the 3.8% Net Investment Income Tax (NIIT), bringing the maximum federal rate to 23.8%.
How to Calculate Your Capital Gain
Capital Gain = Sale Price - Selling Costs - Adjusted Basis
Adjusted Basis
Your basis starts at the purchase price and is adjusted by:
- Adding: Closing costs at purchase, capital improvements (renovations, additions, new roof), and any costs to defend or perfect title
- Subtracting: Depreciation claimed (or that should have been claimed) on investment properties, casualty loss deductions, and any prior tax credits
Example: Investment Property
- Purchase price: $200,000
- Closing costs at purchase: $6,000
- Capital improvements: $45,000
- Depreciation claimed (5 years): -$36,364
- Adjusted basis: $214,636
- Sale price: $320,000
- Selling costs (commissions + closing): $22,400
- Capital gain: $320,000 - $22,400 - $214,636 = $82,964
Primary Residence Exclusion (Section 121)
If the property was your primary residence for at least 2 of the last 5 years before selling, you can exclude up to $250,000 in gains ($500,000 for married filing jointly) from federal taxes. This is one of the most powerful tax benefits available to any American.
Requirements
- Owned the home for at least 2 years
- Used it as your primary residence for at least 2 of the last 5 years (doesn't need to be consecutive)
- Haven't used the exclusion in the last 2 years
1031 Exchange: Defer Taxes Indefinitely
A 1031 exchange allows you to defer capital gains tax by reinvesting the proceeds from one investment property into another "like-kind" property. Key rules:
- Must be investment or business property (not your primary residence)
- Must identify replacement property within 45 days of closing
- Must close on replacement property within 180 days
- Must use a qualified intermediary (you can't touch the funds)
- Must reinvest all proceeds to defer 100% of the gain
1031 exchanges let investors trade up to larger properties without ever paying capital gains tax. Some investors chain exchanges for decades, building substantial portfolios tax-free until death (when heirs receive a stepped-up basis).
Depreciation Recapture
If you claimed depreciation on an investment property (and you should — it's required), the IRS recaptures that depreciation when you sell at a flat 25% rate. This is in addition to capital gains tax on the appreciation above your adjusted basis.
In our example above, the $36,364 in depreciation claimed would be taxed at 25% = $9,091 in depreciation recapture, plus 15-20% capital gains tax on the remaining gain.
State Capital Gains Taxes
Many states impose their own capital gains tax on top of federal. Some investor-friendly states:
- No state income tax: Texas, Florida, Nevada, Tennessee, Washington, Wyoming
- High state rates: California (13.3%), New York (8.82%), New Jersey (10.75%)
Tax Strategies for Real Estate Investors
- Hold for over 12 months to qualify for long-term rates (save 10-20% vs. short-term)
- Use 1031 exchanges to defer taxes when upgrading properties
- Maximize your basis by tracking every capital improvement and closing cost
- House hack — live in a property for 2 years, then convert to rental (potentially combining Section 121 with 1031)
- Installment sale — spread the gain over multiple years by seller financing the property
- Opportunity Zones — invest gains into qualified Opportunity Zone funds for partial or full deferral
Note: Tax law is complex and changes frequently. Always consult with a CPA or tax attorney for advice specific to your situation.
Related Articles
- How to Flip a House: Beginner's Guide
- BRRRR Method Explained
- Passive Income Real Estate: 10 Strategies