How Much Tax Do You Pay When Selling a House in PA?

The tax you pay when selling a house in Pennsylvania comes in two layers: a realty transfer tax collected at closing (1% to the state plus a local share that ranges from about 1% to nearly 4%), and income tax on your profit at federal rates of 0%, 15%, or 20% plus Pennsylvania’s flat 3.07%. If the property was your primary residence and you meet the ownership and use tests, both the federal and state governments will usually wipe out the income tax entirely, leaving only the transfer tax. If it was a rental or a flip, every layer applies to the full gain.

The Realty Transfer Tax at Closing

Every deed transfer in Pennsylvania triggers a state Realty Transfer Tax of 1% of the sale price or fair market value, whichever is higher.1Department of Revenue. Realty Transfer Tax Counties, municipalities, and school districts add their own transfer taxes on top, and the combined rate depends on where the property sits.

In Philadelphia, the combined rate is 4.578% as of July 2025, with 3.578% going to the city and 1% to the state.2City of Philadelphia. Philly’s Realty Transfer Tax Rate Is Now 4.578% On a $400,000 sale, that’s $18,312. In Pittsburgh, the combined rate hits 5%, split among the state (1%), the city (3%), and the Pittsburgh School District (1%).3Allegheny County. Realty Transfer Taxes A $400,000 Pittsburgh sale carries $20,000 in transfer taxes. Most smaller municipalities land between 2% and 3% combined. Check your specific jurisdiction before estimating net proceeds.

Who actually writes the check is a matter of negotiation. Buyers and sellers commonly split the transfer tax 50/50, but the agreement of sale controls, and in a competitive market a seller may absorb the full amount.

Some transfers are exempt from the tax entirely, including transfers between spouses, between a parent and child, to governmental units, and to certain tax-exempt organizations.1Department of Revenue. Realty Transfer Tax Moving property within an immediate family can save tens of thousands of dollars.

How Your Taxable Gain Is Calculated

Before any income tax rate applies, you have to figure the size of your gain. Start with the sale price, subtract what you spent to buy and improve the property, and subtract your selling costs. What’s left is your taxable gain.

Adjusted Basis

Your adjusted basis starts with what you originally paid, including settlement costs like title insurance, recording fees, and legal fees at purchase. Add the cost of capital improvements you made over the years. A capital improvement is any project that adds value, extends the property’s life, or adapts it to a new use: a new roof, a kitchen renovation, an added bathroom, a new HVAC system. Routine maintenance and repairs do not count.

Keeping receipts for these projects matters. Every dollar you add to your basis is a dollar subtracted from your taxable gain, and sellers who throw away paperwork often pay thousands more in tax than they need to.

Amount Realized

Your amount realized is the sale price minus costs tied to the transaction itself. Real estate agent commissions, attorney fees, title fees, and transfer taxes you paid all reduce the amount realized. Taxable gain equals the amount realized minus the adjusted basis.

Federal Income Tax on the Gain

The Section 121 Exclusion for a Primary Residence

If you sold your primary residence, Internal Revenue Code Section 121 lets you exclude up to $250,000 of gain from federal income tax, or up to $500,000 if you file jointly with a spouse.4Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence To qualify, you must have owned the home and used it as your primary residence for at least two of the five years before the sale. Those two years don’t need to be consecutive.

If you fell short of the two-year test because of a job move, a health issue, or an unforeseen circumstance like divorce or job loss, a partial exclusion is available, prorated by how much of the two-year period you met.5Office of the Law Revision Counsel. 26 US Code 121 – Exclusion of Gain From Sale of Principal Residence Twelve months of the required 24 gets you half the normal exclusion.

For most Pennsylvania homeowners selling a primary residence, Section 121 zeros out the federal tax bill. Federal tax only bites on gain above the threshold.

Long-Term and Short-Term Rates

Gain above the Section 121 exclusion, or gain on property that never qualified, is taxed at federal capital gains rates. If you held the property more than one year, the gain is long-term. For 2026:

  • 0% on taxable income up to $49,450 (single) or $98,900 (married filing jointly)
  • 15% on taxable income from $49,451 to $545,500 (single) or $98,901 to $613,700 (joint)
  • 20% on taxable income above $545,500 (single) or $613,700 (joint)

Most sellers land in the 15% bracket. If you held the property one year or less, the gain is short-term and taxed at ordinary income rates, which run from 10% to 37% in 2026.

The 3.8% Net Investment Income Tax

An extra 3.8% Net Investment Income Tax applies when your modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly).6Internal Revenue Service. Topic No. 559, Net Investment Income Tax It’s calculated on the lesser of your net investment income or the amount by which your income tops those thresholds. A joint filer with $300,000 in total income and $80,000 of capital gains from a home sale would owe the 3.8% surtax on $50,000. Those thresholds are not indexed to inflation, so they catch more taxpayers each year.

Pennsylvania Income Tax on the Gain

Pennsylvania taxes income at a flat 3.07%, with no distinction between ordinary income and capital gains.7Department of Revenue. Personal Income Tax Rates That rate applies to gains from property sales the same way it applies to wages.

Pennsylvania’s Own Principal Residence Exemption

Pennsylvania does not piggyback on the federal Section 121 exclusion. It has its own exemption, and in one respect it’s more generous: there is no dollar cap. If you sell your principal residence, the entire gain is exempt from Pennsylvania income tax as long as you meet all of these conditions:8Department of Revenue. Net Gains (Losses) From the Sale, Exchange, or Disposition of Property

  • You owned the property for at least two of the five years before the sale.
  • You personally and physically occupied the home during that period. Moving furniture into a house you didn’t actually live in doesn’t count.
  • You haven’t claimed the exemption on another home sale within the prior two years, unless the sale resulted from a change in circumstances beyond your control such as a job relocation or health issue.

When the exclusion fully applies, no Pennsylvania schedule is required. If any portion of the home was used for business or rental purposes, that portion does not qualify and must be reported on PA Schedule D.8Department of Revenue. Net Gains (Losses) From the Sale, Exchange, or Disposition of Property Renting out a principal residence while trying to sell it can also trigger depreciation adjustments that disqualify the property.

Investment Property Gets No Exclusion

If the property was a rental, a flip, or otherwise not your primary residence, the full gain is taxable at the 3.07% state rate. On a $150,000 gain, that’s $4,605 to Pennsylvania on top of whatever you owe the IRS.

Extra Rules for Rental and Investment Property

Depreciation Recapture

If you rented the property and claimed depreciation deductions, selling triggers depreciation recapture at the federal level. The IRS taxes the portion of your gain attributable to depreciation at a flat 25%, regardless of your income bracket, before the regular long-term rate applies to the rest.

Say you bought a rental for $250,000, claimed $50,000 of depreciation, and sold for $350,000. Your adjusted basis is $200,000, so your total gain is $150,000. The first $50,000 is depreciation recapture taxed at 25% ($12,500 in federal tax). The remaining $100,000 is taxed at your long-term capital gains rate.

Pennsylvania handles this more simply: the 3.07% flat rate applies to the entire gain, recapture included.

Pennsylvania Basis Differences

Pennsylvania generally starts with the same adjusted basis as your federal return, but Pennsylvania does not allow bonus depreciation.8Department of Revenue. Net Gains (Losses) From the Sale, Exchange, or Disposition of Property If you claimed accelerated depreciation federally, your federal basis and your Pennsylvania basis are different numbers, and each has to be calculated separately.

1031 Exchanges Defer Federal, Not Pennsylvania

A Section 1031 like-kind exchange lets you defer federal capital gains tax when you swap investment or business property for a replacement property. You must identify the replacement within 45 days and close on it within 180 days, and both properties must be held for business or investment use.9Internal Revenue Service. Like-Kind Exchanges Under IRC Section 1031 Your primary residence never qualifies. The exchange defers the tax rather than eliminating it; when you eventually sell the replacement property without another exchange, the deferred gain comes due.

The Pennsylvania wrinkle: the state stopped recognizing 1031 exchanges effective January 1, 2023.8Department of Revenue. Net Gains (Losses) From the Sale, Exchange, or Disposition of Property Even a perfect federal exchange still owes Pennsylvania 3.07% on the full gain in the year of the sale. A single 1031 exchange cannot defer both federal and Pennsylvania tax.

Inherited Property

If you inherited the house, your federal basis is generally the fair market value on the date the previous owner died, not what they originally paid.10Internal Revenue Service. Gifts and Inheritances This stepped-up basis often eliminates most of the taxable gain. A home your parent bought for $80,000 that was worth $350,000 at their death gives you a $350,000 basis; sell for $360,000 and your taxable gain is $10,000.

Pennsylvania largely follows the federal stepped-up basis for inherited property, with a notable exception: the state does not allow a stepped-up basis for property acquired as a surviving spouse or other joint tenant with right of survivorship.11Department of Revenue. Does Pennsylvania Allow a Stepped-Up Basis? If you co-owned a home with your spouse as joint tenants and they passed, the IRS gives you a stepped-up basis on their half; Pennsylvania does not. That gap can create a state tax bill the surviving spouse doesn’t see coming. Pennsylvania also does not recognize the federal alternate valuation date six months after death.8Department of Revenue. Net Gains (Losses) From the Sale, Exchange, or Disposition of Property

Non-Resident Sellers

If you live outside Pennsylvania but sell property inside it, Pennsylvania requires income tax withholding at the 3.07% rate on Pennsylvania-source income paid to non-residents.12Department of Revenue. Nonresident Withholding The closing agent typically handles the withholding and remits it to the Pennsylvania Department of Revenue.

The withholding is a prepayment of your expected Pennsylvania tax, not the final bill. If it exceeds what you actually owe, file a Pennsylvania income tax return (PA-40) to claim a refund. Sellers can also provide documentation at closing to limit the withholding to the actual gain rather than the full sale price.

Two Examples That Show the Stack

Consider a married couple in Pittsburgh who bought their primary residence for $200,000, spent $40,000 on capital improvements, and sell for $500,000. Their adjusted basis is $240,000, and their amount realized after roughly $30,000 in agent commissions and selling costs is $470,000. Taxable gain: $230,000. The federal Section 121 exclusion covers the whole $230,000, so federal income tax is zero. Pennsylvania’s own principal residence exemption also covers the full gain, so state income tax is zero. Their only tax cost is the realty transfer tax: at Pittsburgh’s 5% rate, half of the $25,000 total ($12,500) if they split it with the buyer.

Now change one fact: that property was a rental. The $230,000 gain gets no exclusion at either level. The couple would owe roughly $34,500 in federal long-term capital gains tax at 15%, plus the 3.8% NIIT if their total income tops $250,000, plus $7,061 in Pennsylvania income tax at 3.07%. And if they claimed $60,000 in depreciation, the first $60,000 of gain is recaptured at 25% federally. The difference between selling a home you lived in and one you rented out is enormous.