The Money Pocket

Real Estate Capital Gains Tax Calculator

Calculate federal capital gains tax on a home or rental property sale. Includes Section 121 exclusion, NIIT, 1031 exchange, and Opportunity Zone scenarios.

Estimate how much federal tax you'll owe when you sell a property. This calculator applies the correct long-term capital gains brackets, the Section 121 primary residence exclusion, the 3.8% Net Investment Income Tax, and lets you compare standard sale vs. 1031 exchange vs. Opportunity Zone scenarios.

Property & Sale Details
Purchase Details
Sale Details
Tax Profile
Tax Strategies

1031 Exchange

Defer tax into a like-kind property

Opportunity Zone Investment

Potential deferral & reduction

Get Professional Advice!
Tax Estimate
Holding Period:Long-Term (> 1 year)

Cost Basis

$326,000

Adjusted Proceeds

$485,000

Raw Capital Gain

$159,000

Section 121 Exclusion

$0

Taxable Gain

$159,000

Federal CG Tax

$23,850

NIIT (3.8%)

$1,482

Total Federal Tax

$25,332

Effective Rate on Gain

15.93%

Net Profit After Tax

$133,668

Applied LTCG Rates: $0 @ 0% / $159,000 @ 15% / $0 @ 20%
Scenario Comparison
Standard (No Deferral)$25,332 owed
1031 Exchange(enable above)
$0 deferred
Opportunity Zone(enable above)
~$0 potential reduction
State capital gains taxes are not included. California, for example, taxes capital gains as ordinary income at rates up to 13.3%.
This is an estimate for educational purposes only. Consult a tax professional for advice specific to your situation.

How to Calculate Your Cost Basis

Your cost basis is the starting point for all capital gains calculations. It determines how much of your sale proceeds are taxable.

Cost Basis = Purchase Price + Buying Closing Costs + Capital Improvements

Purchase price is the amount you paid. Buying closing costs include title fees, attorney fees, recording fees, and points paid to obtain financing — but not prepaid interest or property taxes (which are deductible separately). Capital improvements are permanent additions or renovations that extend the life or increase the value of the property: a new roof, an addition, a kitchen remodel. Regular maintenance and repairs do not add to basis.

Adjusted sale proceeds are your gross sale price minus selling costs:

Adjusted Proceeds = Sale Price − Selling Costs

Selling costs typically include real estate agent commissions (5–6%), title fees, attorney fees, transfer taxes, and concessions to the buyer. On a $500,000 sale, selling costs of 6% reduce your taxable proceeds by $30,000.

Taxable Gain = Adjusted Proceeds − Cost Basis

The Primary Residence Exclusion (Section 121)

Section 121 of the Internal Revenue Code is one of the most valuable tax breaks available to homeowners. If you meet the requirements, you can exclude a significant portion of your gain from federal tax entirely.

Exclusion Amounts

Filing StatusMaximum Exclusion
Single$250,000
Married Filing Jointly$500,000

The 2-of-5-Year Test

To qualify, you must have owned the home and used it as your primary residence for at least 2 of the 5 years immediately before the sale. The two years don't have to be consecutive, and ownership and use can overlap.

Critically, the test requires both ownership and use. A property you owned but rented out for the last 4 years, for example, would not qualify even if you owned it for 10 years.

Partial Exclusions

The IRS allows a partial exclusion if you fail to meet the full 2-year test due to a qualifying reason: a change in employment, health reasons, or unforeseen circumstances (such as divorce or condemnation of the property). The partial exclusion is prorated based on how long the 2-of-5 test was met.

After a 1031 Exchange

If you previously acquired the property through a 1031 exchange, you must wait 5 years (not 2) before the Section 121 exclusion applies, and you still need to meet the 2-of-5 use test.

Short-Term vs Long-Term Capital Gains Rates

Holding period determines your tax rate — and the difference is dramatic.

Short-Term (≤ 1 Year)

If you sell within 12 months of purchase, your gain is taxed as ordinary income at your marginal rate — the same rate applied to wages. Depending on your income level, this can reach 37%.

Long-Term (> 1 Year)

Hold for more than 12 months and you qualify for preferential long-term capital gains rates:

Total Taxable IncomeRate (Single)Rate (MFJ)
Up to $48,350 / $96,7000%0%
$48,351–$533,400 / $96,701–$600,05015%15%
Above $533,400 / $600,05020%20%

Long-term rates are stacked on top of ordinary income. If your ordinary income already exceeds the 0% bracket threshold, even $1 of long-term gain is taxed at 15%. If your ordinary income plus the gain pushes you into the highest bracket, the gain above that threshold is taxed at 20%.

Net Investment Income Tax (NIIT)

The Net Investment Income Tax is an additional 3.8% surtax on investment income — including real estate capital gains — for higher-income taxpayers:

Filing StatusNIIT Income Threshold
Single$200,000
Married Filing Jointly$250,000

NIIT applies to the lesser of your net investment income or the amount by which your modified adjusted gross income exceeds the threshold. If you're single with $180,000 of ordinary income and a $100,000 taxable capital gain, $80,000 of that gain is subject to the 3.8% NIIT.

The effective maximum federal rate on long-term real estate gains for high earners is therefore 23.8% (20% LTCG + 3.8% NIIT).

1031 Exchange: Deferring the Tax

A 1031 exchange (named for IRC Section 1031) allows you to defer capital gains tax by rolling your sale proceeds into a "like-kind" replacement property. The rules are strict:

  • You must identify the replacement property within 45 days of closing
  • You must close on the replacement property within 180 days
  • The replacement property must be of equal or greater value
  • Proceeds must flow through a qualified intermediary — you cannot take possession of the cash

A successful 1031 exchange defers 100% of the federal capital gains and NIIT owed. The tax doesn't disappear — it carries forward into the basis of the new property — but repeated 1031 exchanges allow investors to compound growth indefinitely, with taxes potentially eliminated at death through a stepped-up basis.

Opportunity Zone Investments

Qualified Opportunity Zones (QOZs) are another deferral strategy. By investing capital gains proceeds into a Qualified Opportunity Fund (QOF) within 180 days of the sale, you can:

  • Defer recognition of the original gain until the earlier of QOF exit or December 31, 2026
  • Potentially eliminate federal tax on any appreciation inside the QOF if held for 10+ years

The Opportunity Zone program is complex and requires careful structuring. The tax benefits above are simplified estimates — actual results depend on the holding period, the QOF's structure, and future legislation.

For a thorough walkthrough of how capital gains work on home sales vs. rental properties, read: Capital Gains Tax on Real Estate: Home vs Rental.


Sources: IRS Publication 523 — Selling Your Home, Rocket Mortgage — Capital Gains Tax on Real Estate, SmartAsset — Capital Gains Tax, IRS — Net Investment Income Tax

Similar Tools

Tools that are similar to this one
1031 Exchange Tax Calculator - Like-Kind Exchange Tax Deferral
Calculate tax deferral benefits and requirements for 1031 like-kind exchanges. Optimize real estate investment strategies with accurate tax analysis.
401(k) Rollover Calculator - Compare Your Options & Maximize Retirement
Free 401(k) rollover calculator comparing traditional IRA, Roth conversion, and cash-out options. Calculate taxes, penalties, and long-term growth to make the best decision.
529 vs UTMA/UGMA Calculator - Education Savings Comparison
Free 529 vs UTMA calculator shows which is better for your family. See how your UTMA could cost your child $40K+ in financial aid. Compare education savings strategies.
ACB Calculator — Adjusted Cost Base for Stocks (Canada)
Calculate your weighted average adjusted cost base (ACB) for Canadian stocks across multiple purchase lots. Instantly see your ACB per share, capital gain, and estimated tax.
Affiliate Program Finder - Generate Google Search Queries to Find Programs
Free affiliate program finder tool. Generate targeted Google dork searches to discover affiliate programs in any niche. Find high-ticket, recurring, and beginner-friendly programs instantly.
After Tax Cash Flow Calculator - Real Estate Investment Analysis
Calculate after-tax cash flow for real estate investments and business analysis. Comprehensive tool for investment decision-making and tax planning.
Amortized Loan Calculator - Mortgage & Loan Payment Calculator
Free amortized loan calculator with payment schedules, extra payment analysis, and comprehensive loan breakdown. Perfect for mortgages, auto loans, and personal loans.
Alternative Minimum Tax Calculator 2026 - Free AMT Calculator
Calculate your 2026 AMT with our free calculator. Determine if you owe Alternative Minimum Tax with new $500K/$1M thresholds and 50% phaseout rate.
AOTC Calculator - American Opportunity Tax Credit
Free AOTC calculator to calculate American Opportunity Tax Credit. Get up to $2,500 per student with our Form 8863 education credit calculator.
Backdoor Roth IRA Calculator - High Income Retirement Strategy
Free backdoor Roth IRA calculator for high earners above income limits. Calculate pro-rata rule impact, tax consequences, and long-term benefits of this advanced strategy.
California Form 540 2EZ Tax Calculator
Use our California 540 2EZ tax calculator for single, married, or head of household filers with income under $100,000. Based on official FTB 2EZ tax tables.
California State Income Tax Calculator (FTB Form 540)
Calculate your 2025 California state income tax using official FTB tax brackets. Supports all filing statuses with standard deduction and exemption credits.
Canadian Capital Gains Tax Calculator 2025
Calculate your capital gains tax in Canada for 2025. Includes province selector, 50% inclusion rate, capital loss offsets, and after-tax proceeds. Based on CRA T4037 guide.
Canada Capital Loss Planner — Carryforward & Carryback Calculator
Calculate how to apply Canadian capital losses to offset gains. Handle carryforwards from prior years and carrybacks to 2022–2024 to recover past taxes. Based on CRA T4037.
Capital Gains Tax Calculator - Federal & State Tax Calculator
Free capital gains tax calculator. Calculate federal and state capital gains taxes on stocks, real estate, crypto, and investments. Optimize your tax strategy.
Career Break Calculator - Calculate the True Cost of Time Off
Free career break financial impact calculator. See how taking time off work affects your lifetime earnings, retirement savings, and Social Security benefits.
Charitable Remainder Trust Calculator - CRT Tax & Income Analysis
Free CRT calculator for charitable remainder trusts. Calculate CRUT vs CRAT benefits, tax deductions, income streams, and estate planning strategies.
Child Tax Credit Calculator 2026 - Free CTC Calculator
Calculate your 2026 Child Tax Credit with our free calculator. Get instant CTC estimates up to $2,200 per child. Includes refundable portion and phase-out calculations.
Crypto DCA Calculator - Dollar-Cost Averaging Strategy Analysis
Free cryptocurrency DCA calculator to analyze dollar-cost averaging strategies. Calculate Bitcoin, Ethereum returns with volatility and risk analysis.
Data Breach Financial Impact Calculator - Calculate Identity Theft Costs
Free data breach cost calculator. Estimate the financial impact of identity theft, including fraud losses, recovery time, credit damage, and monitoring costs. Understand your real risk.
Real Cost of Debt Calculator - True Lifetime Cost & Opportunity Analysis
Free debt cost calculator reveals the shocking truth. See how your $5,000 credit card debt actually costs $23,000+ over your lifetime with opportunity cost analysis.
Deferred Tax Liability Calculator - ASC 740 Tax Accounting
Calculate deferred tax liabilities and assets for financial reporting. Comprehensive ASC 740 compliance tool for tax accounting professionals.
T929 Disability Supports Deduction Calculator (Canada)
Calculate your Disability Supports Deduction for line 21500 of your Canadian tax return. Mirrors Form T929 exactly — includes the student school-attendance bonus and estimated tax savings.
Division 296 Tax Calculator - Australia | Free Super Tax Estimator
Free Division 296 tax calculator for Australia. Calculate your superannuation tax liability on balances over $3M and $10M. Includes two-tier rates, 5-year projections, and indexed thresholds.
Education Tax Credits Calculator - AOTC vs LLC Comparison
Compare AOTC vs Lifetime Learning Credit to maximize your education tax benefits. Free calculator shows which credit saves you more money.
Earned Income Tax Credit (EITC) Calculator 2026 - Free EITC Estimator
Calculate your 2026 EITC with our free calculator. Get instant estimates for earned income tax credit based on income, children, and filing status. Maximize your refund.
Estate Tax Calculator - Federal, Illinois, Massachusetts & All States
Free estate tax calculator. Calculate federal estate tax, Illinois estate tax, Massachusetts estate tax, and all state taxes. Plan your wealth transfer strategy.
2026 Federal Tax Bracket Calculator - Free Income Tax Calculator
Calculate your 2026 federal income tax with our free calculator. Includes new 2026 tax brackets with 4% inflation adjustment for lower brackets under OBBBA.
Gold SIP Calculator - Calculate Gold Investment Returns
Free gold SIP calculator for digital gold, ETFs, SGBs and physical gold. Calculate returns, compare options, and plan systematic gold investments.
HSA Calculator - Triple Tax Advantage Health Savings Account Analysis
Free HSA calculator showing triple tax benefits, investment growth, and retirement healthcare planning. Compare HSA vs traditional savings with detailed tax advantage analysis.
Inflation Savings Calculator - Account for Inflation in Your Goals
Free inflation savings calculator. See how inflation affects your savings goals and how much you really need to save to maintain purchasing power.
Investment Property Mortgage Calculator
Calculate monthly mortgage payments, PITIA, and debt-to-income ratios for investment properties and primary residences. Includes PMI and DTI analysis.
ISO Tax Calculator - Incentive Stock Options Tax Calculator
Calculate ISO tax implications including AMT, exercise strategies, and disqualifying dispositions. Optimize your incentive stock option tax planning.
Lifetime Learning Credit Calculator - Calculate LLC Tax Credit
Free Lifetime Learning Credit calculator for graduate school, professional development, and continuing education. Calculate your LLC tax benefit with income phase-out.
Loan Affordability Calculator - Can You Afford That Loan?
Free loan affordability calculator to check if you can afford a specific loan amount. Calculate maximum loan amounts, required income, and get detailed affordability analysis with DTI ratios.
Michigan Fuel Inventory Tax Calculator - Calculate One-Time Tax on Dec 31, 2025 Inventory
Free Michigan fuel inventory tax calculator. Businesses and end users: calculate the special one-time inventory tax on fuel held December 31, 2025. Due February 20, 2026.
Michigan Gas Tax Calculator 2026 - Calculate Your Fuel Tax Impact
Free Michigan gas tax calculator. Calculate how the new 52.4¢ per gallon fuel tax increase will affect your budget. Includes sales tax elimination benefits and 5-year projections.
Mortgage Refinance Calculator - Should You Refinance Analysis
Free mortgage refinance calculator with break-even analysis. Calculate refinancing savings, closing costs, and determine if refinancing makes financial sense.
NIIT Calculator - Net Investment Income Tax Planning Tool
Free NIIT calculator for 3.8% surtax analysis. Calculate Net Investment Income Tax liability and discover strategies to reduce high-income investment taxes.
No Tax on Overtime Calculator (2025-2028) | Free Federal Tax Deduction Tool
Calculate your No Tax on Overtime deduction. Free calculator shows how much you save with the new 2025 overtime tax deduction. Up to $12,500 single / $25,000 joint.
Opportunity Zone Calculator - QOZ Tax Benefits Analysis
Free Opportunity Zone calculator for 3-tier tax benefits. Calculate QOZ investment tax savings, deferral, step-up basis, and gain elimination strategies.
Principal Residence Exemption Calculator Canada
Calculate how much of your home sale is tax-free in Canada. Applies the CRA's principal residence exemption formula including the "+1 rule" for partial-year ownership.
Private Placement Life Insurance Calculator - PPLI Tax & Estate Benefits
Free PPLI calculator for private placement life insurance. Calculate tax-free growth, death benefits, and estate planning advantages for ultra-high-net-worth individuals.
Prorated Taxes Calculator - Calculate Property Tax Proration
Calculate prorated property taxes for real estate transactions. Accurate proration calculations for buyers, sellers, and real estate professionals.
QBI Deduction Calculator 2026 - Section 199A Pass-Through Deduction
Calculate your 2026 Qualified Business Income deduction with our free Section 199A calculator. Get instant QBI estimates for pass-through businesses, S-corps, and LLCs.
QSBS Calculator - Qualified Small Business Stock Tax Exclusion
Free QSBS calculator for Section 1202 tax exclusion analysis. Calculate potential tax savings up to $10M on qualified small business stock sales.
R&D Tax Credit Calculator - Research & Development Tax Credits
Calculate federal and state R&D tax credits for qualified research activities. Maximize your research and development tax benefits and incentives.
Real Estate Investor DTI & Borrowing Power Calculator
Calculate your debt-to-income ratio as a real estate investor and find out exactly how much you can borrow for your next investment property.
REIT Investment Calculator - Real Estate Investment Trust Analysis
Free REIT calculator to analyze dividend income, tax implications, and total returns. Compare REIT types and optimize your real estate investment strategy.
Rental Property After-Tax Cash Flow Calculator
Calculate after-tax cash flow for rental properties including depreciation, mortgage interest deduction, and estimated tax liability.
Roth Conversion Calculator - Tax Bracket Analysis & Strategy
Free Roth conversion calculator with tax bracket analysis. See how converting $50K could save you $200K+ in retirement taxes. Optimize your conversion strategy now.
S Corp Payroll Tax Calculator - Optimize Owner Salary & Tax Savings
Calculate optimal S Corp owner salary and payroll taxes. Maximize tax savings while ensuring IRS compliance with reasonable compensation requirements.
Side Hustle Tax Calculator - True Profit After Fees & Taxes
Free side hustle profitability calculator. Calculate your actual earnings after platform fees, business expenses, self-employment tax, and income taxes. See if your side hustle is really worth it.
SIP Calculator - Calculate Mutual Fund Returns Online
Free SIP calculator to calculate returns on mutual fund investments. Plan your systematic investment with accurate projections for Groww, SBI, HDFC & more.
SIP Calculator with Inflation - Real Returns Analysis
Calculate inflation-adjusted SIP returns to understand real purchasing power. See how inflation erodes wealth and plan better investments.
SIP vs Lumpsum Calculator - Which Investment Strategy is Better?
Compare SIP vs lumpsum investment strategies. Free calculator shows which approach generates higher returns based on market conditions and your risk profile.
SmartAsset Tax Calculator Alternative - Superior Tax Calculator
Advanced tax calculator that outperforms SmartAsset. Calculate federal and state taxes with detailed breakdowns, optimization tips, and tax law updates.
Social Security Claiming Strategy Calculator - Optimize Your Benefits
Free Social Security calculator shows when to claim benefits. See how claiming at 62 vs 70 could cost you $300K+ over your lifetime. Optimize your strategy now.
Solo 401(k) Calculator - Self-Employed Retirement Planning Tool
Free Solo 401(k) calculator for self-employed individuals and business owners. Calculate maximum contributions, tax savings, and retirement projections.
Standard Deduction Calculator 2026 - Should You Itemize?
Calculate your 2026 standard deduction including NEW $6,000 senior deduction. Compare standard vs itemized deductions to maximize your tax savings.
Step-Up SIP Calculator - Calculate Returns with Annual Increase
Free step-up SIP calculator to calculate returns with annual increase in SIP amount. See how increasing your SIP by 10-15% yearly accelerates wealth creation.
St. Louis County Personal Property Tax Calculator (Eureka/Rockwood)
Free St. Louis County personal property tax calculator for Eureka and Rockwood School District. Calculate your exact property tax based on 2026 rates. Includes commercial surcharge.
Student Loan Calculator - Plan Your Education Financing
Free student loan calculator with repayment options, grace period analysis, and PSLF calculations. Compare standard, graduated, and income-driven repayment plans.
Surplus Lines Tax Calculator - Insurance Premium Tax Calculator
Calculate surplus lines insurance taxes and fees for non-admitted insurance coverage. State-specific rates and compliance requirements.
Tax Loss Harvesting Calculator - Optimize Investment Tax Strategy
Free tax loss harvesting calculator to maximize tax savings. Calculate optimal loss harvesting, avoid wash sales, and improve portfolio tax efficiency.
Tax Withholding Calculator 2026 - W-4 Withholding Calculator
Calculate proper tax withholding for 2026. Avoid underpayment penalties or large refunds. Get exact withholding amounts per paycheck with our W-4 calculator.
US Rental Property ROI Calculator
Calculate NOI, cap rate, cash-on-cash return, DSCR, and total ROI for any US rental property investment in seconds.