
The $250,000/$500,000 home sale exclusion, what disqualifies you from it, and the one new Maryland rule sellers need to watch in 2025 and beyond
If you're selling — or thinking about selling — your home in Frederick County or anywhere else in Maryland, there's a good chance the IRS has already told you not to worry about capital gains tax on most, or all, of the profit. Section 121 of the tax code lets most homeowners exclude up to $250,000 of gain if single, or $500,000 if married filing jointly, from federal income tax entirely. No form to file, no election to make, in most cases it just happens automatically when you file your return.
But "most of the profit" isn't "all of the profit" for everyone, and a handful of situations — renting the home out for a stretch, claiming depreciation on a home office, selling well above the exclusion cap, or losing a spouse — change the math. Here's what actually applies, and what's different in Maryland specifically.
The short version: Own and live in the home as your primary residence for at least 2 of the last 5 years, and you can exclude $250,000 of gain ($500,000 married filing jointly) from federal tax. Maryland fully honors this exclusion on the state return too — no add-back, no adjustment. The gain only becomes taxable once it exceeds the exclusion amount, or once depreciation you claimed (rental use, home office) recaptures a piece of it.
To qualify for the exclusion, the IRS applies a straightforward 2-of-5-years rule, but it's actually two separate tests:
The two years don't need to be continuous, and they don't need to be the same two years for both tests in every case — but for most sellers, they line up naturally. If you've owned and lived in the home for at least 24 months out of the last 60, you're in.
You also generally can't use the exclusion more than once every two years. If you sold a different primary residence and claimed the exclusion within the last two years, a new sale usually won't qualify for the full break again, though partial exclusions exist for sales driven by a job change, health issue, or other unforeseen circumstance.
The exclusion is a ceiling, not a floor. If a single filer nets $310,000 in gain on the sale, $250,000 comes out tax-free and the remaining $60,000 is taxed as a long-term capital gain. For a married couple filing jointly with a $500,000 cap, that same math has a lot more room before anything becomes taxable — which is one of several reasons the filing status you use in the year of sale matters.
| Filing Status | Sale Price | Adjusted Basis | Total Gain | Exclusion | Taxable Gain |
|---|---|---|---|---|---|
| Single | $620,000 | $310,000 | $310,000 | $250,000 | $60,000 |
| Married Filing Jointly | $620,000 | $310,000 | $310,000 | $500,000 | $0 |
| Single | $1,050,000 | $480,000 | $570,000 | $250,000 | $320,000 |
Basis matters a lot here, and it's the piece sellers most often shortchange themselves on. Basis isn't just the original purchase price — it includes qualifying capital improvements (a new roof, an addition, a renovated kitchen), certain closing costs from the original purchase, and selling costs like agent commissions and title fees, all of which reduce the taxable gain. If you've owned the home a long time, digging up old receipts and improvement records before you sell can meaningfully shrink the number that ends up on your return.
This is the exception that catches people off guard, especially anyone who rented out a portion of the home, ran a home-based business with a dedicated office deduction, or converted the property to a rental at some point before selling.
Any depreciation you claimed — or were entitled to claim, whether you actually took it or not — on the home during a period of business or rental use isn't eligible for the Section 121 exclusion. That portion is "recaptured" and taxed separately, at a maximum federal rate of 25% under the unrecaptured Section 1250 gain rules, regardless of your regular capital gains bracket.
If you've ever claimed a home office deduction, run a rental property out of part of your home, or converted your primary residence to a rental before selling, this is the piece of the return that needs the closest look — the exclusion still applies to the non-depreciated gain, but the depreciated portion doesn't get a pass.
Maryland decouples from a fair number of federal provisions — the QBI deduction and 100% bonus depreciation being the two most common examples we deal with for business clients. The home sale exclusion is not one of them. Maryland fully conforms to the federal Section 121 exclusion, meaning the same amount you exclude on your federal return carries through to your Maryland return without an add-back or adjustment. If your gain is fully excluded federally, it's fully excluded for Maryland income tax purposes too.
There is a newer wrinkle worth knowing about, though. Starting with the 2025 tax year, Maryland imposes an additional 2% surtax on net capital gains for taxpayers with federal adjusted gross income over $350,000. The good news for most home sellers: Maryland built in a specific carveout exempting gain from the sale of a principal residence, up to $1.5 million, from this surtax. It's aimed at large investment and business-sale gains, not at someone selling the family home — but if your home sale gain, combined with other income, pushes you well past that $350,000 AGI threshold and the residence gain itself is unusually large, it's worth having your return checked against the exact carveout language rather than assuming it doesn't apply.
Two life-event provisions come up often enough to flag specifically:
If your spouse passes away, you can still claim the full $500,000 married exclusion — not the reduced $250,000 single amount — as long as you sell within 2 years of the date of death and met the ownership and use tests immediately before your spouse's death (with your spouse also having met the ownership test). This is one of the more overlooked provisions in the code, and it has real dollar consequences if the sale happens on either side of that 2-year line.
Time spent living in the home by a spouse or ex-spouse under a divorce or separation agreement generally counts toward your use test, even if you personally moved out. Ownership transferred as part of a divorce settlement typically carries over the original ownership period for purposes of the test as well.
If you're selling Maryland real estate but are not a Maryland resident at the time of sale — a common situation for anyone who inherited a Maryland property, relocated for work, or is closing out an estate — Maryland requires withholding of up to 8% (2.5% for corporate entities and certain other filers) of the sale proceeds at closing, similar in spirit to the federal FIRPTA rules for foreign sellers. This withholding is not the actual tax owed; it's a deposit against whatever the return ultimately shows, and it's reconciled — with any excess refunded — when the Maryland nonresident return is filed. This comes up often for out-of-state heirs handling an inherited Maryland property and for anyone who moved out of state but held onto Maryland real estate before eventually selling.
If you received a Form 1099-S for the sale, yes — it needs to be reported even if the full gain is excluded, so the exclusion is clearly on record. If no 1099-S was issued and the gain is fully excludable, reporting generally isn't required, but we still recommend documenting the sale in your files in case the question ever comes up.
No. It's any 24 months (roughly, since it's actually measured in a 730-day-equivalent standard) within the 5-year period ending on the date of sale — they don't need to be consecutive and don't need to immediately precede the sale.
No — it only affects the portion of gain attributable to depreciation claimed on the business-use space. The rest of the gain is still eligible for the full exclusion. The depreciated portion is taxed separately as unrecaptured Section 1250 gain.
Yes — Maryland conforms fully to the federal exclusion amount. The main thing to watch is the new 2025 Maryland surtax on capital gains for higher-income taxpayers, which carries its own exemption for principal residence gains under $1.5 million.
Your original purchase settlement statement, receipts or invoices for capital improvements (additions, major renovations, new systems like HVAC or roofing — not routine repairs or maintenance), and your closing statement from the sale itself. These all factor into basis and reduce the gain that's subject to tax in the first place.
Whether it's a straightforward sale of your primary residence or a more complicated situation involving rental history, an inherited property, or a large gain above the exclusion cap, we'll walk through the numbers with you before closing — not after.
Talk to Our TeamThis article is for general informational purposes and does not constitute tax or legal advice. Every sale has its own facts — ownership history, depreciation, basis records, and residency status all affect the outcome. Contact Mercer Flanagan CPA to review your specific situation before you sell.
By Roy Cogliandolo, CPA · Mercer Flanagan · September 18, 2026