A lot of sellers worry about capital gains tax before they need to. Most people selling the home they live in owe nothing on the gain, thanks to a federal exclusion. The picture changes with rentals, second homes, inherited houses, very large gains, and sellers who live outside Maryland.
I’m Evan Weissman. I buy houses in Maryland, and I’m not a tax professional, so this is general information drawn from IRS and Maryland Comptroller sources. Bring your own numbers to a CPA or tax preparer before you sign anything.
Gain is not the same as sale price
Your gain is roughly the sale price, minus selling costs, minus your adjusted basis. Basis usually starts with what you paid, plus certain purchase costs, plus the cost of improvements like a new roof, an addition, or a kitchen remodel. Repairs and routine maintenance generally don’t count.
That’s why records matter. A seller who kept receipts for $60,000 of improvements over twenty years can owe far less than one who can’t show them.
The $250,000 and $500,000 exclusion
Under the rules in IRS Publication 523, you can exclude up to $250,000 of gain, or $500,000 for most married couples filing jointly, if you owned the home and lived in it as your main home for at least two of the five years before the sale. You generally can’t have used the exclusion on another home in the two years before.
If you fall short of two years because of a job change, a health reason, or certain unforeseen events, you may qualify for a partial exclusion. Publication 523 explains the tests.
Moving into care before the sale
Publication 523 has a rule that matters for older sellers. If you become physically or mentally unable to care for yourself and move into a licensed care facility, the time you spend there can count toward the use test, as long as you lived in the home for at least one year during the five years before the sale. My article on selling a house after moving to assisted living covers the rest of that situation.
Rentals and former homes
A house you rented out is different. If it was never your main home, the exclusion doesn’t apply. If you lived there first and rented it later, you may still qualify if you meet the two-of-five-year test, but depreciation you took, or could have taken, while it was a rental generally can’t be excluded. Periods of nonqualified use after 2008 can also reduce the exclusion.
That’s a big part of the decision I cover in should I sell or rent out my Maryland house.
Inherited houses
When you inherit a house, your basis is generally the fair market value on the date of death, not what the original owner paid. That step-up often means little or no gain if the estate or heirs sell fairly soon. An appraisal as of the date of death helps document it. My article on the Maryland Register of Wills covers the estate side.
Maryland’s tax on the gain
Maryland doesn’t have a separate capital gains rate for most people. Taxable gain is included in Maryland income and taxed at your regular state and local income tax rates.
There’s one newer wrinkle. According to the Comptroller’s Technical Bulletin No. 58, starting with tax year 2025, Maryland adds a 2% tax on net capital gains when federal adjusted gross income is over $350,000. Gain from selling a qualifying primary residence for less than $1.5 million is excluded from that extra tax.
Withholding when the seller lives out of state
If you don’t live in Maryland, the settlement agent has to withhold part of your proceeds at closing and send it to the state. The Comptroller’s Form MW506NRS sets the rate at 8.75% of an individual’s share of the total payment for sales after June 30, 2025. That’s withholding against your tax, not the tax itself. You file a Maryland nonresident return and get back any excess.
Some sellers qualify for a full or partial exemption, for example when the house was their principal residence. You apply on Form MW506AE before closing. Start early, since the certificate has to be in hand at settlement.
Reporting the sale
Settlement agents generally report a sale to the IRS on Form 1099-S. Even if your whole gain is excluded, keep your closing statement and improvement records with your tax papers. The IRS publication explains when the sale has to be reported on your return.
Planning around the tax
Some sellers time a sale to meet the two-year test or to land in a lower-income year. Others look at an installment sale or, for investment property, a like-kind exchange. These are questions for a tax professional, and the answer can change what price or timing works for you. My net sheet comparison shows how taxes fit with other selling costs.
Do I pay capital gains tax when I sell my house in Maryland?
Usually not on your main home, if you meet the federal two-of-five-year test and the gain is under $250,000, or $500,000 for most joint filers.
Does Maryland tax capital gains differently than income?
For most sellers, no. Taxable gain is taxed as regular Maryland income. A 2% additional tax applies to high earners, but primary residence sales under $1.5 million are excluded from it.
How much does Maryland withhold from a nonresident seller?
8.75% of an individual’s share of the total payment for sales after June 30, 2025, unless an exemption certificate applies.
Is there capital gains tax on an inherited house?
Only on gain above the stepped-up basis, which is usually the value on the date of death.
Talk through your situation
If you’re weighing a sale and want to see the numbers side by side before you talk with your tax preparer, call or text me at (410) 498-7473. I’ll give you a clear net figure to work from.