Do You Pay Capital Gains Tax Selling a Home in Maryland?

by Saad Jamil

Capital gains tax when selling a home in Maryland, what sellers owe

Selling a home in Maryland comes with a question most homeowners don't think about until they're at the closing table: how much of my profit does the state want? The answer surprises people in both directions. Most primary-residence sellers owe zero capital gains tax because the federal exclusion is so generous. But sellers of investment properties, second homes, inherited properties, or high-appreciation primary homes in Bethesda, Potomac, Chevy Chase, or Columbia can face a combined federal-plus-Maryland bill that quietly erodes six figures of equity. Experienced Maryland real estate agents can tell you which category you fall into long before you reach the settlement table.

Quick Answer: Maryland taxes home sale capital gains as ordinary income, 2% to 6.5% at the state level for 2026, plus a local county income tax of 2.25% to 3.30%. Since tax year 2025, sellers with federal adjusted gross income above $350,000 also pay a 2% state surtax on net capital gains, although a primary residence sold for less than $1.5 million is exempt from that surtax. Most primary-residence sellers pay nothing because the federal exclusion shields up to $250,000 of gain for single filers and $500,000 for married couples filing jointly. The tax bill usually lands only on investment properties, second homes, short-tenure sales, or gains above the federal exclusion.

Free · No Obligation Get Your Maryland Seller Net Sheet

Tell us about your home and we will send a valuation and a line-by-line estimate of what you keep.

Your information stays private. Prefer to talk? Call (703) 782-4830 or contact our team.

Request receivedThank you. Saad or Arslan will reach out shortly from (703) 782-4830.

This guide walks through the exact mechanics, what Maryland taxes, what it exempts, how county income taxes stack on top, how the non-resident withholding rule works, and the legal strategies that reduce what you owe. Every calculation uses 2026 Maryland tax brackets and the current federal capital gains framework. It's not a substitute for a CPA's advice on your specific return, but it is the roadmap most Maryland sellers need before they list.

If you're weighing a sale now and want to see your true walk-away number, a personalized seller net sheet breaks out commission, transfer taxes, and estimated capital gains side by side, free, no obligation.

A note on what we do

The Jamil Brothers Realty Group are licensed real estate agents, not CPAs or tax attorneys. We do not prepare tax returns or give tax advice. We help Maryland homeowners price, market, and sell their homes, and we coordinate with your tax advisor when timing matters.

Key Takeaways

  • Maryland has no preferential capital gains rate. Your home sale gain is taxed the same as wages, at your state income tax bracket (2% to 6.5% for 2026) plus your county's local income tax (2.25% to 3.30%).
  • New since tax year 2025: a 2% capital gains surtax applies when federal adjusted gross income tops $350,000. A primary residence that sells for less than $1.5 million is exempt from the surtax.
  • The federal Section 121 exclusion is your biggest shield: $250,000 of gain for single filers, $500,000 for married filing jointly, if you owned and lived in the home 2 of the last 5 years.
  • Non-resident individual sellers face 8.75% state withholding at closing (8.25% for entities) on the total payment, not the gain. It is a prepayment, not an extra tax.
  • Cost basis matters more than most sellers realize. Capital improvements, settlement costs from purchase, and selling expenses all raise your basis and reduce taxable gain.
  • Montgomery, Howard, Prince George's, Baltimore County, and Baltimore City levy a 3.20% local rate, which pushes combined Maryland tax to 8.95% in the 5.75% bracket and 9.70% in the 6.5% top bracket.
  • 1031 exchanges, installment sales, and strategic timing can legally defer or reduce Maryland capital gains on investment property sales.

How Capital Gains Tax Works on a Maryland Home Sale

Capital gains tax is a tax on profit, not price. When you sell your Maryland home, the IRS and the State of Maryland care about the difference between what you paid (your cost basis) and what you sold for (your net sale price). That difference is the "gain", and only that number is potentially taxable.

Several layers of tax can apply:

Tax Level How It's Calculated Typical Rate Range
Federal Long-term capital gains rate (held more than 1 year) 0%, 15%, or 20%
Federal (short-term) Held one year or less, taxed as ordinary income 10% to 37%
Maryland State Taxed as ordinary income, no special long-term rate 2% to 6.5%
Maryland Capital Gains Surtax Extra state tax on net capital gains when federal AGI exceeds $350,000 (tax year 2025 onward) 0% or 2%
Maryland County Local income tax on the same taxable income 2.25% to 3.30%
Net Investment Income Tax Federal 3.8% NIIT on investment gains for high earners 0% or 3.8%

Unlike the federal system, which rewards long-term investors with a preferential 0%/15%/20% rate, Maryland gives capital gains no preferential rate. If you fall in one of Maryland's upper brackets and live in Montgomery County, your home-sale profit is taxed at roughly the same rate as a year-end bonus, and above $350,000 of federal adjusted gross income the state now adds a 2% surtax on top.

The two questions that decide your tax bill

Before you calculate a single dollar, two questions determine whether you owe Maryland anything at all on a home sale:

The Two Gating Questions

  • 1.Is this your primary residence? If you lived in the home as your main residence for at least 24 months out of the last 60 months before sale, the federal Section 121 exclusion applies.
  • 2.Is your gain under the exclusion amount? $250,000 single / $500,000 married filing jointly is excluded from federal tax, and because Maryland starts with federal adjusted gross income, the exclusion carries through to Maryland too.

If both answers are yes, your Maryland capital gains tax on the home sale is almost always zero. If either answer is no, you need to run the full calculation.

The Federal $250K / $500K Home Sale Exclusion

Internal Revenue Code Section 121, the "primary residence exclusion", is the single most important tax provision for Maryland home sellers. It wipes out up to $250,000 of gain for individuals and $500,000 for married couples filing jointly, and the exclusion passes directly through to Maryland because the state uses federal adjusted gross income as its starting point. The dollar limits have not changed since 1997, and as of September 2026 the bills in Congress that would raise or remove them have not become law.

The ownership and use tests

To claim the full exclusion, you must meet both tests within the 5-year period ending on the sale date:

Test Requirement How It's Counted
Ownership Test Owned the home for at least 24 of the last 60 months Doesn't have to be consecutive
Use Test Lived in it as primary residence for at least 24 of the last 60 months Doesn't have to be consecutive
Frequency Test Haven't used the exclusion on another home in the past 2 years Once every 24 months

For married couples, only one spouse needs to meet the ownership test, but both must meet the use test. If only one spouse meets the use test, the couple gets the $250,000 exclusion, not the full $500,000.

Partial exclusions (the "unforeseen circumstances" rule)

Sellers who fall short of the 24-month threshold may still qualify for a prorated exclusion if they sold for one of these IRS-recognized reasons:

Qualifying Reasons for a Partial Exclusion

  • ✓Job relocation more than 50 miles away
  • ✓Health reasons requiring a move
  • ✓Divorce or legal separation
  • ✓Death of spouse or co-owner
  • ✓Multiple births from a single pregnancy
  • ✓Involuntary conversion (natural disaster, condemnation)
  • ✓Military PCS orders (special 10-year look-back for service members)

The partial exclusion is calculated by taking the fraction of the 24-month period you actually satisfied and multiplying by the full exclusion. For example, if a married couple lived in their Silver Spring home for 12 months before a qualifying job relocation, they'd get 12/24 × $500,000 = $250,000 of excluded gain.

Free · No ObligationWhat Is Your Maryland Home Worth Right Now?

Get a personalized valuation from The Jamil Brothers, street-level comps, not automated estimates. We respond within 24 hours with a real number, not a Zestimate.

When Maryland Sellers Actually Owe Capital Gains Tax

The majority of Maryland homeowners selling a primary residence owe no capital gains tax at all. The scenarios that trigger a bill are narrower than most sellers fear, but when they apply, the combined federal plus Maryland plus county rate can exceed 30% on the taxable portion of the gain.

The five situations where Maryland sellers owe capital gains

Situation Why Tax Is Owed
1. Gain exceeds the exclusion Single filers with more than $250K gain, MFJ with more than $500K gain, pay tax on the excess.
2. Investment property / rental Non-primary residences don't qualify for Section 121. Full gain is taxable; depreciation is recaptured at up to a 25% federal rate.
3. Second home / vacation home Ocean City or Deep Creek vacation properties don't meet the primary residence test.
4. Short tenure (under 2 years) without partial exclusion If you haven't met the 24-month use test and don't qualify for a partial exclusion, the full gain is taxable.
5. Inherited property sold after it appreciates Gain above the stepped-up basis is taxable, so appreciation after the date of death matters most.

Who most often pays in the Maryland market

In Montgomery County's higher-appreciation submarkets, Bethesda, Chevy Chase, Potomac, Kensington, long-tenure sellers of homes bought in the 1990s or early 2000s are the most common group that exceeds the $500,000 married exclusion. A couple who bought a Bethesda colonial in 1998 for $425,000 and sells it today for $1.45 million has roughly $1 million in unrealized gain, of which about $500,000 is taxable at the combined federal and Maryland rates.

Rental and investment sellers, particularly those who converted a former primary residence into a rental, face a different complication: depreciation recapture. The IRS claws back prior depreciation deductions at up to a 25% federal rate, and Maryland adds its ordinary income treatment on top.

Maryland State Tax Rates on Capital Gains

Maryland does not have a preferential capital gains rate. Your home sale gain, if taxable, is layered on top of your other taxable income and taxed at your marginal Maryland income tax bracket. For 2026, those brackets range from 2% at the lowest tier to 6.5% at the top, after the Budget Reconciliation and Financing Act of 2025 added 6.25% and 6.5% brackets for high earners.

2026 Maryland state tax brackets (reference)

Taxable Income (Single) Taxable Income (MFJ) Marginal Rate
$0 to $1,000 $0 to $1,000 2.0%
$1,001 to $2,000 $1,001 to $2,000 3.0%
$2,001 to $3,000 $2,001 to $3,000 4.0%
$3,001 to $100,000 $3,001 to $150,000 4.75%
$100,001 to $125,000 $150,001 to $175,000 5.0%
$125,001 to $150,000 $175,001 to $225,000 5.25%
$150,001 to $250,000 $225,001 to $300,000 5.5%
$250,001 to $500,000 $300,001 to $600,000 5.75%
$500,001 to $1,000,000 $600,001 to $1,200,000 6.25%
$1,000,001+ $1,200,001+ 6.5%

Source: Comptroller of Maryland, Maryland Withholding Tax Facts, January to December 2026 (revised December 2025). The married column also applies to head of household and qualifying surviving spouse filers.

Because capital gains stack on top of your wages, a large home sale gain in a single year usually pushes sellers into the 5.75% bracket or higher. A Silver Spring homeowner earning $175,000 at their job who sells a rental property with a $300,000 gain will pay 5.75% on most of that gain, plus the county income tax discussed next, and because that seller's federal adjusted gross income now tops $350,000, the 2% surtax as well.

The 2% capital gains surtax (tax year 2025 onward)

Maryland's 2025 budget law added a 2% tax on net capital gains for individuals and couples whose federal adjusted gross income exceeds $350,000. The threshold is the same for single and joint filers, and the gain from the sale itself counts toward it. The surtax is calculated on Maryland Form 502CG and paid with your regular return.

Home sellers get an important exception

The surtax does not apply to gain from selling your primary residence (single-family home, townhome, row home, condo, or co-op unit) if the home sold for less than $1.5 million. Rentals, second homes, and primary residences that sell for $1.5 million or more do not get this exception. Source: Comptroller of Maryland, Technical Bulletin No. 58, effective December 29, 2025.

Maryland tax brackets shift periodically

These brackets reflect Maryland Comptroller guidance for tax year 2026. The General Assembly changed brackets, the local rate cap, and capital gains treatment in its 2025 session, so always confirm current-year rules with a Maryland tax professional before filing.

County Income Tax: The Local Layer Most Sellers Forget

This is where Maryland's tax math gets uncomfortable. Every Maryland county (and Baltimore City) levies its own local income tax on top of the state rate, and that local rate also applies to capital gains. For a seller living in Montgomery or Howard County, the combined Maryland tax on a home sale gain reaches 8.95% in the 5.75% state bracket and 9.70% in the 6.5% top bracket, before any 2% surtax.

Maryland county income tax rates for 2026 (common jurisdictions)

County / Jurisdiction 2026 Local Rate Combined at 5.75% State Bracket Combined at 6.5% Top Bracket
Montgomery County 3.20% 8.95% 9.70%
Howard County 3.20% 8.95% 9.70%
Prince George's County 3.20% 8.95% 9.70%
Baltimore City 3.20% 8.95% 9.70%
Baltimore County 3.20% 8.95% 9.70%
Anne Arundel County 2.70% to 3.20% (tiered) 8.69% to 8.95% 9.70%
Frederick County 2.25% to 3.20% (tiered) 8.95% 9.70%
Carroll County 3.03% 8.78% 9.53%
Charles County 3.03% 8.78% 9.53%
Kent and Dorchester Counties 3.30% 9.05% 9.80%
Worcester County 2.25% 8.00% 8.75%

Source: Comptroller of Maryland, 2026 local income tax rates (revised December 2025). Combined figures exclude the 2% capital gains surtax.

Rates are set annually by each county and published by the Maryland Comptroller's office. State law now lets counties go as high as 3.30%, and Kent and Dorchester counties use that cap for 2026. Anne Arundel and Frederick counties operate graduated local brackets rather than a flat rate. Always confirm your county's current-year rate before running a final calculation.

How the county stacks visually

For a seller in the 5.75% state bracket, here's what the combined Maryland tax looks like across common counties on every $100,000 of taxable gain:

$9,050Kent / Dorchester County (3.30%)
$8,950Montgomery County (3.20%)
$8,950Howard County (3.20%)
$8,780Carroll County (3.03%)
$8,690Anne Arundel County (2.94% middle tier)
$8,000Worcester County (2.25%)

Add federal long-term capital gains tax (15% or 20% for most taxable sellers) plus the 3.8% Net Investment Income Tax if you're a high earner, and the all-in rate on a taxable Maryland home sale gain commonly lands between 25% and 33%. For the highest earners, the 6.5% bracket and the 2% surtax can push it toward 36%.

Non-Resident Sellers and Maryland's 8.75% Withholding Rule

Maryland is one of several states that requires settlement agents to withhold income tax at closing from sellers who aren't Maryland residents. This surprises a lot of out-of-state owners, including former Maryland residents who moved to Virginia, DC, or Florida but kept a rental property.

How the non-resident withholding works

Seller Type Withholding Rate Withheld On
Non-resident individual, estate, or trust 8.75% (was 8.00%) Total payment to the seller (sale price less mortgage payoff and selling expenses)
Non-resident entity (LLC, corporation) 8.25% Total payment to the seller (sale price less mortgage payoff and selling expenses)
Maryland resident No withholding required Report and pay on next Maryland return

Source: Comptroller of Maryland Tax Alert, April 13, 2026. The 8.75% individual rate applies to sales occurring after June 30, 2025.

The critical thing to understand: this is a prepayment, not an additional tax. Whatever Maryland withholds at closing is credited against your actual Maryland income tax liability when you file Form 505 (non-resident return) after year-end. If the withholding exceeds what you actually owe, you get a refund. The withholding rate does not include the 2% capital gains surtax, so a non-resident who expects to owe the surtax should plan an estimated payment.

How to reduce non-resident withholding at closing

Maryland's Comptroller offers a mechanism called Form MW506AE, Application for Certificate of Full or Partial Exemption. Filed at least 21 days before closing, this form lets non-resident sellers request reduced or zero withholding when they expect no Maryland tax liability (for example, a sale fully covered by the Section 121 exclusion). Approval isn't automatic; the Comptroller reviews the estimated gain and basis before issuing the certificate.

If tax was already withheld, Form MW506R lets a non-resident apply for a tentative refund no earlier than 60 days after the deed is filed and no later than December 1 of the sale year. Sellers of property that sold for $1.5 million or more are no longer eligible for the tentative refund and must wait for their year-end return.

Example, non-resident withholding in action

A Florida couple sells a former Bethesda primary residence for $950,000 with $200,000 remaining on the mortgage. Proceeds after mortgage payoff: $750,000 (selling expenses would reduce this further). Maryland withholds 8.75% × $750,000 = $65,625 at closing, even though the couple's actual Maryland tax liability is likely zero (the gain is covered by the $500,000 exclusion). They file Form MW506AE 21+ days before closing to reduce or eliminate this withholding.

Step-by-Step Maryland Capital Gains Calculation

Let's work through a realistic Maryland scenario end-to-end. The setup: A married couple in Silver Spring, Montgomery County, bought their home in 2009 for $525,000. They're selling in 2026 for $1,275,000. They've lived in it as their primary residence the entire time and have made $75,000 in qualifying capital improvements.

1Calculate adjusted cost basis

Original purchase price ($525,000) + closing costs from original purchase ($12,000) + capital improvements ($75,000) = $612,000 adjusted basis.

2Calculate net sale price

Sale price ($1,275,000) − commission ($19,125 at 1.5% with The Jamil Brothers, or $38,250 at 3% traditional) − other closing costs ($12,750, 1%) = $1,243,125 net sale (Jamil Brothers) or $1,224,000 net (traditional).

3Calculate realized gain

Net sale ($1,243,125) − adjusted basis ($612,000) = $631,125 realized gain (using the Jamil Brothers 1.5% scenario).

4Apply Section 121 exclusion

Realized gain ($631,125) − married filing jointly exclusion ($500,000) = $131,125 taxable gain.

5Calculate federal capital gains tax

Assuming the couple's household income puts them in the 15% federal long-term capital gains bracket: $131,125 × 15% = $19,669 federal. This example assumes the 3.8% NIIT doesn't apply; couples with modified adjusted gross income above $250,000 should add it.

6Calculate Maryland state tax

$131,125 × 5.75% bracket = $7,540 Maryland state tax. No 2% surtax is added here because the home is a primary residence that sold for less than $1.5 million.

7Calculate Montgomery County local tax

$131,125 × 3.20% = $4,196 Montgomery County tax.

8Total tax bill

$19,669 federal + $7,540 Maryland + $4,196 county = $31,405 total capital gains tax on a $131,125 taxable gain (roughly 24% effective rate on the taxable portion).

Note that in this example, $500,000 of the gain was completely tax-free thanks to the Section 121 exclusion. The same couple on an investment property with no exclusion would have faced tax on the full $631,125, roughly $150,000+ in combined tax, with the 2% surtax likely added on top.

Your Cost Basis: What Adds to It and What Doesn't

Cost basis is the single biggest lever sellers control. Every dollar you can legitimately add to your basis reduces your taxable gain dollar-for-dollar. Most homeowners dramatically understate their basis because they forget decades of qualifying improvements.

✓ Adds to Basis or Reduces Gain × Does Not Add to Basis
Original purchase price Routine maintenance and repairs
Settlement costs from purchase (title, recording, attorney) Painting (interior, unless part of larger project)
Kitchen and bathroom remodels HVAC repair (replacement adds; repair doesn't)
Finished basement, attic, or additions Lawn care, pest control, cleaning services
New roof, windows, siding, gutters Mortgage interest or property taxes
HVAC system replacement Homeowners insurance premiums
Decks, patios, driveways, fences HOA dues
Landscaping improvements (not routine mowing) Appliance replacements (unless built-in)
Solar panels, EV chargers, energy systems Utility bills
Selling costs (commission, transfer tax, staging) Depreciation deductions (these reduce basis if the home was rented)

The test for what counts: does the improvement add value, prolong the home's life, or adapt it to new uses? If yes, it adds to basis. A $40,000 kitchen renovation adds to basis. Repainting the kitchen every five years does not. Replacing the roof adds to basis. Patching a leak does not.

Keep every receipt, forever

The IRS can challenge basis claims decades after an improvement. Contractor invoices, canceled checks, permit records, and HOA approval letters are all acceptable documentation. Maryland sellers who bought their homes in the 1990s or early 2000s should dig through storage boxes before filing.

Run Your Maryland Net Proceeds Scenario

Even when you owe zero capital gains tax, commission is the largest variable on your closing disclosure. Pick a home-value tile below to see side-by-side what a traditional 3% listing agent costs versus the 1.5% full-service program from The Jamil Brothers.

Seller Savings Calculator

How much more do you keep with our 1.5% listing fee?

Select your home's estimated value to see your real net proceeds, side by side.

Traditional Agent: 3%

Sale price $500,000
Listing fee (3%) −$15,000
Buyer's agent (2.5%) −$12,500
Est. closing (1%) −$5,000
Net Proceeds $467,500

The Jamil Brothers: 1.5% Full-Service

Sale price $500,000
Listing fee (1.5%) −$7,500
Buyer's agent (2.5%) −$12,500
Est. closing (1%) −$5,000
Net Proceeds $475,000
Extra in your pocket$7,500vs. a traditional 3% listing agent, with zero reduction in service or marketing.

Traditional Agent: 3%

Sale price $750,000
Listing fee (3%) −$22,500
Buyer's agent (2.5%) −$18,750
Est. closing (1%) −$7,500
Net Proceeds $701,250

The Jamil Brothers: 1.5% Full-Service

Sale price $750,000
Listing fee (1.5%) −$11,250
Buyer's agent (2.5%) −$18,750
Est. closing (1%) −$7,500
Net Proceeds $712,500
Extra in your pocket$11,250vs. a traditional 3% listing agent, with zero reduction in service or marketing.

Traditional Agent: 3%

Sale price $1,000,000
Listing fee (3%) −$30,000
Buyer's agent (2.5%) −$25,000
Est. closing (1%) −$10,000
Net Proceeds $935,000

The Jamil Brothers: 1.5% Full-Service

Sale price $1,000,000
Listing fee (1.5%) −$15,000
Buyer's agent (2.5%) −$25,000
Est. closing (1%) −$10,000
Net Proceeds $950,000
Extra in your pocket$15,000vs. a traditional 3% listing agent, with zero reduction in service or marketing.

Traditional Agent: 3%

Sale price $1,500,000
Listing fee (3%) −$45,000
Buyer's agent (2.5%) −$37,500
Est. closing (1%) −$15,000
Net Proceeds $1,402,500

The Jamil Brothers: 1.5% Full-Service

Sale price $1,500,000
Listing fee (1.5%) −$22,500
Buyer's agent (2.5%) −$37,500
Est. closing (1%) −$15,000
Net Proceeds $1,425,000
Extra in your pocket$22,500vs. a traditional 3% listing agent, with zero reduction in service or marketing.

Traditional Agent: 3%

Sale price $2,000,000
Listing fee (3%) −$60,000
Buyer's agent (2.5%) −$50,000
Est. closing (1%) −$20,000
Net Proceeds $1,870,000

The Jamil Brothers: 1.5% Full-Service

Sale price $2,000,000
Listing fee (1.5%) −$30,000
Buyer's agent (2.5%) −$50,000
Est. closing (1%) −$20,000
Net Proceeds $1,900,000
Extra in your pocket$30,000vs. a traditional 3% listing agent, with zero reduction in service or marketing.

Traditional Agent: 3%

Sale price $3,000,000
Listing fee (3%) −$90,000
Buyer's agent (2.5%) −$75,000
Est. closing (1%) −$30,000
Net Proceeds $2,805,000

The Jamil Brothers: 1.5% Full-Service

Sale price $3,000,000
Listing fee (1.5%) −$45,000
Buyer's agent (2.5%) −$75,000
Est. closing (1%) −$30,000
Net Proceeds $2,850,000
Extra in your pocket$45,000vs. a traditional 3% listing agent, with zero reduction in service or marketing.

Traditional Agent: 3%

Sale price $4,000,000
Listing fee (3%) −$120,000
Buyer's agent (2.5%) −$100,000
Est. closing (1%) −$40,000
Net Proceeds $3,740,000

The Jamil Brothers: 1.5% Full-Service

Sale price $4,000,000
Listing fee (1.5%) −$60,000
Buyer's agent (2.5%) −$100,000
Est. closing (1%) −$40,000
Net Proceeds $3,800,000
Extra in your pocket$60,000vs. a traditional 3% listing agent, with zero reduction in service or marketing.

Estimates only. Closing costs vary by Maryland county. Buyer's agent commission is negotiable. Income and capital gains taxes not included. Final commission and services are set in the signed listing agreement.

Full-Service · No TradeoffsList for 1.5%: Keep More of Your Maryland Equity

4K photography, drone video, 3D tours, expert negotiation, and full MLS marketing, all included at 1.5%. On a $1M Montgomery County home, sellers keep roughly $15,000 more compared to a traditional 3% listing agent.

Save Up To$15,000vs. traditional 3% agent on a $1M home

Strategies to Legally Reduce Maryland Capital Gains

Legitimate tax-reduction strategies fall into four categories: time the sale, increase your basis, offset with losses, or defer through a 1031 exchange. Each has trade-offs and strict rules.

1. Meet the Section 121 use test

If you're close to the 24-month threshold, say, you've owned and lived in a Columbia home for 22 months, waiting just two more months can save tens of thousands in tax. Run the math before you list. A few months of patience may be the single highest-ROI decision in a home sale.

2. Maximize your adjusted basis

Pull together every receipt for capital improvements since the date you bought. Contractor invoices, permit records from your county, and HOA approval letters all support basis claims. If you did a $60,000 kitchen remodel in 2017, that's $60,000 less taxable gain at sale, worth roughly $15,000+ in federal and Maryland tax savings at the top combined rate.

3. Offset with capital losses

If you have unrealized losses in a brokerage account, selling those positions in the same tax year as your home sale offsets gain dollar-for-dollar. This is called "tax-loss harvesting." Coordinate carefully with a financial advisor. Maryland's treatment of capital losses mirrors the federal rules, so what works for federal typically works for state too.

4. 1031 exchange (investment property only)

For Maryland investment properties and rentals, never for primary residences, a Section 1031 like-kind exchange defers all federal and Maryland capital gains tax. You roll the proceeds into a replacement investment property and your basis carries forward. Strict timelines apply: 45 days to identify replacement properties, 180 days to close. Use a qualified intermediary; do not touch the proceeds personally.

5. Installment sale

If you finance the buyer over multiple years (an installment sale), you recognize gain proportionally each year as payments come in, potentially staying in lower marginal brackets and, for some sellers, under the $350,000 surtax threshold. This is more common in investment property sales than primary-residence sales, but it's a legitimate strategy for Maryland sellers with unusually large gains.

6. Move into a rental before selling

Converting a Maryland rental into your primary residence, then meeting the 24-month use test, allows partial use of the Section 121 exclusion. The exclusion is prorated based on the ratio of qualifying use to total ownership, and prior depreciation is still recaptured separately. This strategy works best when executed well in advance of sale.

Know Your NumbersSee Exactly What You'll Walk Away With

Our seller net sheet calculator breaks down every cost, commission, Maryland transfer and recordation taxes, estimated capital gains, closing fees, so you know your real bottom line before you list.

Special Situations: Divorce, Inheritance, 1031, Military

Selling during or after divorce

Divorce is one of the most common triggers for an unplanned Maryland home sale. The good news: if the sale happens while still legally married, both spouses can claim the $500,000 MFJ exclusion together on a joint return. If the sale happens after a Maryland divorce decree is final, each spouse claims their own $250,000 exclusion on separate returns, provided each meets the ownership and use tests individually. Transfer-on-divorce rules can also preserve basis between spouses, so consult a Maryland family law attorney and a CPA together.

Inherited homes: the stepped-up basis

Heirs receive a stepped-up basis equal to the home's fair market value on the date of death, not the decedent's original purchase price. This wipes out most historical appreciation. An heir selling a Maryland inherited home soon after death often has little or no capital gains tax because the basis reset is so favorable. If the heir holds the property and it appreciates further, gain on that additional appreciation is taxable.

Military sellers and the PCS extension

Active-duty military service members on qualified official extended duty can suspend the 5-year Section 121 look-back period for up to 10 years. A Marine who bought a home in Waldorf in 2018, rented it during a long PCS assignment, and returns to sell it in 2030 can still qualify for the full exclusion, provided the cumulative use test is met within the extended window. The suspension is an election the service member makes on the tax return for the year of sale.

1031 exchange mechanics (investment only)

For a Maryland rental property, a 1031 exchange defers all capital gains by rolling proceeds into a replacement "like-kind" investment property. Residential rental for residential rental qualifies. Commercial for commercial qualifies. Primary residence swaps do not qualify. Work with a qualified intermediary, you never take possession of funds, or the exchange is disqualified. The Maryland Comptroller confirms that gain deferred federally under Section 1031 is also left out of Maryland adjusted gross income.

Need Speed or Certainty?Explore Your Cash Offer Option

If timing, condition, inherited property, or certainty matters more than maximum price, a cash offer may be the right fit. We'll walk you through your full range of options, no pressure, no commitment.

Documents to Gather Before You File

When your CPA prepares the sale-year return, these documents cut the work (and the bill) in half:

Tax Preparation Checklist

  • ✓Original HUD-1 or Closing Disclosure from your purchase
  • ✓Current sale Closing Disclosure
  • ✓Form 1099-S (issued by your settlement agent after closing)
  • ✓Contractor invoices for every capital improvement (kitchen, bath, roof, HVAC, additions)
  • ✓Building permits from Maryland jurisdiction for major work
  • ✓HOA or condo association approval letters for improvements
  • ✓Records of any non-resident withholding (Form MW506NRS, if applicable) for credit on Form 505
  • ✓Depreciation schedule (if home was ever used as rental)
  • ✓Appraisal or date-of-death value (for inherited properties)

Maryland residents report the home sale on Form 502 (resident return); non-residents use Form 505 to claim any withheld amounts and reconcile the final liability. Both forms incorporate the federal Schedule D and Form 8949 from your federal return, and sellers over the $350,000 federal AGI threshold also complete Form 502CG for the 2% surtax.

How to Choose a Maryland Listing Agent

Capital gains tax is one line item. Commission is another. And on a Maryland sale that's already subject to transfer and recordation taxes plus state and local income tax on the taxable gain, commission is frequently the single largest controllable cost on your closing disclosure. The right listing agent pairs tax-aware pricing strategy with disciplined negotiation.

Objective criteria worth weighing

Criterion What to Look For
Local track record Verified transaction count in your specific Maryland county and price point
List-to-sale ratio Higher is better, shows disciplined pricing and negotiation strength
Marketing package Professional photography, drone video, 3D tour, staging, and full Bright MLS syndication, all included
Commission structure Full-service fees in Maryland range from 1.5% to 3.0%, confirm what's included at each price
Coordination with your CPA Agents who proactively loop in tax advisors flag avoidable mistakes before listing
Reviews and reputation Verified third-party reviews on Google, Zillow, and Realtor.com, read the 4-star reviews, not just the 5-stars

The Jamil Brothers Realty Group operates across Maryland, Northern Virginia, DC, and West Virginia under Samson Properties.

Sellers comparing pricing structures can also review our flexible commission options to match the right service level to their budget.

Our 1.5% full-service listing program includes 4K photography, drone video, 3D tours, professional staging consultation, MLS syndication, and partner-led negotiation, the full package at half the traditional 3% listing fee.

Want to see the process from pricing to closing? Start with our guide to selling your home with The Jamil Brothers.

Frequently Asked Questions

How much capital gains tax do I pay when selling a house in Maryland?

Most Maryland homeowners selling a primary residence pay zero capital gains tax because the federal Section 121 exclusion shields up to $250,000 of gain for single filers and $500,000 for married couples filing jointly. When tax does apply, on investment properties, short-tenure sales, or gains above the exclusion, Maryland taxes the gain at ordinary income rates (2% to 6.5% state for 2026, plus county income tax of 2.25% to 3.30%). Sellers with federal adjusted gross income above $350,000 also pay a 2% state surtax on net capital gains, unless the gain comes from a primary residence sold for less than $1.5 million. Federal long-term capital gains tax of 0%, 15%, or 20% applies separately.

Does Maryland tax capital gains on a primary residence?

Maryland taxes capital gains as ordinary income, but because the state uses federal adjusted gross income as its starting point, the Section 121 primary residence exclusion ($250,000 single / $500,000 MFJ) passes through to Maryland automatically. If your federal gain is zero after the exclusion, your Maryland gain is also zero. Maryland only taxes what exceeds the federal exclusion, and it taxes that excess at your regular state and county income tax bracket. The 2% capital gains surtax does not apply to a primary residence that sold for less than $1.5 million.

What is the non-resident withholding rate in Maryland for home sellers?

Maryland requires settlement agents to withhold 8.75% for non-resident individuals, estates, and trusts and 8.25% for non-resident entities on the total payment to the seller at closing. The individual rate rose from 8.00% for sales after June 30, 2025. This is a prepayment toward your Maryland tax liability, not an additional tax, it's credited against what you actually owe when you file Maryland Form 505. Non-residents who expect no Maryland tax liability can file Form MW506AE at least 21 days before closing to reduce or eliminate the withholding.

How do I avoid capital gains tax in Maryland when selling my home?

The most common way to avoid Maryland capital gains tax is to qualify for the federal Section 121 exclusion by owning and living in the home as your primary residence for at least 24 of the last 60 months. Married couples filing jointly exclude up to $500,000 of gain; single filers exclude up to $250,000. Additional strategies include maximizing your adjusted cost basis with documented capital improvements, offsetting with capital losses, executing a 1031 exchange (investment properties only), or timing the sale to a lower-income year.

Is there a senior capital gains exemption in Maryland?

There is no age-based capital gains exemption in Maryland or at the federal level. Congress eliminated the over-55 home sale exclusion in 1997 and replaced it with the current Section 121 exclusion, which applies to all qualifying homeowners regardless of age. Maryland offers separate senior tax credits on retirement income and property taxes, but these do not reduce capital gains tax on a home sale.

How long do I have to live in my house to avoid capital gains tax in Maryland?

To qualify for the full Section 121 exclusion, you must have owned and lived in the home as your primary residence for at least 24 months (not necessarily consecutive) out of the 5 years ending on the sale date. Sellers who fall short may still qualify for a prorated partial exclusion if the sale is caused by a qualifying reason, job relocation more than 50 miles away, health issues, divorce, death of a spouse, multiple births, or military PCS orders.

How is capital gains tax calculated on a Maryland investment property?

Investment property sales in Maryland don't qualify for the Section 121 exclusion, so the full realized gain is taxable. First, prior depreciation deductions are recaptured at up to a 25% federal rate. The remaining gain is then taxed at federal long-term capital gains rates (0%, 15%, or 20% based on income) plus Maryland state tax (2% to 6.5%) and county income tax (2.25% to 3.30%). Investors with federal adjusted gross income above $350,000 also owe Maryland's 2% capital gains surtax, and high-income investors may owe the 3.8% federal Net Investment Income Tax. A 1031 exchange into another investment property can defer all of this.

What happens if I sell my Maryland home before 2 years?

Selling before meeting the 24-month ownership and use tests generally disqualifies you from the Section 121 exclusion, and the entire gain becomes taxable. However, if the sale is caused by a qualifying reason, job relocation, health, unforeseen circumstances, divorce, death, or military PCS, you may claim a prorated partial exclusion. The prorated amount equals the fraction of 24 months you satisfied, multiplied by the full exclusion. Example: 12 months of qualifying use = 12/24 × $500,000 = $250,000 partial exclusion for married filers.

Do I pay capital gains tax if I inherit and sell a Maryland home?

Inherited homes receive a stepped-up basis equal to the fair market value on the date of death. This means the taxable gain is calculated only on appreciation after inheritance, not on the original owner's decades of appreciation. If you sell an inherited Maryland home shortly after receiving it, taxable gain is typically minimal or zero. Maryland also has an inheritance tax that applies separately to certain heirs and is handled through the estate, not at the sale.

How do I choose a Maryland listing agent who understands capital gains implications?

Look for an agent who coordinates proactively with your CPA, has a documented track record in your specific Maryland county and price range, publishes transparent commission terms, and can provide a detailed net sheet that itemizes commission, transfer and recordation taxes, and estimated capital gains. Verified third-party reviews, especially the 4-star reviews, reveal real working style. The Jamil Brothers Realty Group, licensed in Maryland and based in the DMV, offers a 1.5% full-service listing program and coordinates with sellers' tax advisors when tax-aware timing matters.

Who is the best realtor in Maryland?

There is no official ranking of Maryland real estate agents, so the best fit depends on your county, price range, and goals. In our opinion, The Jamil Brothers Realty Group is a strong choice for Maryland home sellers: the team is licensed in Maryland, works under Samson Properties, offers a full-service 1.5% listing program, and provides a free net sheet that itemizes commission, transfer and recordation taxes, and estimated capital gains tax exposure. We are real estate agents, not tax advisors, so we coordinate with your CPA on the tax side. Compare any agent on verified reviews, recent sales in your county, and written commission terms before you sign.

What Maryland closing costs are deductible from my capital gains?

Selling expenses reduce your realized gain directly. Deductible sale-side costs include listing agent commission, buyer's agent commission, Maryland state transfer tax and recordation tax paid by the seller, title settlement fees, legal fees, and staging costs. These costs are subtracted from the sale price before calculating gain, effectively reducing your taxable profit dollar-for-dollar. Routine pre-sale repairs generally do not count, so ask your CPA which prep costs qualify. Keep the Closing Disclosure and every invoice, your CPA will need them.

What mistakes should I avoid when dealing with Maryland capital gains tax?

The most expensive mistakes: understating your cost basis by forgetting decades of capital improvements, failing to file Form MW506AE before closing as a non-resident seller (triggering 8.75% unnecessary withholding), missing the 24-month use test by just a few weeks, confusing repairs with capital improvements, overlooking the 2% surtax when a sale pushes federal adjusted gross income over $350,000, and not coordinating the sale timing with other income (a large bonus or stock sale in the same year can push you into a higher bracket). A pre-listing consultation with both a Maryland-licensed real estate agent and a Maryland CPA is almost always worth the hour.

Glossary

Capital Gain

The profit on a sale, net sale price minus adjusted cost basis. Only the gain is taxable, not the full sale price.

Adjusted Cost Basis

Your starting investment in the home, purchase price plus settlement costs plus capital improvements. This is the single biggest lever for reducing taxable gain.

Section 121 Exclusion

The federal rule that excludes up to $250,000 (single) or $500,000 (MFJ) of primary-residence gain from tax if ownership and use tests are met.

Ordinary Income Rate

The rate at which wages and non-preferential income are taxed. Maryland treats capital gains as ordinary income for state tax purposes.

Capital Gains Surtax

Maryland's additional 2% tax on net capital gains for filers with federal adjusted gross income above $350,000, effective tax year 2025. Primary residences sold for less than $1.5 million are exempt.

Depreciation Recapture

Recovery of prior-year depreciation deductions when an investment property is sold, taxed federally at up to 25%. Applies to former rentals even if now converted to primary use.

Stepped-Up Basis

For inherited property, basis resets to fair market value on the date of the decedent's death, usually eliminating most historical appreciation from taxable gain.

Form MW506AE

Maryland Comptroller form allowing non-resident sellers to request reduced or zero withholding at closing by demonstrating expected tax liability.

1031 Exchange

A federal tax deferral mechanism that rolls investment property sale proceeds into a replacement like-kind investment property. Does not apply to primary residences.

Federal Adjusted Gross Income (FAGI)

Your total income after federal adjustments. Maryland uses it as the starting point for state tax and as the $350,000 test for the capital gains surtax.

Next Steps: Know Before You List

The sellers who end up happiest with their Maryland closing almost always do three things before listing: they get a real valuation (not an automated estimate), they run a full net sheet that includes capital gains tax exposure, and they coordinate sale timing with their CPA. Each of those three steps costs nothing. They often save tens of thousands.

The Jamil Brothers Realty Group offers the first two to Maryland sellers at no cost, street-level comps and a personalized seller net sheet, plus a conversation about timing that we coordinate with your CPA. Whether you end up listing with us or not, starting with clear numbers is always the right first move. And if your move includes buying again in the area, you can browse current Maryland homes for sale while you plan your timing.

Maryland is one part of a connected regional market. Many sellers we work with are moving between Maryland, Washington DC, and Virginia, where state income tax rules on a home sale differ. As real estate specialists serving the DMV, we can line up a sale on one side of the Potomac with a purchase on the other.

Start Your Sale RightGet a Free Valuation + Your Personalized Net Sheet

Know your Maryland equity, understand your capital gains exposure, and see exactly what you'll walk away with, before you make any decisions. The Jamil Brothers provide a full seller consultation at no cost or obligation.

Save Up To$15,000vs. traditional 3% agent on a $1M home
About the Author
SJ Saad Jamil REALTOR®, e-PRO® · Co-Founder, The Jamil Brothers Realty Group · Samson Properties

Saad Jamil co-founded The Jamil Brothers Realty Group with his brother Arslan Jamil and has been licensed since 2013. The team is licensed in Virginia, Maryland, DC, and West Virginia and works with sellers across Montgomery, Prince George's, Howard, Frederick, Anne Arundel, and Baltimore counties. Team record: 900+ homes sold, $500M+ in closed volume, 500+ five-star reviews, and NVAR Lifetime Top Producer status. Reviews and closed sales are on the team's Zillow profile.

Saad writes these guides to help homeowners understand the costs that shape a home sale. He is a real estate agent, not a CPA or tax attorney, and this article is information, not tax advice. Learn more about The Jamil Brothers or meet our team.

Questions about selling your Maryland home? Email saad@thejamilbrothers.com, call (703) 782-4830, or contact our team.

Reviewed by Arslan Jamil, Associate Broker, ABR® · Published April 24, 2026 · Last updated September 21, 2026

Maryland Counties and Nearby DMV Areas

Local income tax rates and transfer taxes change at every county line. Explore the Maryland counties we serve:

Nearby areas across the DMV

Data sources: Comptroller of Maryland (2026 Withholding Tax Facts, revised December 2025; Technical Bulletin No. 58, effective December 29, 2025; Tax Alert on non-resident withholding, April 13, 2026) and IRS Publication 523. Disclosure: This article is informational only and is not tax, legal, or financial advice. The Jamil Brothers Realty Group does not provide tax preparation or tax advisory services. Capital gains tax outcomes depend on individual circumstances, and Maryland and federal tax rules change periodically. Always consult a Maryland-licensed CPA or tax attorney before making decisions based on specific tax scenarios.

Explore More

Browse Every Corner of the DMV Market

Whether you're searching by budget, neighborhood, or buying situation, find exactly what you need below.





Full-Service · No TradeoffsList for 1.5% & Keep More EquityProfessional photography, drone video, 3D tours, and expert negotiation, all included. On an $800K home, that's $12,000 more in your pocket vs. a 3% agent.See the 1.5% Program →
Need Speed or Certainty?Get a No-Obligation Cash OfferSkip the showings, skip the contingencies. If timing or condition matters more than top dollar, a cash offer may be the right fit. We'll walk you through every option.Explore Cash Offers →
Team Online Same-Day Response

Send Us a Message

Fields marked * are required.

Your information is secure and never shared.

Message Sent!

Thank you for reaching out. Arslan & Saad have received your details and will be in touch shortly.
Need immediate assistance? Call or text 703-782-4830.