Capital Gains When You Sell a Home in Pennsylvania or New Jersey
Back
By Max Karasick, Compass real estate agent licensed in PA and NJ
Good news first: if you've owned and lived in your home for at least two of the last five years, the first $250,000 of gain is usually free of federal tax. Married and filing jointly? Make that $500,000. Pennsylvania is even friendlier. Its personal income tax generally exempts the gain on a qualifying principal residence, and the Department of Revenue's guidance doesn't put a dollar cap on it. New Jersey simply copies the IRS. And the date of your closing decides which tax year the whole thing lands in.
The fine print, up front: this is general information, not tax advice. Your CPA should confirm the numbers for your own sale. Rentals and investment property play by different rules, and Max covers those in his guide to 1031 exchanges.
How the $250,000 and $500,000 Exclusion Works
The IRS spells out the test in Publication 523. As of October 2026, you get the full exclusion when all three of these are true:
Ownership: you owned the home for at least 24 months of the 5 years before the date of sale. Publication 523 treats that as the date of the closing.
Residence: you lived there as your main home for at least 24 months (730 days) of those same 5 years. They don't have to be in a row.
Look-back: you didn't exclude gain on another home sale in the 2 years before this one.
Married couples filing jointly get a small break on the paperwork: only one spouse has to pass the ownership test. But both spouses have to pass the residence test to get the full $500,000. Fall short? You may still get a partial exclusion if the main reason you sold was a change in where you work, a health issue or an unforeseeable event. The IRS's own example is a new job at least 50 miles farther from the home than the old one.
How to Figure the Gain
Your gain isn't just the sale price minus what you paid. Publication 523 works it in two steps. Take the selling price and subtract your selling expenses. That's the amount realized. Then subtract your adjusted basis, and what's left is the gain. Basis starts at your purchase price and goes up with certain closing costs from the purchase plus the cost of improvements. One Philadelphia perk: Publication 523 says transfer taxes the seller pays can count as selling expenses. With the realty transfer tax as big as it is here, that's not pocket change.
Worked Example: A Hypothetical Philadelphia Sale
Every number here is made up and rounded:
Purchase in 2016: $350,000.
Improvements since then: a kitchen and a roof, $50,000. Adjusted basis: $400,000.
Sale in 2026: $1,000,000, with $60,000 of selling expenses. Amount realized: $940,000.
Gain: $940,000 minus $400,000, or $540,000.
If a married couple filing jointly both pass the tests, they exclude $500,000 and owe federal tax on $40,000. A single owner excludes $250,000 and has $290,000 left over. Since the home was held more than a year, Tax Topic 409 calls that long-term gain, taxed at 0%, 15% or 20% depending on taxable income. Pennsylvania? A qualifying sale is exempt, so none of the $540,000 is taxed there. Put the same house in New Jersey and the taxable New Jersey gain matches the federal one: $40,000 or $290,000.
There's one more federal line to watch, the 3.8% Net Investment Income Tax. The IRS says it doesn't touch gain you excluded under the home sale rules. Taxable gain above the exclusion can count, though, once modified adjusted gross income tops $250,000 for joint filers or $200,000 for single filers. Those thresholds aren't indexed for inflation.
Pennsylvania's Own Exclusion
Pennsylvania ignores the federal dollar caps entirely. According to the Department of Revenue's Personal Income Tax Guide, gain on the sale of a principal residence on or after January 1, 1998 is generally exempt from Pennsylvania personal income tax. The flip side: you can't deduct a loss either. To qualify, the home must have been:
Owned for two of the last five years before the sale.
Physically occupied and personally used for two of the last five years.
Not part of another exempt sale within the prior two years, unless that sale came from a change in circumstances beyond your control, like a change in employment or health.
Two Pennsylvania wrinkles trip people up. First, the exemption doesn't cover the part of a property used for business or rental. The Department's own example is a duplex with one unit rented out. Second, renting out your principal residence while you try to sell it can cost you the exclusion. So if the house is on the market and a tenant comes knocking, call your CPA before you sign a lease.
New Jersey's Rules
New Jersey keeps it simple and follows the federal math. The Division of Taxation says gain on a home is figured the same way as for federal purposes, and anything taxable federally is taxable in New Jersey too. Single filers can exclude up to $250,000 and joint filers up to $500,000 if they owned and lived in the home 2 of the 5 years before the sale.
Not a New Jersey resident at closing? You've got one more step. Under TB-57(R), revised June 15, 2026, a nonresident selling New Jersey real property has to make an estimated Gross Income Tax payment at closing, before the deed is recorded. It's figured as the federal gain times the highest New Jersey rate, and it's never less than 2% of the consideration. If you meet the federal principal residence rules, you can claim an exemption on Form GIT/REP-3. A Pennsylvania resident selling a Jersey Shore vacation house usually won't qualify, though. A second home isn't a main home, no matter how many summers you spent there.
Does a December or January Closing Change the Tax Year?
Yes. Publication 523 says the date of sale is the date in box 1 of Form 1099-S. No 1099-S? Then it's the earlier of the date title transferred or the date the economic burdens and benefits of ownership shifted to the buyer. Close on December 30, 2026 and the sale goes on your 2026 return. Close on January 5, 2027 and it goes on the 2027 return, which you'll file in 2028.
That choice can matter three ways:
The 24-month tests: they're measured to the date of sale. If you're a few weeks short of 24 months of ownership or residence, a later closing can sometimes get you there.
Your other income: the capital gains rate and the Net Investment Income Tax both depend on your total income that year. If 2026 is a big year and 2027 won't be, or the other way around, your CPA may have opinions.
Cash timing: a January closing pushes any tax on the gain into the next filing season.
Still, the calendar should serve the plan, not run it. The buyer's timeline, your next home and your carrying costs usually matter more than the tax year.
Rentals, Home Offices and Second Homes
Here the easy answer stops. Publication 523 says you can't exclude the part of the gain equal to depreciation allowed or allowable after May 6, 1997. Gain tied to periods of nonqualified use after 2008, like years the place was a rental before you moved in, generally isn't excludable either. So a former rental, a home with a depreciated office or a shore house each needs its own math. And if the property is really an investment, a 1031 exchange may be the better tool.
How Max Uses This With Clients
Max isn't a tax advisor, and he tells every seller exactly that. What he does is build the net proceeds picture early and hand the tax pieces to your CPA. Before listing, he'll ask for your purchase closing statement and a list of improvements with receipts, because basis starts there and shoeboxes of receipts are worth digging out. He checks your ownership and residence dates against the target closing, so a December or January date is a choice and not an accident. He prices your side of transfer tax and the other costs too. Weighing a move across the river? He'll lay out the cost of owning in Philadelphia versus New Jersey. Disclosures come next, covered in his guide to seller disclosures. For the whole selling process, see how Max sells homes.
Official Sources
Pennsylvania Department of Revenue: PA Personal Income Tax Guide, Net Gains (Losses)
New Jersey Division of Taxation: GIT/REP-3 Seller's Residency Certification/Exemption
FAQ
Do you pay capital gains when you sell your home in Pennsylvania?
Usually not on a qualifying main home. Federally, if you owned and lived in the home at least two of the last five years, you can exclude up to $250,000 of gain, or $500,000 for a married couple filing jointly. Pennsylvania's Department of Revenue generally exempts the gain on a qualifying principal residence, and its guidance names no dollar cap.
How does the $250,000 or $500,000 exclusion work?
You get the $250,000 exclusion if you owned and lived in the home as your main home at least 24 months of the 5 years before closing, with no other excluded sale in the prior 2 years. Joint filers get up to $500,000 when one spouse meets the ownership test and both meet the residence test. The rest is taxable.
Does New Jersey tax the gain on a home sale?
New Jersey taxes it exactly the way the IRS does. The Division of Taxation says anything taxable federally is taxable in New Jersey, with the same $250,000 and $500,000 exclusions if you owned and lived in the home 2 of the 5 years before the sale. Nonresident sellers also owe an estimated tax payment at closing unless an exemption applies.
Does closing in December or January change the tax year?
Yes. IRS Publication 523 says the date of sale is the date in box 1 of Form 1099-S, or without one, the earlier of the title transfer or the shift of ownership's burdens and benefits to the buyer. Close on December 30, 2026 and it's on your 2026 return. Close on January 5, 2027 and it's on the 2027 return.
Maximize Your Equity.



