Skip to content
The Wilson Home Team of Samson Properties

Selling a Rental Property in Maryland: 1031 and Recapture

What changes when you sell a Maryland rental instead of a home: depreciation recapture, 1031 exchanges, the nonresident withholding and timing.

By Stephen Wilson, REALTOR®, Real Estate Salesperson, MD #5006976

Published · 7 min read

Selling a rental is taxed differently from selling the house you live in. You generally lose the home sale exclusion, the depreciation you took comes back as gain taxed at up to 25%, and if you’re a high earner Maryland adds a 2% capital gains tax on top. A 1031 exchange can defer all of it, but only if you set it up before closing and hit two strict deadlines.

This post covers what’s different for a rental. For the base rules on any Maryland sale (federal capital gains, the home sale exclusion, transfer taxes), read our guide to taxes when selling a house in Maryland. If you’re deciding whether to sell or buy more, start on our investor page.

This is general information, not tax advice. Talk to a CPA before you sign a listing agreement, because some of these choices can’t be made after closing.

Why rentals are taxed differently

On your own home, the federal home sale exclusion can take a large share of the gain off the table, as our seller tax guide explains. A rental usually doesn’t qualify. The exception is a property you also lived in as your main home for at least 2 of the 5 years before the sale, which can get part of the exclusion. The IRS covers this in the Form 8824 instructions, and the rules for mixed use get complicated fast.

Without the exclusion, the gain is taxed in pieces:

  • Long-term capital gain. If you owned the rental more than a year, most of the gain gets the long-term rates of 0%, 15% or 20%, depending on your income (IRS Topic 409, October 2026).
  • Unrecaptured section 1250 gain. The part of the gain that comes from depreciation is taxed at up to 25%.
  • Net investment income tax. The IRS’s basis FAQ notes that the gain may also be subject to the 3.8% net investment income tax.
  • Maryland income tax. Maryland taxes the gain as income, and from 2025 it adds a 2% tax on net capital gain for people with federal adjusted gross income over $350,000.

Depreciation recapture

Every year you owned the rental, you were supposed to deduct depreciation on the building (not the land). IRS Publication 527 says residential rental property is depreciated over 27.5 years using the straight-line method. That deduction lowers your cost basis, so it raises your gain when you sell.

The IRS taxes that depreciation portion as unrecaptured section 1250 gain, at a maximum 25% rate. Because residential rentals use straight-line depreciation, there’s generally no “additional depreciation” taxed as ordinary income, according to Publication 544. The 25% bucket is what most landlords pay.

Two things catch people off guard:

  1. Missed depreciation is a CPA question. If you skipped the deduction in past years, don’t assume that shrinks your tax at sale. Ask your CPA how it affects your basis and whether you can catch up before you sell.
  2. Improvements count too. A new roof or furnace on a rental is depreciated over 27.5 years as well, so it adds to the recapture.

A rough example

These are made-up numbers with simple assumptions, not a tax calculation.

Say you bought a rental for $200,000, with $160,000 of that for the building. Over 10 years you took roughly $58,000 of straight-line depreciation (about $5,800 a year). You sell for $300,000 and pay $20,000 in selling costs.

Amount
Purchase price$200,000
Less depreciation taken-$58,000
Adjusted basis$142,000
Sale price less selling costs$280,000
Total gain$138,000
Taxed at up to 25% (depreciation portion)$58,000
Taxed at long-term rates$80,000

Then add Maryland income tax, possibly the 2% Maryland capital gains tax and possibly the 3.8% federal tax. Your CPA will run the real numbers with your actual basis, improvements and income.

1031 exchange steps and deadlines

Section 1031 lets you defer the gain by trading one investment or business property for another. Since the Tax Cuts and Jobs Act, it only applies to real property, effective January 1, 2018, and the property has to be held for business or investment. Real estate held mainly for resale, like a flip, doesn’t qualify (IRS like-kind exchange tips, October 2026).

The Form 8824 instructions set the deadlines:

DeadlineRule
Identify the replacementIn writing, within 45 days after you transfer the property you’re selling. Describe it clearly, by street address or legal description.
Close on the replacementBy the earlier of 180 days after the sale or the due date of your tax return for that year, including extensions.

The 180 days don’t start after the 45. They run at the same time, from the day you close the sale. And the “earlier of” rule matters for sales late in the year. Close in November and your tax return may come due before day 180, so file an extension.

The steps, in order:

  1. Hire a qualified intermediary before you close the sale. The sale money has to go to the intermediary, not to you. Your agent or a related party can’t serve as the intermediary.
  2. Put exchange language in the sale contract. Your buyer agrees to cooperate with the exchange.
  3. Close the sale. The 45-day and 180-day clocks start.
  4. Identify the replacement in writing by day 45.
  5. Close on the replacement by day 180 (or your return due date).
  6. Report it on Form 8824 with your tax return.

If you trade with a related party (a parent, child, sibling or certain related businesses) and either of you sells the property you got within two years, the deferred gain generally comes due, with a few exceptions listed in the instructions.

A 1031 defers tax. It doesn’t make it go away. The deferred gain carries into the new property, and you’ll face it if you eventually sell without exchanging again.

Maryland withholding for nonresident sellers

If you don’t live in Maryland, the settlement company has to withhold Maryland tax from your proceeds at closing, and the deed can’t be recorded without the payment. A Comptroller tax alert (April 2026) sets the rate at 8.75% for nonresident individuals and 8.25% for nonresident entities on sales after June 30, 2025. Sellers with a sale price of $1,500,000 or more can no longer apply for a tentative refund and have to file a full return instead. The Comptroller’s Form MW506AE is the application for a full or partial exemption certificate, so ask your CPA whether you qualify and raise it with your settlement company early. Our seller tax guide has more on the withholding forms.

The Comptroller’s Technical Bulletin 58 covers the 2% capital gains tax. It excludes gain on your primary residence if it sells for less than $1,500,000, but that exclusion doesn’t reach a rental.

Selling with tenants

If the rental has a tenant in it, the tenant’s lease usually comes with the sale. You can sell to another investor with the lease in place, wait for the lease to end, or negotiate an early move-out. Our planned guide to selling a house with tenants in Maryland covers notice, showings and what happens to the security deposit.

A tenant in place can help if your buyer is an investor doing a 1031 of their own, since a rental with income already coming in is easier for them to underwrite. It can hurt if your buyer wants to move in.

Talk to a CPA before you list

The order matters here. A qualified intermediary has to be in place before you close. The exchange language belongs in the contract. Your CPA may want to look at depreciation you missed, how to split the sale price between land and building, or whether a 1031 makes sense at all given your income this year. All of that is easier to fix before closing than after.

When you’re ready, we can price the rental and plan the sale around your exchange dates. See selling with us, or tell us about the property on our investor page.

Bottom line

Selling a Maryland rental usually means no home sale exclusion, up to 25% federal tax on the depreciation you took and Maryland income tax on the gain, plus a 2% Maryland capital gains tax if your income is over $350,000. A 1031 exchange can defer all of it if the qualified intermediary is in place before closing and you hit the 45-day and 180-day deadlines. Nonresident sellers should also plan for 8.75% (individuals) or 8.25% (entities) withheld at settlement.

Sources

Quick answers

Can I avoid capital gains on a rental property in Maryland?
You can defer it, not erase it, with a 1031 exchange into other investment or business real estate. The home sale exclusion generally doesn't apply to a rental, though it can apply in part if you lived in the property as your main home for at least 2 of the 5 years before the sale. High earners also face Maryland's 2% capital gains tax, which the primary-residence exception doesn't cover for rentals. Talk to a CPA before you list.
What are the 1031 deadlines?
You have 45 days after you transfer the property you're selling to identify the replacement property in writing. You have to receive the replacement property by the earlier of 180 days after the sale or the due date of your tax return for that year, including extensions. Both deadlines run at the same time, and missing either one generally makes the gain taxable.

Thinking about selling?

Send the address. We come back with a price range and what you would net after costs.

By sending this you agree we can call, text or email you about your request. No spam, no selling your info. Reply STOP to any text to opt out.

Topics: 1031 exchange, depreciation recapture, selling a rental, capital gains, nonresident withholding, landlords

This post is general information, not legal, tax or financial advice. Rules, rates and programs change and vary by county; confirm the details for your situation with the agency or source linked above, a tax professional or an attorney.

All posts

Own a rental property?

Find out what it should rent for, and what it costs to have SW Property Management run it.

Get a free rent analysis