State tax docs / States / Pennsylvania
Pennsylvania state income tax: engine rules, 2026
How the QuantCalc engine computes Pennsylvania tax for tax year 2026, rule by rule, with the official source for each rule. Verification status: Statute and instructions cited (what this means).
On this page: How the tax is computed · Rate schedule · Deductions, exemptions and credits · Social Security · IRA, 401(k) and private pensions · Public pensions · Military retirement pay · Roth conversions · Capital gains · Worked examples · Not calculated ·
Verification. Machine-readable: this state's entry in the
engine config and the provenance file
(key PA).
How the tax is computed
Every step the engine takes for Pennsylvania, in the order it takes them. Steps marked with a filing status or household type apply only there. Each step links the section below that carries Pennsylvania's figures and the official sources for it; the calculation order page describes every step for all jurisdictions.
What each filing status gets, read back from the engine for a household with $1 of income (so below every phase-out and income test):
| Single | Married filing jointly | Married filing separately | Head of household | |
|---|---|---|---|---|
| Rate schedule used | single schedule | joint schedule | joint schedule, thresholds halved | single schedule |
| Top rate | 3.07% flat | 3.07% flat | 3.07% flat | 3.07% flat |
| Standard deduction, under 65 | none | none | none | none |
| Standard deduction at 70 (joint: both 70) | none | none | none | none |
| Personal exemption | none | none | none | none |
| Age subtractions at 70 (joint: both 70) | none | none | none | none |
- Per-person mode joint returns with the spouse's age given On a joint return with the spouse's age given, every age test the state applies per taxpayer is evaluated for each spouse at their own age. Without it one household age applies to both.
engine step (compute_state_tax_detail). Engine convention, no external source: The engine cannot know the second spouse's age unless told. - Rate schedule and standard deduction by filing status Single uses the single schedule and deduction; married filing jointly the joint ones. Head of household and married filing separately follow the two steps below.
Pennsylvania's values · engine step (select_brackets). Sources (Rate schedule): Personal Income Tax (checked 2026-09-27); 2025 Pennsylvania Personal Income Tax Return Instructions (PA-40 IN) (checked 2026-09-27) - Married filing separately Where the state publishes its own separate schedule, that one (with half the joint deduction unless a separate deduction is set). Where one schedule applies to every status, that schedule unscaled with the single deduction. Otherwise the joint schedule with every threshold and the deduction halved (computed as the joint tax on twice the income, halved).
Pennsylvania's values · engine step (select_brackets). Sources (Rate schedule): Personal Income Tax (checked 2026-09-27); 2025 Pennsylvania Personal Income Tax Return Instructions (PA-40 IN) (checked 2026-09-27) - Head of household The state's head-of-household schedule where it has one, else the single schedule; the head-of-household deduction where set, else the single deduction.
Pennsylvania's values · engine step (select_brackets). Sources (Rate schedule): Personal Income Tax (checked 2026-09-27); 2025 Pennsylvania Personal Income Tax Return Instructions (PA-40 IN) (checked 2026-09-27) - The income total every income test uses Other ordinary income + retirement distributions (before any exclusion) + conversion + federally taxable Social Security + long-term gains. It stands in for federal adjusted gross income in every threshold, cliff and phase-out below; state subtractions do not reduce it.
engine step (compute_state_tax_detail). Engine convention, no external source: The inputs are the federal AGI components, so their sum is federal AGI for these income types. - Attributing income to each spouse joint returns with each spouse's own amounts given With a caller's split (the API's
spouseobject), each spouse's own distributions, pension, public pension, conversion, wages and military pay; spouse 2's shares are clamped into the household totals and spouse 1 gets the rest. Without a split, in per-person mode, every item is divided 50/50. Social Security, other ordinary income and gains are always divided 50/50 where a rule needs a per-person amount. The split is used only where a state's rule is per taxpayer; household totals stay authoritative for the base and the income tests.
engine step (compute_state_tax_detail). Engine convention, no external source: Equal attribution is the neutral split when the owner of a dollar is not known. - Keeping the per-spouse shares inside the household joint returns with each spouse's own amounts given After the public-pension and employer-pension carve-outs, if the two spouses' remaining shares add up to more than the household's exclusion-eligible distributions (an inconsistent split), spouse 1's share is reduced so they do not.
engine step (compute_state_tax_detail). Engine convention, no external source: Input normalisation. - Military retirement pay The state's military rule runs first, on military pay alone, per taxpayer: each spouse's own pay at their own age when attributed, otherwise half each at the household age on a joint return. Exempt dollars leave the base; the rest become pension dollars for the general retirement rules.
Pennsylvania's values · engine step (compute_state_tax_detail). Sources (Military retirement pay): Gross compensation (checked 2026-09-27) - One taxpayer's military exemption Exempt: all of it (below the age split, up to the younger cap). Capped: up to the cap for the age tier, plus the earned-income bonus below the age split when the taxpayer's own wages exceed the threshold, less the taxpayer's own Social Security where the rule says so. Percentage: the percentage (below the age split, up to the younger cap). Then the income limit: above it the exemption is lost, or phased out over the range where one is set.
Pennsylvania's values · engine step (military_exempt_one). Sources (Military retirement pay): Gross compensation (checked 2026-09-27) - Social Security exempt None of the federally taxable benefit enters the base.
Pennsylvania's values · engine step (ss_amount_in_state_base). Sources (Social Security): 2025 Pennsylvania Personal Income Tax Return Instructions (PA-40 IN) (checked 2026-09-27) - Retirement exclusion per spouse (both ages known) joint returns with the spouse's age given Full-exclusion states exclude each qualifying spouse's own dollars. Capped states give each spouse the single cap for their own age against their own eligible dollars (pension dollars only where the exclusion is pension-only; employer dollars only below the IRA age), less their military exclusion and half of any Social Security offset. Per-return states (and the pooled-if-both-qualify rule when both qualify) apply the joint cap to the couple's pooled eligible dollars when either spouse qualifies. The income tests then apply once to the summed deduction.
Pennsylvania's values · engine step (compute_state_tax_detail). Sources (IRA, 401(k) and private pensions): 2025 Pennsylvania Personal Income Tax Return Instructions (PA-40 IN) (checked 2026-09-27) - Retirement exclusion (household) The distributions eligible for the exclusion go through the exclusion below. Taxable public-pension dollars left by a cap are not eligible; below the IRA age only employer-plan dollars are.
Pennsylvania's values · engine step (compute_state_tax_detail). Sources (IRA, 401(k) and private pensions): 2025 Pennsylvania Personal Income Tax Return Instructions (PA-40 IN) (checked 2026-09-27) - Conversion taxed or exempt In full-exclusion states a conversion is exempt at the qualifying age (at any age where the state says so). Elsewhere, unless pooled above, it is ordinary income taxed in full.
Pennsylvania's values · engine step (compute_state_tax_detail). Sources (Roth conversions): 2025 Pennsylvania Personal Income Tax Return Instructions (PA-40 IN) (checked 2026-09-27) - Full exclusion All distributions are excluded at or above the exclusion age; below it they are taxed.
Pennsylvania's values · engine step (retirement_distributions_in_state_base). Sources (IRA, 401(k) and private pensions): 2025 Pennsylvania Personal Income Tax Return Instructions (PA-40 IN) (checked 2026-09-27) - Long-term gains in the base Where gains are taxed as ordinary income: net long-term gain less the flat exclusion (never below zero), times the inclusion share. Elsewhere none enters.
Pennsylvania's values · engine step (compute_state_tax_detail). Sources (Capital gains): Personal Income Tax (checked 2026-09-27); 2025 Pennsylvania Personal Income Tax Return Instructions (PA-40 IN) (checked 2026-09-27) - State taxable income Other ordinary income + Social Security, retirement income, conversion and gains left in the base − standard deduction − personal exemption − age subtractions.
engine step (compute_state_tax_detail). Engine convention, no external source: The order of subtraction follows the state forms; each amount is sourced at its own step. - No tax at or below zero State taxable income at or below zero returns a tax of 0 (credits are not refundable and nothing below applies).
engine step (compute_state_tax_detail). Engine convention, no external source: Every credit the engine carries is nonrefundable, so nothing below can make a zero tax negative; each credit is sourced at its own step. - Separate-return scaling married filing separately For the halved-joint rule, taxable income is doubled before the schedule and the result halved.
Pennsylvania's values · engine step (compute_state_tax_detail). Sources (Rate schedule): Personal Income Tax (checked 2026-09-27); 2025 Pennsylvania Personal Income Tax Return Instructions (PA-40 IN) (checked 2026-09-27) - The rate schedule Each bracket's rate on the part of taxable income inside it, summed. No rounding: the result is carried in full precision.
Pennsylvania's values · engine step (apply_state_brackets). Sources (Rate schedule): Personal Income Tax (checked 2026-09-27); 2025 Pennsylvania Personal Income Tax Return Instructions (PA-40 IN) (checked 2026-09-27) - Credits cannot make the tax negative The credits are subtracted and the result floored at zero.
engine step (compute_state_tax_detail). Engine convention, no external source: Every credit the engine carries is nonrefundable; each credit is sourced at its own step.
Rate schedule
A flat 3.07% on state taxable income.
- Personal Income Tax, Pennsylvania Department of Revenue. Pennsylvania taxes resident individuals at a single flat rate of 3.07% on taxable income, the same for every filing status. Checked 2026-09-27.
- 2025 Pennsylvania Personal Income Tax Return Instructions (PA-40 IN), Pennsylvania Department of Revenue. The PA-40 instructions state the 3.07% flat rate applied to taxable income. Checked 2026-09-27.
Deductions, exemptions and credits
- No standard deduction.
Source review notes (what the sources do not state outright, or what the engine does not carry):
- PA Tax Forgiveness (Schedule SP) is not modeled by the engine and is not sourced here.
- Personal Income Tax, Pennsylvania Department of Revenue. Pennsylvania has no standard deduction and no personal exemption, so the engine applies the 3.07% rate to income from the first dollar. Checked 2026-09-27.
- 2025 Pennsylvania Personal Income Tax Return Instructions (PA-40 IN), Pennsylvania Department of Revenue. PA law allows no standard deduction, personal-exemption deduction or itemized deductions. Checked 2026-09-27.
IRA, 401(k) and private pensions
- Pension, annuity and IRA/401(k) distributions are fully excluded at any age. No dollar cap and no income limit.
Source review notes (what the sources do not state outright, or what the engine does not carry):
- The engine excludes retirement distributions at every age (no 59 1/2 gate, no contribution basis); PA taxes pre-59 1/2 IRA distributions to the extent they exceed prior contributions. This is a documented engine limitation (state_tax.c), not a sourced rule.
- 2025 Pennsylvania Personal Income Tax Return Instructions (PA-40 IN), Pennsylvania Department of Revenue. IRA distributions received on or after age 59 1/2 and retirement benefits from eligible employer plans paid after the taxpayer is eligible to retire and retires are not taxable in Pennsylvania; distributions before 59 1/2 are taxable only to the extent they exceed prior (already PA-taxed) contributions. Checked 2026-09-27.
Public pensions
No separate treatment: public pensions follow the rules for other retirement income above.
- 2025 Pennsylvania Personal Income Tax Return Instructions (PA-40 IN), Pennsylvania Department of Revenue. Pensions paid after retirement, including military pensions and federal Civil Service annuities, are not taxable in Pennsylvania; public-employer pensions are treated like other eligible-plan retirement benefits. Checked 2026-09-27.
Military retirement pay
- Military retirement pay is fully exempt, at any age.
- Rules are applied per taxpayer at that person's own age when the spouse's age is given. API value:
rules.militaryRetirement.treatment: "exempt".
- Gross compensation, Pennsylvania Department of Revenue. Retired or retainer pay of a uniformed service member is not taxable compensation. Checked 2026-09-27.
Roth conversions
A traditional-to-Roth conversion is not taxed at any age.
Source review notes (what the sources do not state outright, or what the engine does not carry):
- Amounts withheld for federal tax and not deposited into the Roth are PA-taxable (per the same instructions' CAUTION); the engine treats the whole conversion as nontaxable.
- 2025 Pennsylvania Personal Income Tax Return Instructions (PA-40 IN), Pennsylvania Department of Revenue. A traditional-to-Roth IRA conversion moved in full (trustee-to-trustee, or reinvested within 60 days) is not taxable in Pennsylvania at any age. Checked 2026-09-27.
Capital gains
- Net long-term gain is taxed as ordinary income.
- Short-term gains are ordinary income.
- Personal Income Tax, Pennsylvania Department of Revenue. Net gains from the disposition of property are one of Pennsylvania's eight classes of taxable income, taxed at the flat 3.07%. Checked 2026-09-27.
- 2025 Pennsylvania Personal Income Tax Return Instructions (PA-40 IN), Pennsylvania Department of Revenue. Pennsylvania makes no distinction between long-term and short-term gains, so long-term gains are taxed as ordinary income at 3.07%. Checked 2026-09-27.
Worked examples
Computed by the engine for the fixed households below (the same ones for every state, so states compare directly). Federal tax is not supplied, so a federal-tax deduction is not taken; the income tests use the sum of the components as income.
| Household (engine inputs) | State tax |
|---|---|
| Single, 67: $30,000 private pension, $20,000 IRA, $10,000 interest, $24,000 Social Security ($17,000 federally taxable), $5,000 long-term gain | $460.50 |
| Married filing jointly, 70: $40,000 public pension, $40,000 IRA, $20,000 interest, $40,000 Social Security ($34,000 federally taxable), $10,000 long-term gain | $921 |
| Single, 60: $60,000 other ordinary income and a $50,000 Roth conversion | $1,842 |
| Married filing jointly, 66: $30,000 IRA, a $40,000 Roth conversion, $30,000 Social Security ($25,500 federally taxable) | $0 |
| Single, 58: $36,000 military retirement pay and $30,000 wages | $921 |
| Married filing jointly, ages 67 and 61: $50,000 IRA, $10,000 interest, $30,000 Social Security ($25,500 federally taxable), each spouse's age given | $307 |
Line by line
The intermediate lines the engine records while it computes each example (its detail record, printed as it comes out; lines that are zero are left out). The engine's documentation build checks that the lines add up to the taxable income and the tax, for every state, filing status and a grid of households. Each line links the engine step that produces it.
Single, 67: $30,000 private pension, $20,000 IRA, $10,000 interest, $24,000 Social Security ($17,000 federally taxable), $5,000 long-term gain: $460.50
| Line | Amount |
|---|---|
| Income total used by the income tests | $82,000 |
| Retirement income and conversions excluded (not in the base) | $50,000 |
| + Other ordinary income in the base | $10,000 |
| + Long-term gain in the base | $5,000 |
| = State taxable income | $15,000 |
| Tax from the rate schedule | $460.50 |
| = Tax before credits | $460.50 |
| = Tax | $460.50 |
Married filing jointly, 70: $40,000 public pension, $40,000 IRA, $20,000 interest, $40,000 Social Security ($34,000 federally taxable), $10,000 long-term gain: $921
| Line | Amount |
|---|---|
| Income total used by the income tests | $144,000 |
| Retirement income and conversions excluded (not in the base) | $80,000 |
| + Other ordinary income in the base | $20,000 |
| + Long-term gain in the base | $10,000 |
| = State taxable income | $30,000 |
| Tax from the rate schedule | $921 |
| = Tax before credits | $921 |
| = Tax | $921 |
Single, 60: $60,000 other ordinary income and a $50,000 Roth conversion: $1,842
| Line | Amount |
|---|---|
| Income total used by the income tests | $110,000 |
| Retirement income and conversions excluded (not in the base) | $50,000 |
| + Other ordinary income in the base | $60,000 |
| = State taxable income | $60,000 |
| Tax from the rate schedule | $1,842 |
| = Tax before credits | $1,842 |
| = Tax | $1,842 |
Married filing jointly, 66: $30,000 IRA, a $40,000 Roth conversion, $30,000 Social Security ($25,500 federally taxable): $0
Single, 58: $36,000 military retirement pay and $30,000 wages: $921
| Line | Amount |
|---|---|
| Income total used by the income tests | $66,000 |
| Military pay excluded (not in the base) | $36,000 |
| + Other ordinary income in the base | $30,000 |
| = State taxable income | $30,000 |
| Tax from the rate schedule | $921 |
| = Tax before credits | $921 |
| = Tax | $921 |
Married filing jointly, ages 67 and 61: $50,000 IRA, $10,000 interest, $30,000 Social Security ($25,500 federally taxable), each spouse's age given: $307
| Line | Amount |
|---|---|
| Income total used by the income tests | $85,500 |
| Retirement income and conversions excluded (not in the base) | $50,000 |
| + Other ordinary income in the base | $10,000 |
| = State taxable income | $10,000 |
| Tax from the rate schedule | $307 |
| = Tax before credits | $307 |
| = Tax | $307 |
What the engine does not calculate, and known approximations
- Distributions before 59½ are excluded like later ones; Pennsylvania taxes the earnings part of an early distribution.
- PA Tax Forgiveness (Schedule SP) is not modeled by the engine and is not sourced here. (Deductions, exemptions and credits)
What the engine does not calculate for any state (itemized deductions, credits beyond those listed, part-year residents, dependents, blindness and disability, and more) is listed on the calculation order page.
Verification
Statute and instructions cited Full exclusion and the taxation of gains cited to the Pennsylvania Code and DOR answers; golden rows pin them.
- Golden scenarios (hand-computed expected tax, asserted to within $1):
S16,GPA-LTCG1. - State-specific unit tests:
test_ss_exempt_states_dont_tax_ss,test_full_exclusion_states_exempt_pension_and_ira,test_full_exclusion_states_also_exempt_roth_conversion,test_v3_folds_v2. - Structural tests covering every state: 3.
Social Security
Social Security benefits are fully exempt: none of the federally taxable amount enters the state base.
API value:
socialSecurityRule: "exempt". The engine's input is the federally taxable amount; income tests use the sum of the income components as the adjusted-gross-income proxy.