Capital Gains Tax on Home Sale in Maryland

Capital Gains Tax on Home Sale in Maryland – Selling a home in Maryland can be a major financial milestone, but understanding the capital gains tax implications is essential to maximize your proceeds. Whether you’re a first-time seller or a seasoned homeowner, Maryland follows federal rules for primary residence exclusions while taxing any remaining gain as ordinary income at the state and local levels. Recent changes, including a new 2% surtax on high earners, add complexity for 2025 and 2026 tax years.

This guide breaks down everything USA-based homeowners, real estate investors, and Maryland residents need to know about capital gains tax on home sales in the state.

What Is Capital Gains Tax on Home Sale in Maryland?

Capital gains tax applies to the profit (sale price minus your adjusted basis) when you sell a home or other real estate. In Maryland, there is no standalone “capital gains tax”—gains are included in your Maryland adjusted gross income and taxed at regular state income tax rates (currently ranging from 2% to 6.5% depending on income bracket and filing status), plus your county’s local income tax (typically 2.25%–3.3%).

Federally, long-term capital gains (assets held over one year) are taxed at preferential rates of 0%, 15%, or 20%, plus a possible 3.8% Net Investment Income Tax (NIIT) for high earners. Short-term gains are taxed as ordinary income.

The good news: Most Maryland homeowners pay zero capital gains tax on their primary residence thanks to generous federal exclusions that Maryland honors.

Federal Capital Gains Tax Exclusion for Primary Residences in Maryland

The IRS allows you to exclude up to $250,000 of gain if single (or $500,000 if married filing jointly) on the sale of your main home under Section 121 of the Internal Revenue Code.

To qualify for the full exclusion, you must meet both the ownership and use tests:

  • You owned the home for at least 2 of the 5 years before the sale.
  • You lived in the home as your primary residence for at least 2 of the 5 years before the sale (the periods do not have to be consecutive).

Additional rules apply:

  • The exclusion applies only to your main home (not vacation homes or pure investment properties).
  • You generally cannot claim it if you used a like-kind exchange in the prior 5 years.
  • Partial exclusions are available for job changes, health issues, or other unforeseen circumstances.

This exclusion reduces your federal taxable gain and flows through to your Maryland return, significantly lowering or eliminating state tax liability for most sellers.

How Maryland Taxes Capital Gains from Home Sales?

Maryland conforms to federal adjusted gross income (AGI) with limited modifications. The federal home sale exclusion applies first, so any excluded gain is generally not taxable in Maryland either.

Any gain above the federal exclusion is taxed in Maryland as ordinary income at the state’s progressive rates (updated for 2025–2026 with new top brackets of 6.25% and 6.5% for high earners) plus your local county income tax. There is no special long-term capital gains rate at the state level—short- and long-term gains are treated the same.

Maryland’s New 2% Capital Gains Surtax for High Earners (Effective 2025+)

For tax years beginning after December 31, 2024 (i.e., 2025 and later), Maryland imposes an additional 2% surtax on net capital gains if your federal adjusted gross income (FAGI) exceeds $350,000 (same threshold regardless of filing status).

Key exception for home sales: Gains from the sale of a primary residence are fully exempt from this 2% surtax if the property is a single-family home, townhome, row home, condominium, or cooperative unit and sold for less than $1,500,000. This protection makes the surtax irrelevant for the vast majority of Maryland primary home sales.

The surtax applies to other capital gains (stocks, rental properties, etc.) but spares qualifying primary residence gains under the $1.5 million threshold.

How to Calculate Capital Gains on Your Maryland Home Sale?

Follow these steps:

  1. Determine your selling price (amount realized, minus selling expenses like commissions and closing costs).
  2. Calculate your adjusted basis: Original purchase price + improvements – depreciation (if any) – prior exclusions or losses.
  3. Subtract basis from amount realized to get your gain.
  4. Apply the federal exclusion ($250k/$500k) if you qualify.
  5. Tax the remainder:
    • Federally at long-term capital gains rates (if held >1 year).
    • In Maryland as ordinary income (state + local rates), unless the 2% surtax applies (rare for primary homes under $1.5M).

Use IRS Publication 523 worksheets for precise calculations, especially partial exclusions.

Keep excellent records of home improvements—these increase your basis and reduce taxable gain.

Reporting Your Home Sale on Federal and Maryland Tax Returns

  • Federal: Report the sale on Form 8949 and Schedule D (Form 1040) if the gain exceeds the exclusion or you don’t qualify. Most qualifying sellers with gains fully excluded do not need to report the sale at all.
  • Maryland: File Form 502 (or 505 for nonresidents). The federal exclusion carries over, but report any taxable gain. Use Maryland Schedule K for capital gains/losses if needed.

Nonresidents selling Maryland property face mandatory withholding on proceeds (typically 8% or calculated gain amount) unless you obtain a certificate of exemption from the Comptroller.

Special Considerations for Nonresidents and Investors

Out-of-state sellers must navigate Maryland’s withholding rules and may owe taxes in both states (with credits available). Investment or second homes do not qualify for the $250k/$500k exclusion and are fully subject to capital gains tax at both federal and state levels.

Other Taxes and Fees When Selling a Home in Maryland

Capital gains tax is separate from:

  • State and local transfer/recordation taxes: Typically 0.5% state transfer tax (0.25% for first-time buyers in some cases) plus county-specific rates (0%–1.5%). These are paid at closing and are not deductible as capital gains adjustments.
  • Property taxes prorated at settlement.

Strategies to Minimize or Avoid Capital Gains Tax on Your Maryland Home Sale

  • Live in the home for at least 2 of the last 5 years to qualify for the exclusion.
  • Track every capital improvement to boost your basis.
  • Consider a 1031 exchange for investment properties (not primary homes).
  • Time the sale to stay under high-income thresholds if the 2% surtax could apply.
  • Consult a tax professional early—especially if your gain is close to the exclusion limit or you have complex circumstances (divorce, military service, etc.).

Frequently Asked Questions About Capital Gains Tax on Home Sales in Maryland

Do I owe capital gains tax if I sell my primary home in Maryland under the exclusion limits?
Usually no, if you qualify for the full $250k/$500k exclusion and the sale price is under $1.5 million (protecting you from the 2% surtax).

How does Maryland treat capital gains differently from the federal government?
Maryland taxes gains as ordinary income (no preferential rates) and adds the 2% surtax for high earners—except for qualifying primary residences.

What if my gain exceeds $250,000/$500,000?
You’ll owe federal long-term capital gains tax on the excess plus Maryland state and local income tax.

Are there changes for 2026?
Rates and rules above reflect 2025–2026 updates, including new state income brackets and the 2% surtax. Always verify with current IRS and Maryland Comptroller guidance.

Tax laws can change, and your situation may have unique factors. This article is for informational purposes only and is not tax advice. Consult a qualified CPA or tax attorney licensed in Maryland and review the latest IRS Publication 523 and Maryland Comptroller Technical Bulletin 58 for your specific circumstances. Planning ahead can save you thousands when selling your Maryland home.