2026 state guide
How Pennsylvania taxes capital gains
Both short-term and long-term gains are taxed at Pennsylvania’s flat 3.07% rate.
This calculator applies the same brackets to every filing status. Pennsylvania taxes dividends as ordinary income at a flat 3.07%.
Losses work differently too: Pennsylvania doesn’t let a net capital loss reduce other income or carry forward to future years, unlike the federal $3,000 deduction. Losses still offset gains within the same year. The tax-loss harvesting simulator models this.
Official source: Pennsylvania state tax agency. Federal rates come from IRS Rev. Proc. 2025-32 and IRC §1411.
Pennsylvania capital gains tax: worked examples
Each example below is calculated with the same 2026 engine as the calculator, using federal long-term rates, the 3.8% NIIT and Pennsylvania’s rules. Example 1 matches the calculator's starting inputs; Examples 2 and 3 show larger, long-term sales.
Example 1: $50,000 stock gain, long-term vs. short-term
A single filer earning $100,000 of taxable income sells shares for a $50,000 gain ($50,000 cost basis, $100,000 sale price). What they pay in Pennsylvania if they held the shares more than a year versus one year or less:
| Line item | Long-termheld > 1 yr | Short-termheld ≤ 1 yr |
|---|---|---|
| Federal tax | $7,500 | $11,886 |
| Net Investment Income Tax (3.8%) | $0 | $0 |
| Pennsylvania tax | $1,535 | $1,535 |
| Total tax | $9,035 | $13,421 |
| Net take-home profit | $40,965 | $36,579 |
- Long-term: the $50,000 gain is stacked on $100,000 of taxable income and taxed at federal long-term rates (15% on $50,000).
- Short-term: the same gain is taxed like wages at federal ordinary rates (22% on $5,700 and 24% on $44,300).
- No NIIT: income plus gain ($150,000) is below the $200,000 single-filer threshold.
- Effective state rate on the gain: 3.07% long-term vs. 3.07% short-term.
- Holding past one year saves $4,386 in total tax.
Example 2: $250,000 long-term gain, married filing jointly
A married couple filing jointly with $150,000 of other taxable income sells long-held shares for a $250,000 profit ($100,000 cost basis, $350,000 sale price).
| Federal capital gains tax | $37,500 |
|---|---|
| Net Investment Income Tax (3.8%) | $5,700 |
| Pennsylvania tax | $7,675 |
| Total tax | $50,875 |
| Effective total rate | 20.35% |
| Effective state rate on the gain | 3.07% |
| After-tax profit | $199,125 |
- Federal: the $250,000 gain is stacked on $150,000 of taxable income and taxed at long-term rates (15% on $250,000), for $37,500.
- NIIT: income plus gain is $400,000, above the $250,000 married filing jointly threshold, so 3.8% applies to $150,000: $5,700.
- Pennsylvania: taxed 3.07% on $250,000, for $7,675.
- Sold short-term instead, the same gain would cost $72,147 in total tax ($7,675 of it state tax), so holding past one year saves $21,272.
Example 3: $1.5 million long-term gain, married filing jointly
A married couple filing jointly with $200,000 of other taxable income sells a concentrated, long-held stock position for a $1,500,000 profit ($500,000 cost basis, $2,000,000 sale price).
| Federal capital gains tax | $279,315 |
|---|---|
| Net Investment Income Tax (3.8%) | $55,100 |
| Pennsylvania tax | $46,050 |
| Total tax | $380,465 |
| Effective total rate | 25.36% |
| Effective state rate on the gain | 3.07% |
| After-tax profit | $1,119,535 |
- Federal: the $1,500,000 gain is stacked on $200,000 of taxable income and taxed at long-term rates (15% on $413,700 and 20% on $1,086,300), for $279,315.
- NIIT: income plus gain is $1,700,000, above the $250,000 married filing jointly threshold, so 3.8% applies to $1,450,000: $55,100.
- Pennsylvania: taxed 3.07% on $1,500,000, for $46,050.
- Sold short-term instead, the same gain would cost $618,891 in total tax ($46,050 of it state tax), so holding past one year saves $238,426.
Pennsylvania vs. neighboring states
How Pennsylvania compares with the states it borders, using the same worked examples.
| State | Treatment | Top long-term rate | State tax: $50K gain, single | State tax: $1.5M gain, joint |
|---|---|---|---|---|
| Pennsylvania (this page) | Flat Income Tax | 3.07% | $1,535 | $46,050 |
| Delaware | Ordinary Income | 6.6% | $3,300 | $99,000 |
| Maryland | Ordinary Income + Capital Gains Surtax | 8.5% | $2,563 | $122,688 |
| New Jersey | Ordinary Income | 10.75% | $3,185 | $139,210 |
| New York | Ordinary Income | 10.9% | $2,950 | $101,580 |
| Ohio | Flat Income Tax | 2.75% | $1,375 | $41,250 |
| West Virginia | Ordinary Income | 4.58% | $2,290 | $68,700 |
On a $50,000 long-term gain for a single filer with $100,000 of other taxable income (Example 1), Ohio would take less in state tax than Pennsylvania. State tax is owed to the state where you live when you sell, so the comparison matters only if you are actually changing residency. See capital gains tax rates for all 50 states + DC.
Pennsylvania capital gains tax FAQ
Does Pennsylvania tax long-term stock capital gains in 2026 and 2027?
Yes. Pennsylvania taxes capital gains at a flat 3.07%. Long-term and short-term gains are taxed alike, with a top rate of 3.07%. In 2026, a $50,000 long-term gain for a single filer with $100,000 of other taxable income owes $1,535 in Pennsylvania tax. Pennsylvania's rules are unchanged for 2027 under current law.
What is the combined federal and Pennsylvania capital gains tax rate?
Adding the top marginal rates, long-term gains face up to 26.87% (20% federal + 3.8% NIIT + 3.07% Pennsylvania) and short-term gains up to 43.87% (37% + 3.8% + 3.07%). Most investors pay far less than the top rates: on a $50,000 long-term gain for a single filer with $100,000 of other taxable income, the combined effective rate is 18.07% ($7,500 federal, $0 NIIT and $1,535 Pennsylvania tax).
Are short-term and long-term gains taxed differently in Pennsylvania?
No. Pennsylvania taxes short-term and long-term gains at the same rates. Holding more than a year still lowers your federal tax.
How much Pennsylvania tax would I owe on a $50,000 stock gain?
For a single filer with $100,000 of other taxable income and a $50,000 long-term gain, Pennsylvania tax is $1,535 (3.07% of the gain). Adding $7,500 federal tax and $0 NIIT brings the total to $9,035, leaving $40,965 after tax.
How can Pennsylvania investors legally reduce taxes on stock sales?
Hold shares for more than a year: long-term gains get federal rates of 0%, 15% or 20% instead of up to 37%. Harvest losses: realized losses offset gains dollar for dollar, and up to $3,000 of excess loss a year reduces other income on your federal return, but Pennsylvania doesn't let a net loss reduce other income or carry forward, so match losses to gains in the same year (see our tax-loss harvesting simulator). Trade inside tax-advantaged accounts such as a 401(k), traditional IRA or Roth IRA, where sales are not taxed when they happen. Donate appreciated long-term shares to charity instead of cash to avoid capital gains tax on the appreciation.
Does Pennsylvania tax dividends?
Pennsylvania taxes dividends as ordinary income at a flat 3.07%.
For the full federal picture (bracket stacking, the NIIT and ways to reduce the tax), read the 2026 stock capital gains tax guide.