Pennsylvania capital gains tax on real estate is a flat 3.07%, and until January 1, 2023 it was the one state tax a 1031 exchange could not defer. That has changed: a 1031 exchange in Pennsylvania now defers the state tax along with the federal tax. What it still cannot touch is the realty transfer tax, 1% to the Commonwealth plus a local share that reaches 3.578% in Philadelphia.
Reviewed by Jon Hilley, CEO & Founder of 1031 Specialists. Last reviewed September 29, 2026.
| State tax on real estate gains | Yes. Flat 3.07% personal income tax |
|---|---|
| Long-term capital gains treatment | No preferential rate; gains fall in the "net gains from the sale of property" income class |
| Nonresident withholding at closing | None on the sale. Separate 3.07% withholding applies to certain rent paid to nonresidents |
| Withholding form | None required for a sale |
| Transfer or conveyance tax (a 1031 does not defer it) | 1% state realty transfer tax plus local tax (Philadelphia 3.578%, 4.578% total); usually split between buyer and seller |
| Clawback on out-of-state replacement property | None |
| Conforms to Section 1031 | Yes, for exchanges on or after January 1, 2023 |
| Local income tax | Local earned income taxes generally reach wages and business income, not investment gains |
Table of contents
- How much is capital gains tax on real estate in Pennsylvania?
- Pennsylvania tax on a $300,000 gain: worked example
- Exchanges before 2023: the old rule and your Pennsylvania basis
- Pennsylvania nonresident withholding
- Pennsylvania realty transfer tax
- Pennsylvania conformity and clawback
- Moving into or out of Pennsylvania
- Where Pennsylvania exchanges happen
- Federal exchange rules in Pennsylvania
- Pennsylvania 1031 mistakes
- Start your Pennsylvania 1031 exchange
- Frequently asked questions
- Sources
How much is capital gains tax on real estate in Pennsylvania?
Pennsylvania levies its personal income tax at a flat 3.07% on residents and nonresidents alike. There is no bracket to climb and no special long-term rate. Depreciation recapture is not taxed at a higher state rate either. What is different is the base. Pennsylvania sorts income into classes, and a loss in one class generally cannot offset income in another, so a rental loss does not shelter a gain on the sale of a building. Your Pennsylvania adjusted basis can also differ from your federal basis, which matters for property held through partnerships or bought in an exchange before 2023.
Local earned income taxes apply to wages and business profits, not to gains from selling investment property. Philadelphia residents should still ask their CPA how the city treats unearned income. Our capital gains vs. 1031 comparison puts the federal and state numbers side by side.
Pennsylvania tax on a $300,000 gain: worked example
Assumptions: a $300,000 long-term gain on an investment property, $100,000 of it unrecaptured Section 1250 depreciation, a seller in the top federal bracket, filing jointly. Pennsylvania's rate is flat, so there is no bracket assumption.
| Tax | Math | Amount |
|---|---|---|
| Federal unrecaptured §1250 gain | 25% x $100,000 | $25,000 |
| Federal long-term capital gain | 20% x $200,000 | $40,000 |
| Net investment income tax | 3.8% x $300,000 | $11,400 |
| Federal subtotal | $76,400 | |
| Pennsylvania personal income tax | 3.07% x $300,000 | $9,210 |
| Total deferred by a full 1031 | $85,610 |
Pennsylvania's share is small next to the federal $76,400. Before 2023, though, that $9,210 was due even in a perfect exchange. Check the federal recapture on your own numbers with the depreciation recapture calculator.
Exchanges before 2023: the old rule and your Pennsylvania basis
For decades Pennsylvania did not follow Section 1031 for individuals. If you completed a federal exchange in 2022 or earlier, you owed Pennsylvania tax on the gain that year even though the federal tax was deferred. The Department of Revenue's guidance now states that deferral of gain from like-kind exchanges is allowed effective January 1, 2023.
That history leaves a trap for long-time exchangers. If you already paid Pennsylvania tax on an older exchange, your Pennsylvania basis in the replacement property is higher than your federal basis. When you sell or exchange that property now, the Pennsylvania gain should be smaller than the federal gain. Keep the old PA-40 Schedule D and exchange records so you do not pay state tax on the same gain twice.
Pennsylvania nonresident withholding
Pennsylvania does not require withholding from a nonresident's sale of real estate at closing. Its nonresident withholding rule is aimed elsewhere: payers must withhold 3.07% from Pennsylvania-source non-employee compensation and from lease payments for Pennsylvania real property paid to nonresidents, once payments to that person exceed $5,000 in a year; residential leases are excluded. A nonresident who sells in a taxable sale still files a PA-40 and pays 3.07% on the gain; in an exchange, the gain is deferred.
Pennsylvania realty transfer tax
The realty transfer tax is charged on the value of the property, not the gain, so a 1031 exchange does not defer it. The Commonwealth charges 1%, and the county recorder of deeds usually collects a local realty transfer tax at the same time. Local rates are set by municipalities and school districts and vary widely. Buyer and seller are jointly liable for the tax, and custom in most of the state is to split it evenly.
Philadelphia is the outlier. The city rate is 3.578%, for 4.578% in total. On a $2 million Philadelphia apartment building split evenly, each side pays $45,780. As the seller in an exchange, your share comes out of the proceeds; as the buyer of replacement property, your share is a purchase cost you can fund from the exchange account. Philadelphia also taxes transfers of interests in a real estate company when 75% or more of the ownership changes, so selling the entity instead of the building does not avoid it.
Pennsylvania conformity and clawback
For exchanges on or after January 1, 2023, Pennsylvania allows the same deferral as the federal return, and it has no annual tracking form or clawback of the kind California runs with FTB 3840. The Department's own example is a Pennsylvania resident exchanging Pennsylvania land for Florida land: the gain is deferred until the Florida land is sold. If you are a Pennsylvania resident at that later taxable sale, Pennsylvania taxes the full gain. Holding until death and passing a stepped-up basis to heirs is the permanent exit; see our swap-till-you-drop guide.
Moving into or out of Pennsylvania
Nonresidents owe Pennsylvania's 3.07% on gain from Pennsylvania real estate, but with no closing withholding the tax is settled on the PA-40. Outbound Pennsylvania capital often goes to Florida or Delaware, where Pennsylvania buyers are a large share of the beach market. Inbound, New Jersey and New York owners trade high-tax, high-cost buildings for Lehigh Valley warehouses and Philadelphia multifamily, where the state tax on a later sale is a flat 3.07% instead of 10% or more.
Where Pennsylvania exchanges happen
Philadelphia anchors the state's volume in multifamily, mixed-use and industrial; our 1031 exchange in Philadelphia guide covers the city market and its transfer tax in detail. Pittsburgh draws health care and university-driven investment. The Lehigh Valley around Allentown, Bethlehem and Easton is one of the East Coast's largest warehouse corridors on I-78, and Harrisburg and the I-81 counties add more logistics demand. Property tax is set locally and funds school districts, so pull the actual millage for any replacement property.
Federal exchange rules in Pennsylvania
Identify replacement property within 45 days of your sale and close within 180 days. A qualified intermediary must hold the proceeds; you cannot touch them. Buy equal or greater value and replace your debt to defer all of the tax. The 1031 exchange guides explain each rule, the 45-day identification validator checks your list, and the 1031 exchange calculator estimates your deferral.
Pennsylvania 1031 mistakes
- Paying 3.07% on a 2023-or-later exchange because your preparer is working from the old rule.
- Using the federal basis on the PA return for a property acquired in a pre-2023 exchange, and paying state tax twice on the same gain.
- Leaving the realty transfer tax out of the net proceeds, especially in Philadelphia at 4.578%.
- Selling a Philadelphia real estate company interest to avoid transfer tax; 75% changes of ownership are taxable, and a partnership interest is not like-kind property.
- Expecting a rental loss to offset the gain on the Pennsylvania return; the income classes do not mix.
Start your Pennsylvania 1031 exchange
Engage us before your relinquished property closes. We prepare the exchange agreement and assignment for your title company or settlement attorney, hold the proceeds in a segregated account, and track both deadlines. Start your exchange or book an intro call.
Frequently asked questions
How can I avoid capital gains tax on real estate in Pennsylvania?
Use a 1031 exchange. Since January 1, 2023, a qualifying exchange defers Pennsylvania's 3.07% tax as well as the federal tax, as long as you reinvest all net proceeds in like-kind property through a qualified intermediary within 180 days.
What is the Pennsylvania capital gains tax rate on real estate?
A flat 3.07%, the same personal income tax rate that applies to other income. There is no separate long-term rate, and nonresidents pay the same rate on Pennsylvania property.
Does Pennsylvania recognize 1031 exchanges now?
Yes. The Department of Revenue allows deferral of gain from like-kind exchanges effective January 1, 2023. Exchanges completed in 2022 or earlier were taxable for Pennsylvania purposes.
Does a 1031 exchange defer the Pennsylvania realty transfer tax?
No. The 1% state tax and any local transfer tax are based on the property's value and are due at closing. In Philadelphia the combined rate is 4.578%, usually split between buyer and seller.
Is there nonresident withholding when I sell Pennsylvania property?
No. Pennsylvania does not withhold on a nonresident's sale of real estate. Its 3.07% nonresident withholding applies to certain lease payments and non-employee compensation over $5,000 a year.
Sources
- PA Department of Revenue: Personal Income Tax
- PA PIT Guide: Net Gains (Losses) from the Sale, Exchange, or Disposition of Property
- PA Department of Revenue: Realty Transfer Tax
- PA Department of Revenue: Nonresident Withholding
- City of Philadelphia: Realty Transfer Tax
Related: New Jersey, New York, Delaware, Maryland and all 50 states.
This page is general information, not tax or legal advice. 1031 Specialists is a qualified intermediary. Pennsylvania rules changed in 2023 and local rates vary, so confirm the treatment for your tax year with your CPA.
















