Skip to content

The model excludes HSA payroll contributions from taxable wages with no section 223(b) limit #10897

Open

Description

@MaxGhenis

The model subtracts health_savings_account_payroll_contributions from wages in full when it computes irs_employment_income. It never caps the amount at the HSA contribution limit, so it takes contributions past the limit out of AGI and out of EITC earned income too.

For example, a single 40-year-old in Texas earns $60,000 in 2026 and owes $5,020 of federal income tax with no HSA contributions. With $4,400 of HSA payroll contributions, the 2026 self-only limit, the model gives AGI of $55,600 and income tax of $4,492. With $20,000, more than twice the $8,750 family limit, it gives AGI of $40,000 and income tax of $2,620. With self-only coverage all year, the worker owes tax on the $15,600 excess, for AGI of $55,600 and income tax of $4,492.

Only users who enter contributions above the limit in a household calculation get these results, since the model reads no HSA payroll contributions from the default dataset.

What the law says

  • Congress excludes an employer's contributions to an eligible employee's HSA only "to the extent such amounts do not exceed the limitation under section 223(b)" (IRC 106(d)(1)).
  • The IRS treats salary reductions through a cafeteria plan as employer contributions, and says "Excess contributions made by your employer are included in your gross income" (Publication 969).
  • In IRC 223(b), Congress sets monthly limits for self-only and family coverage, adds $1,000 from age 55, and cuts the limit on the employee's own HSA deduction by the employer contributions 106(d) excludes. For 2026 the IRS published inflation-adjusted limits of $4,400 and $8,750 (Rev. Proc. 2025-19).

In the code

Reproduction

At 935b24f, this script:

from policyengine_us import Simulation, CountryTaxBenefitSystem

YEAR = 2026


def run(people, tax_unit_extra=None, state="ND", outputs=(), year=YEAR):
    members = list(people)
    adults = [n for n in members if people[n].get("age", 40) >= 18][:2]
    marital = {"m": {"members": adults}}
    for n in members:
        if n not in adults:
            marital[f"m_{n}"] = {"members": [n]}
    situation = {
        "people": {name: {k: {year: v} for k, v in attrs.items()} for name, attrs in people.items()},
        "tax_units": {"tu": {"members": members, **{k: {year: v} for k, v in (tax_unit_extra or {}).items()}}},
        "families": {"f": {"members": members}},
        "spm_units": {"s": {"members": members}},
        "marital_units": marital,
        "households": {"h": {"members": members, "state_code": {year: state}}},
    }
    sim = Simulation(situation=situation)
    return {o: float(sim.calculate(o, year).sum()) for o in outputs}


def fmt(d):
    return ", ".join(f"{k}={v:,.2f}" for k, v in d.items())


p = CountryTaxBenefitSystem().parameters(f"{YEAR}-01-01").gov.irs.gross_income.health_savings_account_contributions.limit
print("limit self_only =", p.self_only, " family =", p.family)
out2 = ["irs_employment_income", "adjusted_gross_income", "income_tax"]
for hsa in [0, 4_400, 8_750, 20_000]:
    print(f"HSA payroll {hsa:>6,}:", fmt(run({"you": {"age": 40, "employment_income": 60_000, "health_savings_account_payroll_contributions": hsa}}, state="TX", outputs=out2)))

prints:

limit self_only = 4400  family = 8750
HSA payroll      0: irs_employment_income=60,000.00, adjusted_gross_income=60,000.00, income_tax=5,020.00
HSA payroll  4,400: irs_employment_income=55,600.00, adjusted_gross_income=55,600.00, income_tax=4,492.00
HSA payroll  8,750: irs_employment_income=51,250.00, adjusted_gross_income=51,250.00, income_tax=3,970.00
HSA payroll 20,000: irs_employment_income=40,000.00, adjusted_gross_income=40,000.00, income_tax=2,620.00

Fix

The model could take no more than the person's 223(b) limit out of wages and leave the rest in irs_employment_income, as it does for 401(k) deferrals. To find that limit, we would add a parameter for the $1,000 age-55 amount and an input for high deductible health plan coverage: none, self-only or family. Congress limits the 106(d) exclusion to eligible individuals, who need that coverage (IRC 223(c)(1)). Until the coverage input exists, the model could cap each person at the family limit plus $1,000 from age 55, the most Congress allows one person under 223(b).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions