How the IRS Primary Residence Exclusion Works for Pennsylvania Home Sellers

Mathew Pezon • August 7, 2026

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%.


Mathew Pezon, co-owner of Pezon Properties

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.

By Mathew Pezon • October 20, 2026
When home debt outweighs the property's value, the path forward can get complicated fast. Understanding the difference between a short sale and foreclosure that Pennsylvania homeowners face is one of the most important decisions a distressed seller can make, and the two options carry very different consequences for your finances, your credit, and your future.
By Mathew Pezon • October 20, 2026
When homeowners start exploring their options, the iBuyer vs. cash home buyer question comes up fast. Both paths promise a faster sale without the usual hassle of listing on the open market — but they work very differently, and those differences can significantly affect your outcome.
By Mathew Pezon • October 19, 2026
When you are considering an off-market home sale, understanding the cash home buyer vs. wholesaler distinction could be the most important thing you do before signing anything. These two options look almost identical from the outside — but they work in very different ways, and the difference has real consequences for your sale.
By Mathew Pezon • October 16, 2026
When a buyer claims they can purchase your home with cash, that claim means nothing without supporting paperwork. Cash buyer proof of funds is the documentation a buyer provides to show they have the money available to close the deal — and not every document they hand over qualifies. Sellers in Allentown, PA, and across Pennsylvania encounter this situation regularly. A buyer says the right things, the numbers seem to add up, and then the transaction falls apart because the funds were never real. Knowing which documents carry weight — and which ones should raise concern — protects you at every stage of the process.
By Mathew Pezon • October 15, 2026
If you have ever asked whether you need a lawyer to sell your house in Pennsylvania, you are not alone. It is one of the most common questions sellers face — and the answer depends on your situation, your comfort level, and what kind of sale you are handling. Pennsylvania is what is called an "attorney optional" state. The law does not require you to hire a real estate attorney to close a home sale. But that does not mean professional guidance is off the table. Title companies and attorneys both play important roles at closing, and knowing the difference helps you make a smarter, more confident decision before you sign anything.
By Mathew Pezon • October 13, 2026
Selling your home in Pennsylvania means gathering a specific set of papers before you can legally transfer ownership. Knowing which documents you need ahead of time keeps your closing on track and protects you from costly surprises later.
By Mathew Pezon • October 13, 2026
Selling your home through a traditional agent comes with a cost that surprises many sellers: the real estate commission. A question we often hear from Allentown homeowners is whether cash home buyers charge a commission. The answer matters a great deal when you are trying to figure out how much money you will actually walk away with. Understanding how the standard commission structure works gives you a clearer picture before you choose how to sell.
By Mathew Pezon • October 12, 2026
Selling a house from out of state in Pennsylvania is more manageable than most owners expect. Distance does not have to be a barrier when you understand the legal tools available, the steps involved, and which type of buyer makes remote closing easiest. Many people inherit a property in Pennsylvania, relocate for work, or simply end up owning a home they no longer live near. Whatever brought you to this situation, selling without being physically present is well established under Pennsylvania real estate law. The right preparation makes all the difference.
By Mathew Pezon • October 9, 2026
Choosing to sell a house without a realtor in Pennsylvania puts you in control of the entire transaction — but it also puts the paperwork responsibility squarely on your shoulders. Get the documents right, and the sale moves forward cleanly. Get them wrong, and you risk delays, legal disputes, or a deal that falls apart at the closing table. Pennsylvania has specific legal requirements for private home sales, and missing even one form can expose you to serious liability later. Whether you own a property in Allentown or anywhere else across the commonwealth, understanding what documents you need is the first step toward a smooth, legally sound closing.
By Mathew Pezon • October 8, 2026
Selling a house by owner in Pennsylvania comes with a learning curve — and one of the first questions sellers ask is whether they need to hire a real estate attorney. The short answer depends on your situation, but understanding what attorneys do and when they matter can save you money and protect you from costly mistakes.