Selling a house in Maryland triggers taxes at two stages: transaction taxes collected at the settlement table, and income tax on your profit that you settle up on your next return. The transaction side is unavoidable and comes out of your proceeds at closing. The income tax side is where most sellers pay nothing, because the federal primary residence exclusion wipes out up to $250,000 of profit for single filers and $500,000 for married couples filing jointly. Sellers with larger gains, nonresidents, and anyone selling an investment property face a stack of federal, state, local, and (as of late 2025) surcharge rates worth understanding before you sign a contract.
Transfer and Recordation Taxes at Closing
These are the taxes that hit the settlement statement regardless of whether you made a profit. They’re calculated on the sale price, not on your gain.
The state transfer tax is 0.5% of the sale price. It’s legally the seller’s responsibility unless the purchase contract shifts it to the buyer. When the buyer is a first-time Maryland homebuyer purchasing a principal residence and submits a sworn statement to that effect, the rate drops to 0.25%.1Maryland General Assembly. Maryland Tax – Property Code Section 13-203 – Rate of Tax
County transfer taxes stack on top and vary by jurisdiction. Montgomery County and Anne Arundel County each impose a 1% transfer tax on the sale price, with Anne Arundel adding a 0.5% surcharge on transactions of $1 million or more.2Montgomery County, MD MC311. Rates for the County Transfer Tax Fee3Department of Legislative Services. Local Tax Rates – 2026 County Local Tax Rates Combined with the 0.5% state rate, transfer taxes alone can run 1.5% or higher depending on the county.
The recordation tax is a separate charge for recording the deed and any mortgage with the Clerk of the Circuit Court, set by each county on a per-$500 or per-$1,000 basis. Montgomery County, for example, charges $8.90 per $1,000 of consideration up to $500,000 and 1.35% on amounts above that.2Montgomery County, MD MC311. Rates for the County Transfer Tax Fee Buyers typically pay the recordation tax on the mortgage amount, but the deed portion is often split or allocated to the seller depending on what the contract says. Everything here is negotiable, so read your purchase agreement before closing.
The Federal Primary Residence Exclusion
Section 121 of the federal tax code lets you exclude up to $250,000 of profit from the sale of your primary residence if you file as a single taxpayer, or up to $500,000 if you’re married filing jointly.4Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence Excluded gain isn’t subject to federal, Maryland state, or local income tax at all, because Maryland conforms to the federal exclusion.
To qualify for the full exclusion, you must have owned the home and lived in it as your primary residence for at least two of the five years before the sale. The two years don’t need to be consecutive. For the $500,000 joint exclusion, both spouses must meet the use requirement, though only one spouse needs to meet the ownership requirement.4Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence
If you sell before meeting the two-year requirement, a prorated exclusion is still available when the sale was primarily caused by a qualifying job relocation (new workplace at least 50 miles farther from the home than your old one), a health condition requiring the move, or an unforeseeable event like divorce, death of a spouse, natural disaster, or job loss that makes basic expenses unaffordable.5Internal Revenue Service. Publication 523 – Selling Your Home The reduced exclusion is based on the fraction of the two-year window you actually met: 12 months of use gets you half the normal amount.
Calculating Your Taxable Gain
If your profit exceeds the exclusion, only the excess is taxed. Getting that number right matters, and most sellers understate their basis.
Start with the sale price, subtract selling costs like commissions and title fees, then subtract your adjusted basis. Your adjusted basis begins with what you originally paid for the home and grows with every qualifying capital improvement. The IRS draws a firm line between improvements, which add to basis, and repairs, which don’t.5Internal Revenue Service. Publication 523 – Selling Your Home
- Improvements that add to basis include a new roof, a kitchen remodel, an added bathroom, central air conditioning, a deck, fencing, a driveway, new flooring, a security system, and landscaping.
- Repairs that don’t count include painting, patching cracks, fixing leaks, replacing broken hardware, and routine maintenance that keeps the home in its existing condition.
One nuance: repair-type work done as part of an extensive remodeling project counts as an improvement. Replacing a single broken window is a repair, but replacing every window during a full renovation is an improvement.5Internal Revenue Service. Publication 523 – Selling Your Home If you claimed federal energy efficiency tax credits under Section 25C for upgrades made before 2026, those credits reduced your basis by the credit amount. For a property you rented out at any point, you must also subtract any depreciation you claimed or should have claimed; that recaptured depreciation is taxed at a federal rate of up to 25%, separate from regular capital gains rates.
Federal Capital Gains Rates on the Taxable Portion
Gain above the exclusion is taxed at federal long-term capital gains rates, assuming you owned the home for more than a year. For 2026:
- 0% for taxable income up to $49,450 (single) or $98,900 (married filing jointly).
- 15% for taxable income from $49,451 to $545,500 (single) or $98,901 to $613,700 (married filing jointly).
- 20% for taxable income above $545,500 (single) or $613,700 (married filing jointly).
These brackets apply to your total taxable income for the year, not just the home sale. A married couple at $400,000 of combined income including the gain pays 15% on the capital gain portion.
High earners face an additional 3.8% federal surtax, the Net Investment Income Tax, on the lesser of their net investment income or the amount by which modified adjusted gross income exceeds $250,000 (married filing jointly), $200,000 (single), or $125,000 (married filing separately).6Office of the Law Revision Counsel. 26 U.S. Code 1411 – Imposition of Tax Gain already excluded under Section 121 isn’t counted as net investment income, so only the taxable portion above the exclusion is exposed to the surtax.7Internal Revenue Service. Questions and Answers on the Net Investment Income Tax
Maryland State and Local Income Tax on the Gain
Maryland taxes capital gains as ordinary income, with no preferential long-term rate. State rates run from 2% to 5.75% on a progressive scale, with the top rate kicking in at taxable income above $250,000 for single filers or $300,000 for joint filers.8Maryland General Assembly. Maryland Tax – General Code Section 10-105 – State Income Tax Rates9Comptroller of Maryland. 2026 Maryland State and Local Income Tax Withholding Information
Every county and Baltimore City layers a local income tax on top. For 2026 these range from 2.25% in Worcester County to 3.30% in Dorchester and Kent Counties, with Anne Arundel, Frederick, and a handful of others using graduated local rates that vary by income level.3Department of Legislative Services. Local Tax Rates – 2026 County Local Tax Rates Combined state and local income tax on a home sale gain can reach 9.05% for most sellers (5.75% state plus 3.30% local).
The 2% Capital Gains Surcharge
For tax years after December 29, 2025, Maryland adds a 2% surcharge on net capital gains for individuals whose federal adjusted gross income exceeds $350,000. This pushes the top state rate on capital gains from 5.75% to 7.75% for high-income sellers.10Comptroller of Maryland. Technical Bulletin 58 – Capital Gains
The surcharge does not apply to the sale of a primary residence when the sale price is under $1,500,000, provided the home is a single-family house, townhouse, row home, condominium, or co-op unit. Gains from retirement accounts, qualifying farm and ranch sales, and land under conservation easements are also exempt.10Comptroller of Maryland. Technical Bulletin 58 – Capital Gains In practice, the surcharge primarily hits high-income sellers of investment properties or primary residences priced above $1.5 million.
Residents report the capital gain on Maryland Form 502 for the year of the sale. Because Maryland conforms to Section 121, only the gain above the federal exclusion appears on the state return.
Nonresident Withholding
If you no longer maintain a legal residence in Maryland when you sell, the settlement agent must withhold 8.0% of the total payment (8.25% for an entity such as an LLC or corporation) and remit it to the Comptroller of Maryland before the deed can be recorded.11Legal Information Institute. Maryland Code Regulations 03.04.12.03 – Withholding Requirements12Maryland General Assembly. Maryland Tax – General Code Section 10-912 – Payments Required on Sale of Property by Nonresidents The total payment is the gross sale price minus secured debts being paid off, plus allowed selling expenses.
This isn’t an additional tax. It’s an estimated prepayment toward your Maryland income tax liability. You claim it as a credit when you file a nonresident return on Form 505, and anything withheld in excess of your actual liability comes back as a refund.13Comptroller of Maryland. 2025 Maryland Form 505 – Nonresident Income Tax Return
To reduce or eliminate the withholding up front, file Form MW506AE with the Comptroller at least 21 days before closing.14Comptroller of Maryland. 2025 Maryland Form MW506AE – Application for Certificate of Full or Partial Exemption Sellers whose gain will be fully covered by the Section 121 exclusion, or who are selling at a loss, are strong candidates for a full waiver. There’s no expedited process, so start the paperwork early.
Selling an Inherited Property
If you inherited the home, your cost basis is its fair market value on the date the previous owner died, not what they originally paid.15Office of the Law Revision Counsel. 26 U.S. Code 1014 – Basis of Property Acquired From a Decedent You only owe tax on appreciation since the date of death. If the home was worth $400,000 the day the owner passed and you sell for $420,000, the taxable gain is $20,000.
Even a quick sale after inheritance is treated as long-term capital gain, so federal rates of 0%, 15%, or 20% apply.16Office of the Law Revision Counsel. 26 U.S. Code 1223 – Holding Period of Property The Section 121 primary residence exclusion generally won’t apply unless you moved into the inherited home and used it as your principal residence for at least two of the five years before selling. Maryland uses the same stepped-up basis, so the state calculation mirrors the federal one.
The 1099-S at Closing
Your settlement agent is generally required to file Form 1099-S with the IRS reporting the sale price and seller information. There’s an exception worth knowing: if the sale price is $250,000 or less ($500,000 for married sellers) and you sign a certification confirming the home was your principal residence and the full gain is excludable under Section 121, the agent does not have to file the form.17Internal Revenue Service. Instructions for Form 1099-S – Proceeds From Real Estate Transactions
The certification, signed under penalty of perjury, also requires you to confirm there was no period of nonqualified use after December 31, 2008, such as renting the home or using it as a vacation property. If you don’t provide the certification, the agent files the 1099-S anyway, and you’ll report the sale on your federal return and claim the exclusion there.17Internal Revenue Service. Instructions for Form 1099-S – Proceeds From Real Estate Transactions