Calculators

US Home Sale Costs and Capital Gains — The Two-Year Rule Has Three Parts

US Home Sale Costs and Capital Gains — The Two-Year Rule Has Three Parts

Buying a home costs more than the price tag — closing costs add thousands. And when you sell you may owe capital gains tax, though most homeowners do not.

1. What does it add. Buying brings closing costs on top of the price — loan charges, transfer tax, prepaid insurance and property tax. Selling usually brings nothing, because the Section 121 exclusion covers most homeowners.
2. What gets missed. That exclusion carries a “two-year rule” that is really three conditions at once — two years of ownership, two years of use as your main home, and not having claimed the exclusion in the previous two years. Miss one and the whole exclusion goes.
3. How do I check. The Closing Disclosure arrives three business days before closing (CFPB) — that window exists so you can compare it line by line against the Loan Estimate. Investment properties follow different rules.

US Home Buying & Selling Costs 2026
$
%
%
%

Estimates based on 2026 federal rules and typical costs. Transfer taxes, closing costs, and property tax rates vary widely by state and county. State capital gains tax and NIIT (3.8%) are not included. Confirm with your lender, title company, and a tax professional.

Buying — what costs beyond the price

Closing costs typically run 2–5% of the purchase price — on a $500,000 home, that's $10,000 to $25,000 on top of your down payment.

CostTypical amount
Loan origination fee~1% of the loan
Title insurance & escrow0.5% + fees
Transfer tax0% to 2%+ — varies wildly by state
Appraisal & inspection$500–$1,500
Prepaid taxes & insuranceSeveral months upfront

Transfer tax is the wild card. Some states charge nothing; New York, Pennsylvania, and Delaware can hit 2%+ (and NYC adds its own). Check your state and county before you budget.

Transfer tax is the closing-cost line that varies most by state. Here it is on a $500,000 home.

Bars of the transfer tax on a 500,000 dollar home in states with none, about half a percent, about one percent and two percent or more, against a dashed line at ten thousand dollars
In a 2% state the transfer tax alone is $10,000 — the entire low end of the 2–5% closing estimate (our arithmetic).

Selling — will I owe anything

The Section 121 exclusion. If you lived in the home 2 of the last 5 years, you can exclude $250,000 of gain (single) or $500,000 (married filing jointly). Most homeowners owe zero capital gains tax as a result.

How the gain is calculated

It's not simply “sale price minus purchase price.” You subtract more than you'd think:

  • Selling costs — agent commission (typically 5–6%), title fees
  • Capital improvements — a new roof, kitchen remodel, addition. These raise your cost basis and shrink the taxable gain
  • The original purchase price plus certain closing costs from when you bought

Keep your renovation receipts. Every dollar of capital improvement reduces your taxable gain. People routinely overpay because they can't document a decade of upgrades.

If you do owe tax

  • Held over 1 year — long-term rate: 0%, 15%, or 20% depending on income
  • Held under 1 year — taxed as ordinary income (much higher)
  • High earners — add the 3.8% NIIT (net investment income tax)
  • State tax — many states tax capital gains too

The “two-year rule” — three conditions, not one

The Section 121 exclusion is well known, but it carries three separate conditions. Transcribed from the IRS page, checked 30 July 2026.

ConditionIRS source textEasy to miss
Ownership“owned the home for at least 24 months (2 years) out of the last 5 yearsneed not be consecutive
Uselived in the home as your main home for at least 24 months (2 years) out of the last 5 years”a separate test from ownership
Look-back“if you claimed the exclusion on another home sold within 2 years before this sale, you generally do not qualify”the one most often forgotten

The third row is the one that bites. Rolling into a new home every two years and claiming the exclusion each time is blocked. Remember only “live there two years” and the second sale catches you out.

The page also notes an exceptioncertain situations, such as military service, can suspend the 5-year test period for up to 10 years. It gives no full list of qualifying situations, so we do not state one.

What becomes taxable above the exclusion

Bar chart of taxable gain for a single filer by size of gain: 200,000 dollars gives zero, 300,000 gives 50,000, 500,000 gives 250,000, 700,000 gives 450,000
Our calculation of the gain remaining after the IRS exclusion of $250,000 single or $500,000 joint.
Gain Taxable, single filer Taxable, joint filers
$200,000$0$0
$300,000$50,000$0
$500,000$250,000$0
$700,000$450,000$200,000

A $500,000 gain is entirely untaxed for joint filers (our calculation). The same gain leaves a single filer with $250,000 taxable. Filing status swings a quarter of a million dollars right there.

Exceeding the limit adds paperwork — the IRS says that if you cannot exclude all of the gain, you report using Schedule D (Form 1040) and Form 8949. And if you receive a Form 1099-S, you must report the sale whether or not the gain qualifies for exclusion.

When does the closing paperwork arrive

One practical rule for the buying side. The Consumer Financial Protection Bureau defines the Closing Disclosure like this:

“A Closing Disclosure is a five-page form that provides final details about the mortgage loan you have selected. It includes the loan terms, your projected monthly payments, and how much you will pay in fees and other costs to get your mortgage (closing costs).”
ItemCFPB source text
When you get it“The lender is required to give you the Closing Disclosure at least three business days before you close on the mortgage loan”
What the three days are for“This three-day window allows you time to compare your final terms and costs to those estimated in the Loan Estimate that you previously received”
Also“The three days also gives you time to ask your lender any questions before you go to the closing table”
ExceptionsReverse mortgages, HELOCs and certain assistance-program loans use other forms (HUD-1 and others)

The three days are for comparing, not just reading. Put the Loan Estimate and the Closing Disclosure side by side and find the line items that moved — that is what the rule is for. How far each item is allowed to move is not on this page, so we do not state tolerances.

What is different for investment properties

  • No Section 121 exclusion — the whole gain is taxable
  • Depreciation recapture — the depreciation you claimed gets taxed at up to 25%
  • 1031 exchange — you can defer the tax by rolling into another investment property (strict rules and deadlines)
Budget 2–5% of the price in closing costs when buying. When selling, the Section 121 exclusion means most primary-home sellers owe nothing — but keep your improvement receipts either way.

The line most often underestimated on an investment property is depreciation recapture. On one axis with the long-term rates:

Bar chart placing the long-term capital gains rates of zero, fifteen and twenty percent as one group beside depreciation recapture at up to twenty-five percent
Recapture at 25% sits 5 points above the top long-term rate. And with no Section 121 exclusion, the whole gain is taxable.

Questions that remain

Can I claim the exclusion every two years?

No. The IRS text says that “if you claimed the exclusion on another home sold within 2 years before this sale, you generally do not qualify.” That look-back applies on top of the residence test.

I owned it but did not live there.

Ownership and use are separate tests. The source states 24 months of owning and 24 months of living there as your main home. Both must be met.

What if the Closing Disclosure arrives late?

This article does not set out the remedythe CFPB page does not cover it. What is confirmed is “at least three business days before closing” and that the window exists so you can compare against the Loan Estimate.

Why no state tax figures?

They vary too widely to state. State income tax structure is covered in our state taxes article.

Sources

  • Internal Revenue Service — agency source“Topic no. 701, Sale of your home” (checked 30 July 2026). Source for the $250,000 and $500,000 exclusions, 24 months of ownership and 24 months of use within 5 years, the two-year look-back, Schedule D and Form 8949, the Form 1099-S reporting duty, and the suspension of the 5-year period up to 10 years for military service.
  • Consumer Financial Protection Bureau — agency source“What is a Closing Disclosure?” (checked 30 July 2026). Source for the five-page form, the three-business-day delivery requirement, the purpose of comparing against the Loan Estimate, and the reverse mortgage and HELOC exceptions.
  • Our own calculation. The taxable amounts by gain ($0 / $50,000 / $250,000 / $450,000 single; $0 / $0 / $0 / $200,000 joint) are the gain minus the IRS exclusion, not a table the IRS publishes.

Where to check further

  • Transfer tax and property tax rates where you are buying. They vary sharply by state and county, so no figures appear here — your state's Department of Revenue and the county Assessor publish the actual rates.
  • How much each closing-cost line may move from the Loan Estimate. The tolerance categories are not on the CFPB page we used — the CFPB's “Your home loan toolkit” and your lender can spell them out.
  • The “certain situations” that extend the five-year test to ten years. The IRS page gives military service as its only exampleIRS Publication 523 lists the qualifying circumstances.

As of July 2026. The Section 121 conditions and Closing Disclosure rules are sentences from IRS and CFPB pages; the taxable amounts are our arithmetic. Transfer taxes, closing costs and property tax rates vary enormously by state and county, and state capital gains tax and NIIT are not included. General information, not tax advice — consult a tax professional and your title company. State taxes are in our state taxes article, the market in the housing market article, and financing in the mortgage guide.