Back to Blog

Capital Gains Tax When Selling Your Home in Maryland: The $250K/$500K Exclusion Explained for 2026

Most Maryland homeowners don't owe a dime in capital gains tax when they sell — but a meaningful minority do, and many don't know it until tax time. Here's how the $250K/$500K exclusion works and what it means for your sale.

ED

Edward Dumitrache

May 19, 2026

Capital Gains Tax When Selling Your Home in Maryland: The $250K/$500K Exclusion Explained for 2026

If you've owned your home for more than a couple of years and you're sitting on real appreciation — and most Montgomery County homeowners are right now — the question that should be on your mind before you sell is: am I going to owe capital gains tax?

For most Maryland sellers, the answer is no. The federal government gives homeowners one of the most generous tax exclusions in the entire tax code: up to $250,000 of gain tax-free if you're single, $500,000 if you're married filing jointly. But there are real cases where sellers owe — sometimes a lot — and they don't realize it until tax time the following April.

Here's how the rules actually work in 2026, with worked examples for Maryland homeowners.

One important disclaimer up front: I'm a REALTOR®, not a CPA. The information below is general guidance, not personal tax advice. Before you make a sale decision that hinges on tax math, talk to your CPA. I'm happy to refer you to one if you don't have someone.

Do I have to pay capital gains tax when I sell my primary residence in Maryland?

Most Maryland homeowners selling their primary residence pay zero federal capital gains tax on the sale, thanks to the Section 121 exclusion. This is the federal tax provision that lets a single seller exclude up to $250,000 of gain — or $500,000 for a married couple filing jointly — from federal income tax when they sell a home they've used as their primary residence.

To qualify, you must meet two tests:

  1. Ownership test. You owned the home for at least 2 of the last 5 years before the sale.
  2. Use test. You used the home as your primary residence for at least 2 of the last 5 years.

The two-year periods don't have to be consecutive. You also don't have to be living there at the moment of sale — only at some point in the last 5 years for a total of at least 2 years.

Maryland follows the federal rule. If you qualify for the federal exclusion, Maryland state income tax also excludes the gain. You don't owe Maryland tax on what the federal government doesn't tax.

How is the capital gain on my home calculated?

The gain isn't just sale price minus what you paid. The IRS lets you adjust both numbers, which often dramatically reduces the gain.

Capital gain = Adjusted sale price − Adjusted cost basis

Adjusted sale price = Sale price − selling costs

Selling costs include real estate commission, transfer taxes (seller's share), settlement fees, attorney fees, and any closing costs you paid as the seller. On a $900,000 sale with 7% selling costs, your adjusted sale price is roughly $837,000.

Adjusted cost basis = Original purchase price + closing costs at purchase + capital improvements

Original purchase price is what you paid when you bought the home. Closing costs at purchase include things like title insurance, transfer taxes you paid, and lender fees you paid. Capital improvements are the big one — this is the category that saves Maryland sellers the most money.

What counts as a capital improvement that increases my cost basis?

A capital improvement is anything that adds value to your home, prolongs its useful life, or adapts it to new uses. Routine repairs and maintenance don't count.

Capital improvements (yes, increase your basis):

  • Kitchen renovation
  • Bathroom remodel or addition
  • New roof
  • New HVAC system, furnace, or central air
  • Replacement windows
  • Finished basement
  • Deck, patio, or fence
  • New driveway
  • Solar panels
  • Landscaping (new — not routine maintenance)
  • Pool or hot tub installation
  • Room additions or square-footage expansions

Routine repairs (no, don't increase your basis):

  • Painting
  • Fixing a leak
  • Replacing a broken window
  • HVAC tune-ups
  • Re-roofing patches
  • Carpet replacement (in most cases)

If you've owned your Montgomery County home for 10+ years and have done a kitchen, a bathroom, and a new HVAC, your basis could be $40,000–$80,000 higher than your original purchase price. That's $40,000–$80,000 less in taxable gain.

Keep your receipts. I tell every client this — save every receipt for every improvement you make to your home, in a folder, forever. When you sell, those receipts can be worth tens of thousands of dollars in tax savings.

What if my gain is more than $250K or $500K?

This is where it actually matters. If you bought your home in Montgomery County in 2010 and you're selling in 2026, your gain could easily exceed the exclusion.

Worked example: Single seller in Bethesda

  • Purchased 2012 for $450,000
  • Capital improvements over 14 years: $75,000 (kitchen, HVAC, deck)
  • Adjusted basis: $525,000
  • Selling 2026 for $1,050,000
  • Selling costs (~7.5%): $78,750
  • Adjusted sale price: $971,250
  • Gain: $971,250 − $525,000 = $446,250
  • Section 121 exclusion (single): $250,000
  • Taxable gain: $196,250

At a 15% federal long-term capital gains rate (the rate most middle-to-upper-middle income Marylanders pay), that's federal tax of $29,438.

Plus Maryland state tax. Maryland taxes long-term capital gains as ordinary income at the state level — so on $196,250 of additional taxable income, you're looking at roughly 5.75% Maryland state tax + 2–3.2% county tax, or roughly $15,000–$17,000 in MD/MoCo tax.

Total tax bill on the sale: ~$44,000–$46,000.

If the same seller were married and filed jointly, the $500,000 exclusion would have eliminated the entire gain — zero federal tax, zero state tax. The marital status alone changes the math by $44,000.

What's the $250,000 / $500,000 home sale exclusion?

It's the federal tax provision under Internal Revenue Code Section 121 that excludes up to $250,000 of capital gain on the sale of a primary residence ($500,000 for married couples filing jointly) from federal income tax.

Key rules:

  • You must own and use the home as your primary residence for 2 of the last 5 years.
  • You can use the exclusion only once every 2 years. Selling a primary residence, claiming the exclusion, then buying another and selling it 18 months later does not qualify.
  • The exclusion applies regardless of age. Pre-1997 there was a rollover provision and a one-time age-55 exclusion — those are long gone. The current rule has no age component.
  • Maryland conforms to federal treatment. The state recognizes the same exclusion.

Do I qualify for the exclusion if I rented out my home for part of the time I owned it?

Partial qualification, yes. This trips up a lot of Maryland sellers.

If you used the home as a primary residence for 2 of the last 5 years and then converted it to a rental for the remaining time, you still qualify for the full exclusion. But: the depreciation you claimed during the rental period is recaptured at a 25% federal tax rate, and that recapture is not eligible for the Section 121 exclusion.

Example: rented out your MoCo home for 3 years and claimed $15,000 in depreciation. When you sell, $15,000 of your gain is subject to 25% federal tax = $3,750, regardless of the Section 121 exclusion.

If the home was a rental for more than 3 of the last 5 years, you may not qualify at all. The "use as primary residence for 2 of 5 years" rule is strict.

What if I don't meet the 2-of-5 year rule but I have to sell?

There's a partial exclusion provision for sellers who don't meet the 2-of-5 year rule but are selling due to one of these reasons:

  • Change of employment (new job 50+ miles farther from the home)
  • Health reasons (medical care, family caregiving)
  • Unforeseen circumstances (divorce, death, multiple births from one pregnancy, natural disaster)

The partial exclusion is pro-rated based on how much of the 2-year requirement you met. If you owned and lived in the home for 12 of the 24 months required, you get 50% of the exclusion — $125,000 single or $250,000 married.

This is one of the most underused provisions in the tax code. Marylanders move all the time for federal job transfers, military PCS moves, and family medical situations. If that's you, talk to your CPA — there's a real chance you qualify for partial exclusion.

How does the capital gains tax math work for a sale in Maryland?

Federal long-term capital gains rates for 2026 (held more than 1 year):

| Filing status | 0% rate | 15% rate | 20% rate | |---------------|---------|----------|----------| | Single | Up to ~$48,000 income | $48,001–$533,000 | Over $533,000 | | Married filing jointly | Up to ~$96,000 income | $96,001–$600,000 | Over $600,000 |

Maryland additionally taxes capital gains as ordinary income at the state and county level:

  • Maryland state income tax: marginal rate 2%–5.75% depending on income
  • County income tax: Montgomery County 3.2%, varies by county

So a typical Montgomery County couple with $200K household income who has $100K of taxable home sale gain (above their $500K exclusion) is looking at:

  • Federal: 15% × $100,000 = $15,000
  • Maryland: ~5.75% × $100,000 = $5,750
  • Montgomery County: 3.2% × $100,000 = $3,200
  • Total: ~$23,950 in tax

Can I reinvest in another home to avoid capital gains tax?

No — not anymore. This is one of the most common misconceptions among older Maryland homeowners.

Before 1997, there was a "rollover" provision: if you sold a primary residence and bought a replacement of equal or greater value within 2 years, you could defer the capital gains tax. That provision was repealed in 1997 and replaced with the Section 121 exclusion ($250K/$500K) we have today.

The "1031 exchange" you may have heard of is a similar deferral mechanism, but it applies only to investment properties (rentals, business real estate) — not primary residences. If you sell your home and buy another home, the 1031 exchange does not apply.

What records should I keep for capital gains purposes?

The single most valuable thing you can do as a homeowner is maintain a basis file. Open a folder (physical or digital) the day you buy the home and keep:

  1. HUD-1 / Closing Disclosure from the purchase — establishes your cost basis
  2. Receipts for every capital improvement — kitchen, bath, roof, HVAC, windows, additions, deck, etc.
  3. Permits pulled for any work — useful documentation
  4. Photos of improvements — visual record
  5. Any insurance claims or losses that affected basis

When you eventually sell, hand this folder to your CPA. The basis adjustments can save you $10,000–$50,000 in tax — but only if you can document them.

What about Maryland non-resident withholding?

If you're a Maryland non-resident selling Maryland property, the state requires the title company to withhold 8% of the net sale price at closing as estimated tax. You then file a Maryland non-resident return to either claim a refund (if the gain is excluded) or pay any remaining tax owed.

This catches a lot of sellers who moved out of Maryland and rented out their home before selling. The 8% withholding is a meaningful chunk of liquidity — on a $700,000 net sale, that's $56,000 held back at closing. Plan for it.


The bottom line

For most Maryland homeowners selling a primary residence in 2026, the Section 121 exclusion ($250K single / $500K married) means zero federal or state capital gains tax on the sale. The rules:

  • 2-of-5 year ownership and use test is the qualifier
  • Capital improvements raise your basis and reduce taxable gain
  • Selling costs reduce your sale price and further reduce gain
  • Exceeding the exclusion triggers federal (15–20%) + Maryland (5.75% + county) tax
  • Reinvestment doesn't defer the tax anymore — Section 121 replaced the old rollover

If you've owned your Montgomery County home for 15+ years or you're selling a luxury home with significant appreciation, run the actual math with a CPA before you list. The difference between a single and married filer, or between a primary-residence sale and a rental sale, can be tens of thousands of dollars in tax.

For the full picture on what selling a home actually costs in Maryland, see the real cost of selling a house in Maryland in 2026. For what to do with your equity if you're moving up, see sell and buy at the same time in Maryland.

Questions on your specific situation? Call me at (301) 357-1170 — I'll walk through the numbers and refer you to a CPA who specializes in MD real estate tax if you need one.

ShareFacebookLinkedInX

Related Reading

The Real Cost of Selling a House in Maryland (Full Breakdown + Calculator Math for 2026)
Home Selling

The Real Cost of Selling a House in Maryland (Full Breakdown + Calculator Math for 2026)

Read →
Divorce and the House in Maryland (2026): Sell, Keep, or Buy Out?
Home Selling

Divorce and the House in Maryland (2026): Sell, Keep, or Buy Out?

Read →
Downsizing in Montgomery County: An Empty-Nester Guide for 2026
Home Selling

Downsizing in Montgomery County: An Empty-Nester Guide for 2026

Read →

Ready to make a move?

I'm always happy to talk through what's happening locally — no obligation.

Get in Touch