BuyingFirst-Time Home BuyersHow Much House Can I AffordDown PaymentsCredit Scores & MortgagesFHA LoansVA LoansUSDA LoansJumbo LoansEscrow ExplainedClosing CostsHome InspectionsAppraisals
SellingPricing Your HomeHome StagingPre-Listing RepairsMarketing Your ListingNegotiating OffersSeller DisclosuresThe Closing ProcessCapital Gains on a Home SaleSelling Cost Calculator
InvestingRental Property InvestingThe BRRRR MethodHouse FlippingShort-Term RentalsMultifamilySelf StorageMobile Home ParksREITsReal Estate Syndications1031 ExchangesDSCR CalculatorCap Rate Calculator
CalculatorsMortgage CalculatorRefinance CalculatorAmortization ScheduleAffordability CalculatorLoan ComparisonCash Flow CalculatorCap Rate CalculatorNOI CalculatorDSCR CalculatorROI CalculatorClosing Cost CalculatorProperty Tax CalculatorHouse Flip CalculatorRent vs BuyAll 16 calculators
ResourcesLearning CenterReal Estate GlossaryBlogDownloads & ChecklistsState GuidesCity GuidesHousing Market DataEconomic ReportsProperty ManagementCommercial Real EstateInsuranceLegal ResourcesHome ImprovementMoving
Property ManagementCommercialMarket TrendsLearning CenterState GuidesCity GuidesGlossaryAbout
Tax Guides

Capital Gains on Real Estate: The Section 121 Exclusion and Investment Property

How the $250,000/$500,000 home sale exclusion works, the two-out-of-five-year test, partial exclusions, and how investment property gain is calculated.

Key takeaways

  • Homeowners may exclude up to $250,000 of gain, or $500,000 filing jointly, on a primary residence.
  • You must have owned and used the home as a principal residence two of the last five years.
  • Partial exclusions apply for job changes, health reasons, and certain unforeseen circumstances.
  • Investment property gain gets no exclusion but may be deferred through a 1031 exchange.

The Section 121 exclusion

Single filers may exclude up to $250,000 of gain on the sale of a principal residence; married couples filing jointly may exclude up to $500,000. Gain above the exclusion is taxed at long-term capital gains rates, and may also face the 3.8% net investment income tax at higher incomes.

The test: you must have owned the home for at least two of the five years before sale, and used it as your principal residence for at least two of those five years. The two years need not be continuous. Generally you may use the exclusion only once every two years.

Partial exclusions and non-qualified use

If you fail the two-year test because of a change in employment location, health reasons, or specified unforeseen circumstances, a prorated exclusion applies based on the fraction of two years satisfied. Someone who lived in a home twelve months before relocating for work may exclude half the normal amount.

Periods after 2008 when the property was not used as a principal residence — rented out, for example — are non-qualified use, and a proportionate share of gain does not qualify for exclusion. Depreciation taken during rental periods is also recaptured and cannot be excluded.

Calculating gain and reducing it

Gain equals amount realized minus adjusted basis. Amount realized is sale price minus selling costs including commissions, title fees, and transfer taxes. Adjusted basis is your original purchase price plus capitalized improvements minus any depreciation taken.

Capital improvements — a new roof, an addition, a renovated kitchen, a replaced HVAC system — increase basis and reduce gain. Routine repairs do not. Keep receipts for the entire ownership period; this is the single most commonly lost tax record in residential real estate.

Frequently asked questions

Do I pay capital gains if I buy another house?

There is no rollover requirement. The old rule requiring reinvestment was replaced by the Section 121 exclusion in 1997. Buying another home is irrelevant to the exclusion.

What rate applies above the exclusion?

Long-term capital gains rates of 0%, 15%, or 20% depending on taxable income, plus the 3.8% net investment income tax at higher income levels, plus any state tax.

Can married couples both use the exclusion?

Filing jointly, the $500,000 exclusion requires that either spouse meets ownership and both meet the use test, and neither has used the exclusion in the prior two years.

Sources & further reading

  1. IRC §121, Exclusion of gain from sale of principal residence
  2. IRS Publication 523, Selling Your Home
  3. IRC §1411, Net Investment Income Tax

Figures and rules change. Verify current requirements with the issuing agency or a licensed professional before acting.

Sara Pruitt

Editor, Tax & Legal · CPA

Sara is a CPA who spent a decade in real estate tax practice advising syndicators, flippers, and long-term landlords. She translates the Internal Revenue Code into English.

More from Sara