Capital Gains Tax in Pennsylvania
Capital Gains Tax in Pennsylvania: What Every Investor Needs to Know
Most people understand, at least in general terms, that the federal government taxes investment profits. What surprises many Pennsylvania residents is just how differently their state handles those same gains, and how those differences can quietly cost you thousands of dollars if you're not planning around them.
This guide will explain how Pennsylvania taxes capital gains, what makes the state's approach unique compared to the federal rules and most other states, and what strategies you can use, with the help of a Certified Financial Planner®, to keep more of what you've earned.
What Are Capital Gains?
A capital gain is simply the profit you make when you sell an asset for more than you paid for it. That asset could be stocks, bonds, mutual funds, real estate, a business, or even cryptocurrency. The difference between your sale price and your original purchase price (your "cost basis") is what gets taxed.
At the federal level, gains are divided into two categories based on how long you held the asset:
- Short-term capital gains
- assets held one year or less
- taxed as ordinary income at rates ranging from 0% to 37%.
- Long-term capital gains
- assets held more than one year
- are taxed at preferential rates of 0%, 15%, or 20%, depending on your total taxable income.
For the 2026 tax year, a married couple filing jointly can earn up to $98,901 in total taxable income and pay 0% in federal long-term capital gains tax. The 15% rate applies from $98,900 to $600,050, and the 20% rate kicks in above that. These thresholds are adjusted each year slightly for inflation. For single filers, these thresholds are $49,450 and $545,500.
There is also the Net Investment Income Tax (NIIT), an additional 3.8% federal surtax that applies to investment income (all capital gains) for individuals earning over $200,000 and married couples earning over $250,000. This can push your effective federal rate on long-term gains as high as 23.8%. Note that the NIIT applies to Adjusted Gross Income (AGI); while the income tax rate applies to taxable income, which is AGI minus certain deductions.
How Pennsylvania Taxes Capital Gains and Why It's Different
Here is where Pennsylvania stands apart from the federal system, and from most other states. Pennsylvania taxes all capital gains as ordinary income at a flat rate of 3.07%, regardless of how long you held the asset. There is no distinction between short-term and long-term gains at the state level. Hold a stock for one day or twenty years, Pennsylvania taxes the profit identically. This may sound simple, but the implications go deeper than just the rate. Several Pennsylvania-specific rules can catch even experienced investors off guard.
No Loss Deductions or Carryovers
At the federal level, if your capital losses exceed your capital gains in a given year, you can use those excess losses to offset up to $3,000 of ordinary income, and carry any remaining losses forward into future tax years. Pennsylvania does not allow this. Losses must be recognized in the same tax year the transaction closes, and they are not deductible nor can they carried forward. If you have a bad year and your losses exceed your gains, that's where the story ends for Pennsylvania purposes.
Spouses Cannot Share Losses
Pennsylvania requires spouses to report gains and losses separately. One spouse cannot use a loss to offset the other spouse's gains even on a jointly filed return. This is a meaningful planning consideration for couples with investment accounts held in different names.
The Home Sale Exclusion: Federal vs. State
At the federal level, homeowners who have owned and lived in their primary residence for at least two of the previous five years before sale can exclude up to $250,000 of gain from taxes ($500,000 for married couples filing jointly). This is one of the most valuable tax breaks in the entire tax code.
Pennsylvania offers a similar exclusion but with no cap. If you meet the same ownership and use tests (two years out of the last five), your entire gain on the sale of a primary residence is excluded from Pennsylvania income tax, regardless of the amount.
This is actually more generous than the federal rule for large gains. A couple who sells a home with $800,000 in profit would owe federal capital gains tax on $300,000 of that gain (the amount above the $500,000 federal exclusion), but would owe nothing to Pennsylvania as long as they meet the residency requirements.
However, there is an important caveat: if any portion of your home was used for rental or business purposes during your ownership period, that portion does not qualify for the exclusion, and the prorated gain must be reported.
Pennsylvania Does Not Follow 1031 Exchanges
Real estate investors commonly use Section 1031 "like-kind exchanges" to sell investment property and roll the proceeds into a new property, deferring federal capital gains taxes indefinitely. Pennsylvania does not follow this rule. If you complete a 1031 exchange, you may owe Pennsylvania's 3.07% tax on the gain in the year of the sale, even if you have deferred the federal tax entirely.
Pennsylvania Does Not Recognize Wash Sales
The federal wash-sale rule prevents investors from claiming a tax loss on a security if they repurchase a substantially identical security within 30 days before or after the sale. Pennsylvania does not have this restriction meaning a wash sale that is disallowed at the federal level may still generate a deductible loss for Pennsylvania purposes. This creates a rare planning opportunity that a CFP® can help identify.
Putting It Together: Your Combined Tax Picture
When a Pennsylvania resident sells an appreciated investment, the total tax burden can stack up quickly. Here is a simplified example.
Suppose a married couple filing jointly has $150,000 in combined wages and sells a stock position with a $50,000 long-term gain:
- Federal long-term capital gains rate: 15% on the portion of income over $96,700, but some of the gain may fall in the 0% bracket
- Federal NIIT: Likely does not apply at this income level
- Pennsylvania flat tax: 3.07% on the full $50,000 gain, or $1,535
Now suppose a higher-earning couple with $400,000 in wages sells a stock position with a $200,000 long-term gain:
- Federal long-term capital gains rate: 15%
- Federal NIIT: 3.8% on the gains above the $250,000 threshold
- Pennsylvania flat tax: 3.07% on the full $200,000
Understanding all three layers: federal capital gains, NIIT, and Pennsylvania's flat rate is essential to accurately projecting your tax bill before a sale, not after.
Strategies to Minimize Capital Gains in Pennsylvania
The good news is that there are several legitimate strategies to reduce your capital gains exposure at both the federal and state levels. The right approach depends heavily on your individual circumstances, which is why working with a CFP® is so valuable. That said, here are the primary tools available.
1. Hold Assets for More Than One Year
This does not affect your Pennsylvania tax bill, but it makes a significant difference at the federal level. Converting a short-term gain (taxed as ordinary income, potentially at 37%) to a long-term gain (taxed at 0%, 15%, or 20%) can mean tens of thousands of dollars in federal savings on a large position. Combined with Pennsylvania's flat tax of 3.07%, the long-term rate is still meaningfully lower than the short-term combined rate for most investors.
2. Tax-Loss Harvesting With Pennsylvania Caveats
Tax-loss harvesting involves strategically selling investments that have declined in value to offset gains elsewhere in your portfolio. At the federal level, this is a powerful and well-established strategy. In Pennsylvania, it still works but only in the same tax year, and only within the same taxpayer's accounts. You cannot take losses, carry forward losses, and a spouse cannot use your losses. Timing and coordination are critical.
3. Maximize Tax-Advantaged Accounts
Assets held inside a 401(k), IRA, or other tax-advantaged retirement account are not subject to capital gains tax when sold, as long as the proceeds remain inside the account. This is one of the most powerful structural tools available. For taxable accounts, a CFP® can help you think about which types of investments belong in tax-advantaged accounts (tax-inefficient assets like bonds and REITs) versus taxable brokerage accounts (buy-and-hold stock positions or index funds with low turnover).
4. Gifting Appreciated Assets
Rather than selling an appreciated asset and paying capital gains tax, you may be able to transfer it directly to a recipient - whether a family member in a lower tax bracket, or a qualified charity. Donating appreciated securities to a 501(c)(3) charity allows you to avoid the capital gain entirely and claim a federal charitable deduction for the full market value of the investment, including its gain. Pennsylvania does not offer a state-level charitable deduction, but the federal benefit is still substantial.
Gifts to family members transfer your cost basis to the recipient, which shifts, rather than eliminates the eventual tax burden. Giving to a family member in the 0% federal capital gains bracket can result in a meaningful tax reduction at the household level.
5. Installment Sales for Business or Real Estate
If you are selling a business, investment property, or other large asset, structuring the transaction as an installment sale - spreading the proceeds over multiple years - can keep your total income in a lower federal bracket each year. Pennsylvania's flat 3.07% rate does not change based on the installment structure, but the federal benefit can be significant for large transactions.
6. Qualified Opportunity Zone Investments
Qualified Opportunity Zones (QOZs) allow investors to defer and potentially reduce federal capital gains taxes by reinvesting gains into designated economically distressed areas within 180 days. If you hold the investment for at least ten years, any gain on the Opportunity Zone investment itself may be excluded from federal capital gains tax entirely. Pennsylvania follows some, but not all, federal QOZ rules, so state-level treatment requires careful review.
7. Stepped-Up Basis for Inherited Assets
When someone inherits stocks, real estate, or other capital assets, the cost basis resets to the fair market value on the date of the original owner's death. This "step-up in basis" means the heir owes no capital gains tax on any appreciation that occurred during the decedent's lifetime. For Pennsylvania residents with highly appreciated assets, incorporating this into an estate plan can result in significant tax savings for heirs. It should be noted that gifting assets to a future heir could save on the Pennsylvania inheritance tax, but the capital gains that would be paid could be greater than the inheritance tax. Thus, this should be considered if gifting is an estate planning strategy.
The Pennsylvania-Specific Planning Opportunity Most People Miss
One of the most overlooked capital gains planning opportunities in Pennsylvania stems from the state's flat rate structure. Because Pennsylvania does not tax long-term gains differently from short-term gains, and because the 3.07% rate is relatively low compared to many other states, Pennsylvania residents actually have a meaningful advantage when it comes to total tax burden on long-term gains as long as they plan properly at the federal level.
The real leverage in capital gains planning is almost always on the federal side: managing which bracket your gains fall into, timing sales relative to income fluctuations, and using the right accounts and strategies to minimize the federal rate. A well-coordinated plan can make an enormous difference.
When Does a CFP® Add the Most Value?
Capital gains tax planning is not a once-a-year conversation. It is an ongoing process that intersects with your investment portfolio, retirement savings, estate plan, and tax return. Here are situations where working with a Certified Financial Planner® is particularly valuable:
- You are selling a large stock position, especially if it is concentrated in a single company (such as employer stock through an ESPP or RSU plan or inside a 401k)).
- You are selling a business or investment property
- You are approaching retirement and will be drawing down from taxable accounts
- You have experienced significant capital losses and want to make sure they are being used strategically
- You are considering a 1031 exchange and need to understand the Pennsylvania tax implications alongside the federal deferral
- You are doing estate planning and want to think through the stepped-up basis for heirs
- Your income fluctuates year to year, creating opportunities to harvest gains or losses in strategic years
- You plan to move to or away from Pennsylvania and you want to leverage one state’s laws versus the others.
- You are recognizing capital losses in excess of $3,000 and wish to use some of those to offset gains in future year(s).
- Evaluating whether or not it makes sense to gift an appreciated asset with respect to capital gains tax versus inheritance tax.
At Menninger & Associates, we work with clients to build tax-efficient investment strategies that account for both the federal and Pennsylvania rules not just at tax time, but throughout the year and your lifetime, when the real planning work actually happens.
The opinions voiced in this content are for general information only and are not intended to provide specific advice or recommendations for any individual. To determine which strategies or investments may be suitable for you, consult the appropriate qualified professional prior to making a decision.
This information is not intended to be a substitute for specific individualized tax advice. We suggest that you discuss your specific tax issues with a qualified tax advisor.