How the IRS Primary Residence Exclusion Works for Pennsylvania Home Sellers
Understanding capital gains tax when selling a house in Pennsylvania is one of the most important things you can do before listing your home. Many sellers are surprised to learn that federal tax law allows qualifying homeowners to shield a significant portion of their capital gains from tax entirely, and Pennsylvania has its own layer of rules on top of that. Knowing how the Section 121 exclusion works can mean the difference between keeping thousands of dollars and handing them to the IRS.
What Is the Primary Residence Exclusion and Who Qualifies in Pennsylvania?
The Section 121 exclusion is a federal tax benefit that lets homeowners exclude up to $250,000 of profit from the sale of their primary residence. For married couples filing jointly, that number doubles. This exclusion applies to federal capital gains tax, not Pennsylvania state income tax, which we will cover separately below.
What Counts as a Primary Residence?
Your primary residence is the home where you live most of the time. It does not have to be a house. It can be a condo, a mobile home, or even a houseboat, as long as it qualifies under IRS rules. The IRS looks at factors like where you receive mail, where you are registered to vote, and where you spend the majority of your time throughout the year.
If you own more than one property, only one can be your primary residence at a time. A vacation home or a rental property does not qualify, even if you visit it often.
How Does Pennsylvania Treat Capital Gains from a Home Sale?
Pennsylvania generally excludes gain from the sale of a principal residence when the seller satisfies the state’s ownership and use requirements. Pennsylvania administers its exclusion under state rules and forms, so sellers should not assume that the federal result automatically determines the Pennsylvania result. If the property does not qualify as a principal residence, some or all of the gain may be subject to Pennsylvania personal income tax.
Who Is Eligible for the Section 121 Exclusion?
To use the Section 121 exclusion, you must meet two tests: the ownership test and the use test. Both must be satisfied during the five years ending on the date you sell your home. You also cannot have used this exclusion on another home sale within the past two years.

How Do the Two-Out-of-Five-Year Ownership and Use Tests Work?
These two tests are the foundation of the Section 121 exclusion. Understanding them helps you figure out whether your profit qualifies for the tax break before you close the deal.
The Ownership Test Explained
The ownership test requires that you have owned the home for at least two of the five years leading up to the sale date. The two years do not need to be consecutive. You could have owned the home, rented it out briefly, and still meet the test as long as the total ownership adds up to 24 months within that five-year window.
Ownership is counted from the closing date when you purchased the property. Inherited property involves separate basis and eligibility questions. The decedent’s residence history does not automatically give the heir a Section 121 exclusion, so the heir should obtain property-specific tax advice.
The Use Test Explained
The use test requires that you actually lived in the home as your primary residence for at least two of the five years before the sale. Again, those two years do not have to run back-to-back. Certain short temporary absences may count toward the use requirement, depending on the facts and IRS rules.
When a rental becomes a main home, residence use generally begins when the owner actually occupies it as the main home. Even after the use test is met, nonqualified use and depreciation rules may prevent exclusion of the entire gain. Keeping records of utility bills, tax filings, and other documents that prove you lived in the home is a smart way to protect yourself if the IRS ever asks questions.
What Happens If You Do Not Meet Both Tests?
If you fall short of either test, you may still qualify for a partial exclusion under certain conditions. The IRS allows a reduced exclusion if the sale was driven by a change in employment, a health issue, or what the IRS calls "unforeseen circumstances". The reduced maximum is calculated using an IRS formula based on the applicable ownership, residence, or prior exclusion period. Publication 523 or a tax professional should be used for the calculation. A tax professional can help you determine the right number.
Can Married Couples Exclude Up to 500,000 Dollars on a Pennsylvania Home Sale?
Married filing jointly opens the door to a much larger exclusion. When both spouses meet certain conditions, a couple can exclude up to $500,000 of profit from capital gains tax when selling a house in Pennsylvania, rather than the standard $250,000 available to a single filer.
What Both Spouses Need to Qualify
For the full $500,000 exclusion, the IRS requires that at least one spouse meets the ownership test and that both spouses meet the use test. Both spouses also must not have excluded gain from another home sale within the prior two years.
If only one spouse meets the use test, the couple can still exclude up to $250,000, which is the amount that the qualifying spouse would have received as a single filer. The marriage itself does not automatically double the exclusion. Both individuals must hold up their end of the IRS requirements.
An Example Using Local PA Home Values
Picture a couple in Reading who bought their home for $180,000 and sold it for $640,000. Their profit is $460,000. If both spouses meet the ownership and use tests and file jointly, the full $460,000 is excluded from federal capital gains tax because it falls under the $500,000 cap. The qualifying gain may be excluded from federal income, subject to the detailed Section 121 limitations.
Now picture the same couple, in which only one spouse qualifies. Their exclusion drops to $250,000. That leaves $210,000 of taxable gain exposed to federal capital gains tax rates, which currently range from 0% to 20% depending on income.
Pennsylvania State Tax Still Applies Separately
Even when federal taxes are fully excluded, Pennsylvania may still assess its 3.07% flat tax on the gain. This is one of the most overlooked parts of home sale taxes for Pennsylvania residents. Pezon Properties works with homeowners throughout the region, and we consistently see sellers caught off guard by this state-level obligation. Working with a Pennsylvania-licensed CPA or tax attorney before you sell can help you plan for both layers of taxation.
Frequently Asked Questions
How much capital gains tax will I owe when selling my house in Pennsylvania?
The answer depends on the amount realized, adjusted basis, selling expenses, ownership and residence history, prior use of the home, depreciation, filing status, and eligibility for federal and Pennsylvania principal-residence exclusions. A qualifying seller may exclude up to $250,000 of gain federally, or up to $500,000 on certain joint returns. Pennsylvania also generally excludes qualifying gain when its ownership and use requirements are satisfied.
What if I lived in my Pennsylvania home for less than two years?
A seller who does not satisfy the full federal use requirement may qualify for a reduced exclusion when a qualifying employment change, health reason, or unforeseen circumstance primarily causes the sale. The result is not automatic; the maximum exclusion must be calculated using the IRS formula. Pennsylvania eligibility should be analyzed separately.
Does Section 121 cover Pennsylvania income tax?
Section 121 is a federal rule. Pennsylvania separately provides an exclusion for qualifying gain from the sale of a principal residence. Sellers should test the transaction under both federal and Pennsylvania requirements rather than assuming that either the federal exclusion automatically controls the state result or that Pennsylvania automatically taxes the gain at 3.07%.

About the author
Mathew Pezon
Mathew Pezon is the founder and CEO of Pezon Properties, a cash home buying company located in Lehigh Valley, Pennsylvania. With several years of experience in the real estate industry, Mathew has become a specialist in helping homeowners sell their properties quickly and efficiently. He takes pride in providing a hassle-free, transparent, and fair home buying experience to his clients. Mathew is also an active member of his local community and is passionate about giving back. Through his company, he has contributed to various charities and causes.













