From d2be9c201c96d3ed260545ea3f4f69cff747d3f5 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Mon, 19 Oct 2026 14:33:04 -0400 Subject: [PATCH 1/4] Let employers deduct less than the permitted state payroll premium Add employer_state_payroll_premium_deduction_share (default 1) for the programs whose statute puts the premium on the employer and lets it deduct up to a share from wages: CO FAMLI, DE Paid Leave, ME and MA PFML, MN Paid Leave, NY PFL and DBL, the VT Child Care Contribution and WA PFML. The employee amount is the permitted share times the deduction share; the employer-side variables carry the part it does not deduct. Encode Acts 2026 c. 101 ss. 25-26 for Massachusetts from 2027-01-01, with DFML's 2027 family and medical rates, and cite CGS 31-49g(b)(1) for the Connecticut paid leave rate. Co-Authored-By: Claude Opus 5.5 --- .../payroll-employer-deduction-share.added.md | 1 + .../tax/payroll/paid_leave/employee_rate.yaml | 4 +- .../paid_leave/family_employee_share.yaml | 22 ++ .../tax/payroll/paid_leave/family_rate.yaml | 6 +- .../paid_leave/medical_employee_share.yaml | 8 +- .../tax/payroll/paid_leave/medical_rate.yaml | 6 +- ...roll_premium_deduction_share_invariants.py | 193 ++++++++++++++ .../ma_employee_paid_leave_contribution.yaml | 45 ++++ ...state_payroll_premium_deduction_share.yaml | 239 ++++++++++++++++++ .../famli/co_employee_famli_contribution.py | 13 +- .../famli/co_employer_famli_contribution.py | 15 +- .../de_employee_paid_leave_contribution.py | 10 +- .../de_employer_paid_leave_contribution.py | 12 +- .../ma_employee_paid_leave_contribution.py | 19 +- .../ma_employer_paid_leave_contribution.py | 25 +- .../me_employee_paid_leave_contribution.py | 10 +- .../me_employer_paid_leave_contribution.py | 12 +- .../mn_employee_paid_leave_contribution.py | 13 +- ...ployee_disability_benefits_contribution.py | 17 +- ...employee_paid_family_leave_contribution.py | 13 +- .../tax/payroll/employee_state_payroll_tax.py | 18 +- .../employer_additional_state_payroll_tax.py | 6 +- ...oyer_total_additional_state_payroll_tax.py | 76 ++++-- .../state_payroll_premium_deduction_share.py | 21 ++ .../vt_employee_child_care_contribution.py | 10 +- .../vt_employer_child_care_contribution.py | 13 +- .../wa_employee_paid_leave_contribution.py | 13 +- .../wa_employer_paid_leave_contribution.py | 19 +- .../variables/input/employer_payroll.py | 21 ++ 29 files changed, 800 insertions(+), 80 deletions(-) create mode 100644 changelog.d/payroll-employer-deduction-share.added.md create mode 100644 policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/family_employee_share.yaml create mode 100644 policyengine_us/tests/core/test_state_payroll_premium_deduction_share_invariants.py create mode 100644 policyengine_us/tests/policy/baseline/gov/states/tax/payroll/state_payroll_premium_deduction_share.yaml create mode 100644 policyengine_us/variables/gov/states/tax/payroll/state_payroll_premium_deduction_share.py diff --git a/changelog.d/payroll-employer-deduction-share.added.md b/changelog.d/payroll-employer-deduction-share.added.md new file mode 100644 index 00000000000..a556609c27a --- /dev/null +++ b/changelog.d/payroll-employer-deduction-share.added.md @@ -0,0 +1 @@ +Add `employer_state_payroll_premium_deduction_share`, the share of the permitted employee premium an employer deducts for Colorado FAMLI, Delaware Paid Leave, Maine and Massachusetts PFML, Minnesota Paid Leave, New York PFL and DBL, the Vermont Child Care Contribution and Washington PFML (default 1, the current full-share assumption), with the employer paying any part it does not deduct; apply Massachusetts' 2027 swap of the family and medical deduction caps and rates (Acts 2026 c. 101); and cite Conn. Gen. Stat. 31-49g(b)(1) for Connecticut's paid leave rate. diff --git a/policyengine_us/parameters/gov/states/ct/tax/payroll/paid_leave/employee_rate.yaml b/policyengine_us/parameters/gov/states/ct/tax/payroll/paid_leave/employee_rate.yaml index 6685da4dc7b..c28f33f86ba 100644 --- a/policyengine_us/parameters/gov/states/ct/tax/payroll/paid_leave/employee_rate.yaml +++ b/policyengine_us/parameters/gov/states/ct/tax/payroll/paid_leave/employee_rate.yaml @@ -7,7 +7,7 @@ metadata: unit: /1 label: Connecticut employee paid leave rate reference: - - title: Connecticut General Statutes Section 31-49e - href: https://www.cga.ct.gov/current/pub/chap_557.htm + - title: Connecticut General Statutes Section 31-49g(b)(1) + href: https://www.cga.ct.gov/current/pub/chap_557.htm#sec_31-49g - title: Connecticut Paid Leave - Remit Contributions href: https://www.ctpaidleave.org/remit-contributions diff --git a/policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/family_employee_share.yaml b/policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/family_employee_share.yaml new file mode 100644 index 00000000000..8db687296dd --- /dev/null +++ b/policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/family_employee_share.yaml @@ -0,0 +1,22 @@ +description: Largest share of the Massachusetts PFML family leave contribution an employer may deduct from wages. +values: + 0000-01-01: 0 + 2024-01-01: 1 + # Acts 2026 c. 101 s. 26 strikes "100" in s. 6(c)(2), (d) and (e)(2) and inserts "40". + 2027-01-01: 0.4 + +metadata: + period: year + unit: /1 + label: Massachusetts PFML family employee share + reference: + - title: Massachusetts General Laws Chapter 175M Section 6 + href: https://malegislature.gov/Laws/GeneralLaws/PartI/TitleXXII/Chapter175M/Section6 + - title: Massachusetts Paid Family and Medical Leave employer contribution rates and calculator (2026 and 2027 sections, updated October 1, 2026) + href: https://www.mass.gov/info-details/paid-family-and-medical-leave-employer-contribution-rates-and-calculator + - title: Massachusetts Paid Family and Medical Leave employer contribution rates, 2024 section (archived May 26, 2024) + href: https://web.archive.org/web/20240526092717/https://www.mass.gov/info-details/paid-family-and-medical-leave-employer-contribution-rates-and-calculator + - title: Massachusetts Paid Family and Medical Leave employer contribution rates, 2025 & 2026 section (archived December 8, 2025) + href: https://web.archive.org/web/20251208080415/https://www.mass.gov/info-details/paid-family-and-medical-leave-employer-contribution-rates-and-calculator + - title: Acts of 2026, Chapter 101, Sections 25, 26, 43 and 45 + href: https://malegislature.gov/Laws/SessionLaws/Acts/2026/Chapter101 diff --git a/policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/family_rate.yaml b/policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/family_rate.yaml index 7c5733a58fb..be8f9a9dc3d 100644 --- a/policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/family_rate.yaml +++ b/policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/family_rate.yaml @@ -2,6 +2,8 @@ description: Massachusetts PFML family leave contribution rate. values: 0000-01-01: 0 2024-01-01: 0.0018 + # DFML's 2027 rates swap with the deduction caps (Acts 2026 c. 101 s. 43(a)), leaving the employee and employer totals unchanged. + 2027-01-01: 0.007 metadata: period: year @@ -10,9 +12,11 @@ metadata: reference: - title: Massachusetts General Laws Chapter 175M Section 6 href: https://malegislature.gov/Laws/GeneralLaws/PartI/TitleXXII/Chapter175M/Section6 - - title: Massachusetts Paid Family and Medical Leave employer contribution rates and calculator + - title: Massachusetts Paid Family and Medical Leave employer contribution rates and calculator (2026 and 2027 sections, updated October 1, 2026) href: https://www.mass.gov/info-details/paid-family-and-medical-leave-employer-contribution-rates-and-calculator - title: Massachusetts Paid Family and Medical Leave employer contribution rates, 2024 section (archived May 26, 2024) href: https://web.archive.org/web/20240526092717/https://www.mass.gov/info-details/paid-family-and-medical-leave-employer-contribution-rates-and-calculator - title: Massachusetts Paid Family and Medical Leave employer contribution rates, 2025 & 2026 section (archived December 8, 2025) href: https://web.archive.org/web/20251208080415/https://www.mass.gov/info-details/paid-family-and-medical-leave-employer-contribution-rates-and-calculator + - title: Acts of 2026, Chapter 101, Sections 25, 26, 43 and 45 + href: https://malegislature.gov/Laws/SessionLaws/Acts/2026/Chapter101 diff --git a/policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/medical_employee_share.yaml b/policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/medical_employee_share.yaml index 8025a24fd77..fed95485b78 100644 --- a/policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/medical_employee_share.yaml +++ b/policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/medical_employee_share.yaml @@ -1,7 +1,9 @@ -description: Employee share of the Massachusetts PFML medical leave contribution. +description: Largest share of the Massachusetts PFML medical leave contribution an employer may deduct from wages. values: 0000-01-01: 0 2024-01-01: 0.4 + # Acts 2026 c. 101 s. 25 strikes "40" in s. 6(c)(1), (d) and (e)(1) and inserts "100". + 2027-01-01: 1 metadata: period: year @@ -10,9 +12,11 @@ metadata: reference: - title: Massachusetts General Laws Chapter 175M Section 6 href: https://malegislature.gov/Laws/GeneralLaws/PartI/TitleXXII/Chapter175M/Section6 - - title: Massachusetts Paid Family and Medical Leave employer contribution rates and calculator + - title: Massachusetts Paid Family and Medical Leave employer contribution rates and calculator (2026 and 2027 sections, updated October 1, 2026) href: https://www.mass.gov/info-details/paid-family-and-medical-leave-employer-contribution-rates-and-calculator - title: Massachusetts Paid Family and Medical Leave employer contribution rates, 2024 section (archived May 26, 2024) href: https://web.archive.org/web/20240526092717/https://www.mass.gov/info-details/paid-family-and-medical-leave-employer-contribution-rates-and-calculator - title: Massachusetts Paid Family and Medical Leave employer contribution rates, 2025 & 2026 section (archived December 8, 2025) href: https://web.archive.org/web/20251208080415/https://www.mass.gov/info-details/paid-family-and-medical-leave-employer-contribution-rates-and-calculator + - title: Acts of 2026, Chapter 101, Sections 25, 26, 43 and 45 + href: https://malegislature.gov/Laws/SessionLaws/Acts/2026/Chapter101 diff --git a/policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/medical_rate.yaml b/policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/medical_rate.yaml index 9d8fef45424..daf955cbd03 100644 --- a/policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/medical_rate.yaml +++ b/policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/medical_rate.yaml @@ -2,6 +2,8 @@ description: Massachusetts PFML medical leave contribution rate. values: 0000-01-01: 0 2024-01-01: 0.007 + # DFML's 2027 rates swap with the deduction caps (Acts 2026 c. 101 s. 43(a)), leaving the employee and employer totals unchanged. + 2027-01-01: 0.0018 metadata: period: year @@ -10,9 +12,11 @@ metadata: reference: - title: Massachusetts General Laws Chapter 175M Section 6 href: https://malegislature.gov/Laws/GeneralLaws/PartI/TitleXXII/Chapter175M/Section6 - - title: Massachusetts Paid Family and Medical Leave employer contribution rates and calculator + - title: Massachusetts Paid Family and Medical Leave employer contribution rates and calculator (2026 and 2027 sections, updated October 1, 2026) href: https://www.mass.gov/info-details/paid-family-and-medical-leave-employer-contribution-rates-and-calculator - title: Massachusetts Paid Family and Medical Leave employer contribution rates, 2024 section (archived May 26, 2024) href: https://web.archive.org/web/20240526092717/https://www.mass.gov/info-details/paid-family-and-medical-leave-employer-contribution-rates-and-calculator - title: Massachusetts Paid Family and Medical Leave employer contribution rates, 2025 & 2026 section (archived December 8, 2025) href: https://web.archive.org/web/20251208080415/https://www.mass.gov/info-details/paid-family-and-medical-leave-employer-contribution-rates-and-calculator + - title: Acts of 2026, Chapter 101, Sections 25, 26, 43 and 45 + href: https://malegislature.gov/Laws/SessionLaws/Acts/2026/Chapter101 diff --git a/policyengine_us/tests/core/test_state_payroll_premium_deduction_share_invariants.py b/policyengine_us/tests/core/test_state_payroll_premium_deduction_share_invariants.py new file mode 100644 index 00000000000..156c530ac80 --- /dev/null +++ b/policyengine_us/tests/core/test_state_payroll_premium_deduction_share_invariants.py @@ -0,0 +1,193 @@ +"""Invariants for the employer's deduction of state payroll premiums. + +Some state programs put the premium on the employer and let it deduct up to a +share from wages without requiring it: Colorado FAMLI, Delaware Paid Leave, +Maine and Massachusetts PFML, Minnesota Paid Leave, New York PFL and DBL, the +Vermont Child Care Contribution and Washington PFML. +`employer_state_payroll_premium_deduction_share` says how much of the +permitted employee share the employer deducts (default 1); the employer pays +the rest. Hypothesis draws workers in those states, in states whose +contributions are mandatory withholding, and in a state with neither, with any +wages, employer size and share, and runs each worker three times in one +simulation: with two drawn shares and with the input left at its default. For +every worker, in 2026 and 2027: + +1. The employee amount of the optional programs is the clipped share times the + amount at the default, so the default is the full permitted share and a + share outside 0 to 1 acts as the nearer bound. +2. The mandatory components of `employee_state_payroll_tax` do not depend on + the share. +3. Where the employer side is modeled (CO, DE, MA, ME, VT, WA), employee plus + employer premium does not depend on the share: the employer pays exactly + what it does not deduct. Minnesota and New York employer costs are not + modeled, so their employer amount is zero at any share. +4. A larger share never lowers the employee amount or raises the employer + amount. +5. With employer-level wage totals equal to the worker's own wages (a + one-worker employer), `employer_total_additional_state_payroll_tax` equals + `employer_additional_state_payroll_tax`: the employer-level path and the + per-worker path agree at any share. +6. Massachusetts' 2027 swap of the family and medical deduction caps, paired + with DFML's swap of the two rates (Acts 2026 c. 101 ss. 25, 26, 43(a)), + leaves each worker's employee and employer amounts where they were in + 2026, for wages under both years' wage bases. + +Amounts are compared to float32 precision, within a cent. + +Why Python: the YAML cases pin one share and employer size each; this checks +every program at once against drawn shares, sizes and wages, including +boundary employer sizes and shares outside 0 to 1, in one vectorized +simulation per example. +""" + +import numpy as np +from hypothesis import HealthCheck, given, settings +from hypothesis import strategies as st + +from policyengine_us import Simulation + +YEARS = (2026, 2027) +OPTIONAL_STATES = ("CO", "DE", "MA", "ME", "MN", "NY", "VT", "WA") +MANDATORY_STATES = ("CA", "CT", "NJ", "OR", "PA", "RI") +EMPLOYER_MODELED_STATES = ("CO", "DE", "MA", "ME", "VT", "WA") +OPTIONAL_EMPLOYEE_VARIABLES = ( + "co_employee_famli_contribution", + "de_employee_paid_leave_contribution", + "ma_employee_paid_leave_contribution", + "me_employee_paid_leave_contribution", + "mn_employee_paid_leave_contribution", + "ny_employee_paid_family_leave_contribution", + "ny_employee_disability_benefits_contribution", + "vt_employee_child_care_contribution", + "wa_employee_paid_leave_contribution", +) +# Below the 2026 Social Security wage base, so every program's wage base is +# the worker's wages in both years. +UNCAPPED_WAGES = 184_500 +COPIES = 3 # drawn share a, drawn share b, input left at its default +# The model computes in float32: compare to that precision, never past a cent. +CENT = 0.01 +TOLERANCE = dict(rtol=1e-6, atol=CENT) + +share = st.one_of( + st.sampled_from([0.0, 0.25, 0.5, 1.0, -0.5, 1.5]), + st.floats(-0.5, 1.5, allow_nan=False), +) +workers = st.tuples( + st.sampled_from(OPTIONAL_STATES + MANDATORY_STATES + ("TX",)), + st.integers(0, 300_000), # employment_income + st.sampled_from([1, 9, 10, 14, 15, 20, 24, 25, 49, 50, 100]), + share, + share, +) + + +def simulate(rows): + people, households = {}, {} + groups = {"tax_units": {}, "spm_units": {}, "families": {}, "marital_units": {}} + index = 0 + for state, wages, headcount, share_a, share_b in rows: + for share_value in (share_a, share_b, None): + person = f"person_{index}" + people[person] = { + "age": {year: 30 for year in YEARS}, + "employment_income": {year: wages for year in YEARS}, + "employer_headcount": {year: headcount for year in YEARS}, + "employer_total_taxable_earnings_for_social_security": { + year: wages for year in YEARS + }, + "employer_total_payroll_tax_gross_wages": { + year: wages for year in YEARS + }, + } + if share_value is not None: + people[person]["employer_state_payroll_premium_deduction_share"] = { + year: share_value for year in YEARS + } + households[f"household_{index}"] = { + "members": [person], + "state_code": {year: state for year in YEARS}, + } + for name in groups: + groups[name][f"{name}_{index}"] = {"members": [person]} + index += 1 + return Simulation(situation={"people": people, "households": households, **groups}) + + +def by_copy(simulation, variable, year): + return np.asarray(simulation.calculate(variable, year)).reshape(-1, COPIES) + + +@settings( + max_examples=8, + deadline=None, + derandomize=True, + suppress_health_check=[HealthCheck.too_slow, HealthCheck.data_too_large], +) +@given( + st.lists(workers, min_size=4, max_size=30).map( + # One worker in each optional state at a share strictly between 0 and + # 1, so every program's properties compare positive amounts. + lambda rows: ( + [(state, 60_000, 100, 0.5, 0.0) for state in OPTIONAL_STATES] + rows + ) + ) +) +def test_state_payroll_premium_deduction_share_invariants(rows): + simulation = simulate(rows) + states = np.array([row[0] for row in rows]) + wages = np.array([row[1] for row in rows]) + shares = np.clip(np.array([[row[3], row[4], 1.0] for row in rows]), 0, 1) + modeled = np.isin(states, EMPLOYER_MODELED_STATES) + unmodeled = np.isin(states, ("MN", "NY")) + uncapped = wages <= UNCAPPED_WAGES + optional_by_year = {} + employer_by_year = {} + for year in YEARS: + optional = sum( + by_copy(simulation, variable, year) + for variable in OPTIONAL_EMPLOYEE_VARIABLES + ) + total = by_copy(simulation, "employee_state_payroll_tax", year) + employer = by_copy(simulation, "employer_additional_state_payroll_tax", year) + employer_total = by_copy( + simulation, "employer_total_additional_state_payroll_tax", year + ) + default = optional[:, [2]] + assert (default > 0).any(), "no worker with a positive optional premium" + # Property 1. + np.testing.assert_allclose(optional, shares * default, **TOLERANCE) + # Property 2. + mandatory = total - optional + np.testing.assert_allclose( + mandatory, mandatory[:, [2]] * np.ones((1, COPIES)), **TOLERANCE + ) + # Property 3. + remitted = optional + employer + np.testing.assert_allclose( + remitted[modeled], + remitted[modeled][:, [2]] * np.ones((1, COPIES)), + **TOLERANCE, + ) + assert (employer[unmodeled] == 0).all() + # Property 4. + for low, high in ((0, 1), (1, 0)): + lower = shares[:, low] <= shares[:, high] + assert (optional[lower, low] <= optional[lower, high] + CENT).all() + assert (employer[lower, low] >= employer[lower, high] - CENT).all() + # Property 5. + same_path = modeled & uncapped + np.testing.assert_allclose( + employer_total[same_path], employer[same_path], **TOLERANCE + ) + optional_by_year[year] = optional + employer_by_year[year] = employer + # Property 6. + ma = (states == "MA") & uncapped + assert ma.any() + np.testing.assert_allclose( + optional_by_year[2027][ma], optional_by_year[2026][ma], **TOLERANCE + ) + np.testing.assert_allclose( + employer_by_year[2027][ma], employer_by_year[2026][ma], **TOLERANCE + ) diff --git a/policyengine_us/tests/policy/baseline/gov/states/ma/tax/payroll/paid_leave/ma_employee_paid_leave_contribution.yaml b/policyengine_us/tests/policy/baseline/gov/states/ma/tax/payroll/paid_leave/ma_employee_paid_leave_contribution.yaml index 87456ff12a8..2580f52d02d 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ma/tax/payroll/paid_leave/ma_employee_paid_leave_contribution.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ma/tax/payroll/paid_leave/ma_employee_paid_leave_contribution.yaml @@ -61,3 +61,48 @@ ma_employer_paid_leave_contribution: 0 # The employee share does not depend on employer size. ma_employee_paid_leave_contribution: 276.00 + +- name: Massachusetts PFML 2026 keeps the 100% family and 40% medical deduction caps. + period: 2026 + input: + employment_income: 100_000 + state_code: MA + output: + # Acts 2026 c. 101 swaps the caps from 2027 (s. 43(a); DFML). Applying the + # swap to 2026 rates would give 40% * 0.18% + 0.70% = 0.772%, or 772. + # 0.18% + 40% * 0.70% = 0.46%; 0.46% * 100,000 = 460. + ma_employee_paid_leave_contribution: 460 + # 60% * 0.70% * 100,000 = 420. + ma_employer_paid_leave_contribution: 420 + +- name: Massachusetts PFML 2027 swaps the caps and the rates, leaving the employee share at 0.46%. + period: 2027 + input: + employment_income: 100_000 + state_code: MA + output: + # 40% * 0.70% family + 100% * 0.18% medical = 0.28% + 0.18% = 0.46%. + ma_employee_paid_leave_contribution: 460 + # 60% * 0.70% family = 0.42%; nothing of medical. + ma_employer_paid_leave_contribution: 420 + +- name: Massachusetts PFML 2027 small employer remits only the 0.46% it may deduct. + period: 2027 + input: + employment_income: 100_000 + employer_headcount: 24 + state_code: MA + output: + ma_employee_paid_leave_contribution: 460 + ma_employer_paid_leave_contribution: 0 + +- name: Massachusetts PFML 2027 employer pays the part of the employee share it does not deduct. + period: 2027 + input: + employment_income: 100_000 + employer_state_payroll_premium_deduction_share: 0.5 + state_code: MA + output: + ma_employee_paid_leave_contribution: 230 + # 420 + 230 = 650. + ma_employer_paid_leave_contribution: 650 diff --git a/policyengine_us/tests/policy/baseline/gov/states/tax/payroll/state_payroll_premium_deduction_share.yaml b/policyengine_us/tests/policy/baseline/gov/states/tax/payroll/state_payroll_premium_deduction_share.yaml new file mode 100644 index 00000000000..9bebda21773 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/tax/payroll/state_payroll_premium_deduction_share.yaml @@ -0,0 +1,239 @@ +# The employer deducts a share of the largest employee premium the law lets it +# deduct; it pays the rest. Wages are 100,000, below every 2026 wage base. + +- name: The deduction share defaults to the full permitted share. + period: 2026 + input: + employment_income: 100_000 + state_code: CO + output: + employer_state_payroll_premium_deduction_share: 1 + state_payroll_premium_deduction_share: 1 + # 0.44% * 100,000 = 440. + co_employee_famli_contribution: 440 + co_employer_famli_contribution: 440 + +- name: The deduction share is held between 0 and 1. + period: 2026 + input: + people: + over: + employment_income: 100_000 + employer_state_payroll_premium_deduction_share: 1.5 + under: + employment_income: 100_000 + employer_state_payroll_premium_deduction_share: -0.5 + tax_units: + over_unit: + members: [over] + under_unit: + members: [under] + households: + over_household: + members: [over] + state_code: CO + under_household: + members: [under] + state_code: CO + output: + state_payroll_premium_deduction_share: [1, 0] + co_employee_famli_contribution: [440, 0] + # 0.44% + 0.44% = 0.88% when the employer deducts nothing. + co_employer_famli_contribution: [440, 880] + +- name: Colorado FAMLI employer pays the half of the employee share it does not deduct. + period: 2026 + input: + employment_income: 100_000 + employer_state_payroll_premium_deduction_share: 0.5 + state_code: CO + output: + # 0.5 * 0.44% * 100,000 = 220. + co_employee_famli_contribution: 220 + co_employee_state_payroll_tax: 220 + employee_state_payroll_tax: 220 + # 0.44% * 100,000 + 220 = 660. + co_employer_famli_contribution: 660 + co_employer_additional_state_payroll_tax: 660 + +- name: Colorado FAMLI employer with fewer than 10 employees still pays the employee share it does not deduct. + period: 2026 + input: + employment_income: 100_000 + employer_headcount: 9 + employer_state_payroll_premium_deduction_share: 0.25 + state_code: CO + output: + # 0.25 * 0.44% * 100,000 = 110. + co_employee_famli_contribution: 110 + # No employer half; 0.75 * 440 = 330 of the 0.44% it must remit. + co_employer_famli_contribution: 330 + +- name: Massachusetts PFML employer pays the part of the 0.46% employee share it does not deduct. + period: 2026 + input: + employment_income: 100_000 + employer_state_payroll_premium_deduction_share: 0.5 + state_code: MA + output: + # 0.5 * (0.18% family + 40% * 0.70% medical) * 100,000 = 0.5 * 460 = 230. + ma_employee_paid_leave_contribution: 230 + employee_state_payroll_tax: 230 + # 60% * 0.70% * 100,000 = 420, plus the 230 not deducted. + ma_employer_paid_leave_contribution: 650 + +- name: Massachusetts PFML small employer that deducts nothing remits the 0.46% itself. + period: 2026 + input: + employment_income: 100_000 + employer_headcount: 24 + employer_state_payroll_premium_deduction_share: 0 + state_code: MA + output: + ma_employee_paid_leave_contribution: 0 + ma_employer_paid_leave_contribution: 460 + +- name: Maine PFML employer pays the part of the employee half it does not deduct. + period: 2026 + input: + employment_income: 100_000 + employer_state_payroll_premium_deduction_share: 0.5 + state_code: ME + output: + # 0.5 * 0.5% * 100,000 = 250. + me_employee_paid_leave_contribution: 250 + # 0.5% * 100,000 + 250 = 750. + me_employer_paid_leave_contribution: 750 + +- name: Maine PFML employer with fewer than 15 employees remits the half it does not deduct. + period: 2026 + input: + employment_income: 100_000 + employer_headcount: 14 + employer_state_payroll_premium_deduction_share: 0.5 + state_code: ME + output: + me_employee_paid_leave_contribution: 250 + # No employer half; it must still remit 0.5%, of which it deducted 250. + me_employer_paid_leave_contribution: 250 + +- name: Delaware Paid Leave employer pays the part of the employee half it does not deduct. + period: 2026 + input: + employment_income: 100_000 + employer_state_payroll_premium_deduction_share: 0.5 + state_code: DE + output: + # 0.5 * 50% * (0.40% + 0.08% + 0.32%) * 100,000 = 0.25 * 800 = 200. + de_employee_paid_leave_contribution: 200 + # 800 - 200 = 600. + de_employer_paid_leave_contribution: 600 + +- name: Delaware Paid Leave employer with 10 to 24 employees that deducts nothing pays the parental rate itself. + period: 2026 + input: + employment_income: 100_000 + employer_headcount: 20 + employer_state_payroll_premium_deduction_share: 0 + state_code: DE + output: + de_employee_paid_leave_contribution: 0 + # 0.32% * 100,000 = 320. + de_employer_paid_leave_contribution: 320 + +- name: Vermont employer pays the part of the permitted quarter it does not withhold. + period: 2026 + input: + employment_income: 100_000 + employer_state_payroll_premium_deduction_share: 0.5 + state_code: VT + output: + # 0.5 * 0.11% * 100,000 = 55. + vt_employee_child_care_contribution: 55 + # 0.33% * 100,000 + 55 = 385. + vt_employer_child_care_contribution: 385 + +- name: Washington PFML employer pays the part of the employee share it does not deduct; WA Cares does not change. + period: 2026 + input: + employment_income: 100_000 + employer_state_payroll_premium_deduction_share: 0.5 + state_code: WA + output: + # 0.5 * 1.13% * (1 - 0.2857) * 100,000 = 0.5 * 807.159 = 403.5795. + wa_employee_paid_leave_contribution: 403.5795 + # WA Cares is mandatory withholding: 0.58% * 100,000 = 580. + wa_employee_long_term_care_contribution: 580 + wa_employee_state_payroll_tax: 983.5795 + # 1.13% * 0.2857 * 100,000 = 322.841, plus 403.5795 not deducted. + wa_employer_paid_leave_contribution: 726.4205 + +- name: Washington PFML employer with fewer than 50 employees that deducts nothing pays the employee share. + period: 2026 + input: + employment_income: 100_000 + employer_headcount: 49 + employer_state_payroll_premium_deduction_share: 0 + state_code: WA + output: + wa_employee_paid_leave_contribution: 0 + # 1.13% * (1 - 0.2857) * 100,000 = 807.159. + wa_employer_paid_leave_contribution: 807.159 + +- name: Minnesota Paid Leave employee share scales with the deduction share. + period: 2026 + input: + employment_income: 100_000 + employer_state_payroll_premium_deduction_share: 0.5 + state_code: MN + output: + # 0.5 * 0.44% * 100,000 = 220. + mn_employee_paid_leave_contribution: 220 + employee_state_payroll_tax: 220 + +- name: New York PFL and DBL scale the capped permitted contribution. + period: 2026 + input: + employment_income: 100_000 + employer_state_payroll_premium_deduction_share: 0.5 + state_code: NY + output: + # 0.432% * 100,000 = 432 exceeds the 411.91 maximum; 0.5 * 411.91 = 205.955. + ny_employee_paid_family_leave_contribution: 205.955 + # 0.5% * 100,000 = 500 exceeds 52 weeks * 0.60 = 31.20; 0.5 * 31.20 = 15.60. + ny_employee_disability_benefits_contribution: 15.6 + ny_employee_state_payroll_tax: 221.555 + +- name: Mandatory employee withholding does not depend on the deduction share. + period: 2026 + input: + people: + ca_worker: + employment_income: 100_000 + employer_state_payroll_premium_deduction_share: 0 + ct_worker: + employment_income: 100_000 + employer_state_payroll_premium_deduction_share: 0 + pa_worker: + employment_income: 100_000 + employer_state_payroll_premium_deduction_share: 0 + tax_units: + ca_unit: + members: [ca_worker] + ct_unit: + members: [ct_worker] + pa_unit: + members: [pa_worker] + households: + ca_household: + members: [ca_worker] + state_code: CA + ct_household: + members: [ct_worker] + state_code: CT + pa_household: + members: [pa_worker] + state_code: PA + output: + # CA SDI 1.3%, CT Paid Leave 0.5%, PA UC 0.07%, each of 100,000. + employee_state_payroll_tax: [1_300, 500, 70] diff --git a/policyengine_us/variables/gov/states/co/tax/payroll/famli/co_employee_famli_contribution.py b/policyengine_us/variables/gov/states/co/tax/payroll/famli/co_employee_famli_contribution.py index c29f79b3e52..768f238266e 100644 --- a/policyengine_us/variables/gov/states/co/tax/payroll/famli/co_employee_famli_contribution.py +++ b/policyengine_us/variables/gov/states/co/tax/payroll/famli/co_employee_famli_contribution.py @@ -5,11 +5,20 @@ class co_employee_famli_contribution(Variable): value_type = float entity = Person label = "Colorado employee FAMLI contribution" - documentation = "Employee-side Colorado FAMLI payroll contribution." + documentation = ( + "Employee-side Colorado FAMLI premium. The employer remits the premium " + "and may deduct up to half of it from wages (C.R.S. 8-13.3-507(5)); " + "this is that permitted share times state_payroll_premium_deduction_share." + ) definition_period = YEAR unit = USD defined_for = StateCode.CO + reference = ( + "https://olls.info/crs/crs2025-title-08.pdf", + "https://www.sos.state.co.us/CCR/GenerateRulePdf.do?ruleVersionId=12341&fileName=7%20CCR%201107-1", + ) def formula(person, period, parameters): rate = parameters(period).gov.states.co.tax.payroll.famli.employee_rate - return rate * person("co_famli_taxable_wages", period) + permitted = rate * person("co_famli_taxable_wages", period) + return permitted * person("state_payroll_premium_deduction_share", period) diff --git a/policyengine_us/variables/gov/states/co/tax/payroll/famli/co_employer_famli_contribution.py b/policyengine_us/variables/gov/states/co/tax/payroll/famli/co_employer_famli_contribution.py index c29f2f349a5..09d2cee4b0c 100644 --- a/policyengine_us/variables/gov/states/co/tax/payroll/famli/co_employer_famli_contribution.py +++ b/policyengine_us/variables/gov/states/co/tax/payroll/famli/co_employer_famli_contribution.py @@ -5,13 +5,24 @@ class co_employer_famli_contribution(Variable): value_type = float entity = Person label = "Colorado employer FAMLI contribution" - documentation = "Employer-side Colorado FAMLI payroll contribution." + documentation = ( + "Employer-side Colorado FAMLI premium: the employer half for employers " + "with 10 or more employees, plus the part of the permitted employee " + "half the employer does not deduct, which it is treated as electing " + "to pay (7 CCR 1107-1 s. 1.4(6)(A))." + ) definition_period = YEAR unit = USD defined_for = StateCode.CO + reference = ( + "https://olls.info/crs/crs2025-title-08.pdf", + "https://www.sos.state.co.us/CCR/GenerateRulePdf.do?ruleVersionId=12341&fileName=7%20CCR%201107-1", + ) def formula(person, period, parameters): p = parameters(period).gov.states.co.tax.payroll.famli liable = person("employer_headcount", period) >= p.employer_headcount_threshold taxable_wages = person("co_famli_taxable_wages", period) - return where(liable, p.employer_rate * taxable_wages, 0) + employer_share = where(liable, p.employer_rate * taxable_wages, 0) + undeducted = 1 - person("state_payroll_premium_deduction_share", period) + return employer_share + undeducted * p.employee_rate * taxable_wages diff --git a/policyengine_us/variables/gov/states/de/tax/payroll/paid_leave/de_employee_paid_leave_contribution.py b/policyengine_us/variables/gov/states/de/tax/payroll/paid_leave/de_employee_paid_leave_contribution.py index aec23942ac6..e567136436e 100644 --- a/policyengine_us/variables/gov/states/de/tax/payroll/paid_leave/de_employee_paid_leave_contribution.py +++ b/policyengine_us/variables/gov/states/de/tax/payroll/paid_leave/de_employee_paid_leave_contribution.py @@ -6,18 +6,22 @@ class de_employee_paid_leave_contribution(Variable): entity = Person label = "Delaware employee paid leave contribution" documentation = ( - "Employee-side Delaware paid leave contribution, assuming the employer " - "withholds the maximum permitted employee share." + "Employee-side Delaware Paid Leave contribution. The employer remits " + "the contribution and may deduct up to half of it from wages " + "(19 Del. C. s. 3705(d)-(g)); this is that permitted share times " + "state_payroll_premium_deduction_share." ) definition_period = YEAR unit = USD defined_for = StateCode.DE + reference = "https://delcode.delaware.gov/title19/c037/index.html" def formula(person, period, parameters): p = parameters(period).gov.states.de.tax.payroll.paid_leave taxable_wages = person("taxable_earnings_for_social_security", period) - return ( + permitted = ( person("de_paid_leave_contribution_rate", period) * p.employee_share * taxable_wages ) + return permitted * person("state_payroll_premium_deduction_share", period) diff --git a/policyengine_us/variables/gov/states/de/tax/payroll/paid_leave/de_employer_paid_leave_contribution.py b/policyengine_us/variables/gov/states/de/tax/payroll/paid_leave/de_employer_paid_leave_contribution.py index 5ac4a6fce66..7036b6741d0 100644 --- a/policyengine_us/variables/gov/states/de/tax/payroll/paid_leave/de_employer_paid_leave_contribution.py +++ b/policyengine_us/variables/gov/states/de/tax/payroll/paid_leave/de_employer_paid_leave_contribution.py @@ -6,18 +6,24 @@ class de_employer_paid_leave_contribution(Variable): entity = Person label = "Delaware employer paid leave contribution" documentation = ( - "Employer-side Delaware paid leave contribution, assuming the employer " - "contributes only the minimum required share." + "Employer-side Delaware Paid Leave contribution: the half the " + "employer may not deduct, plus the part of the permitted employee " + "half it does not deduct, for which it remains liable " + "(19 Del. C. s. 3705(g))." ) definition_period = YEAR unit = USD defined_for = StateCode.DE + reference = "https://delcode.delaware.gov/title19/c037/index.html" def formula(person, period, parameters): p = parameters(period).gov.states.de.tax.payroll.paid_leave taxable_wages = person("taxable_earnings_for_social_security", period) + deducted = p.employee_share * person( + "state_payroll_premium_deduction_share", period + ) return ( person("de_paid_leave_contribution_rate", period) - * (1 - p.employee_share) + * (1 - deducted) * taxable_wages ) diff --git a/policyengine_us/variables/gov/states/ma/tax/payroll/paid_leave/ma_employee_paid_leave_contribution.py b/policyengine_us/variables/gov/states/ma/tax/payroll/paid_leave/ma_employee_paid_leave_contribution.py index 4b8a8f0fa76..d1d5c2f78ec 100644 --- a/policyengine_us/variables/gov/states/ma/tax/payroll/paid_leave/ma_employee_paid_leave_contribution.py +++ b/policyengine_us/variables/gov/states/ma/tax/payroll/paid_leave/ma_employee_paid_leave_contribution.py @@ -6,14 +6,25 @@ class ma_employee_paid_leave_contribution(Variable): entity = Person label = "Massachusetts employee paid leave contribution" documentation = ( - "Employee-side Massachusetts Paid Family and Medical Leave contribution, " - "assuming the employer withholds the maximum permitted employee share." + "Employee-side Massachusetts Paid Family and Medical Leave " + "contribution. The employer remits the contribution and may deduct up " + "to a capped share of the family and the medical contribution from " + "wages (M.G.L. c. 175M s. 6(c)-(d)); this is that permitted share " + "times state_payroll_premium_deduction_share." ) definition_period = YEAR unit = USD defined_for = StateCode.MA + reference = ( + "https://malegislature.gov/Laws/GeneralLaws/PartI/TitleXXII/Chapter175M/Section6", + "https://malegislature.gov/Laws/SessionLaws/Acts/2026/Chapter101", + ) def formula(person, period, parameters): p = parameters(period).gov.states.ma.tax.payroll.paid_leave - rate = p.family_rate + p.medical_rate * p.medical_employee_share - return rate * person("ma_paid_leave_taxable_wages", period) + rate = ( + p.family_rate * p.family_employee_share + + p.medical_rate * p.medical_employee_share + ) + permitted = rate * person("ma_paid_leave_taxable_wages", period) + return permitted * person("state_payroll_premium_deduction_share", period) diff --git a/policyengine_us/variables/gov/states/ma/tax/payroll/paid_leave/ma_employer_paid_leave_contribution.py b/policyengine_us/variables/gov/states/ma/tax/payroll/paid_leave/ma_employer_paid_leave_contribution.py index e2cc2236580..140cd0567e1 100644 --- a/policyengine_us/variables/gov/states/ma/tax/payroll/paid_leave/ma_employer_paid_leave_contribution.py +++ b/policyengine_us/variables/gov/states/ma/tax/payroll/paid_leave/ma_employer_paid_leave_contribution.py @@ -6,16 +6,33 @@ class ma_employer_paid_leave_contribution(Variable): entity = Person label = "Massachusetts employer paid leave contribution" documentation = ( - "Employer-side Massachusetts Paid Family and Medical Leave contribution, " - "using employer headcount as a proxy for covered individuals." + "Employer-side Massachusetts Paid Family and Medical Leave " + "contribution: the part of each contribution the employer may not " + "deduct, for employers with 25 or more covered individuals (employer " + "headcount is the proxy), plus the part of the permitted employee " + "share the employer does not deduct, which it must still remit " + "(458 CMR 2.05(5))." ) definition_period = YEAR unit = USD defined_for = StateCode.MA + reference = ( + "https://malegislature.gov/Laws/GeneralLaws/PartI/TitleXXII/Chapter175M/Section6", + "https://malegislature.gov/Laws/SessionLaws/Acts/2026/Chapter101", + "https://www.mass.gov/doc/458-cmr-2-family-and-medical-leave/download", + ) def formula(person, period, parameters): p = parameters(period).gov.states.ma.tax.payroll.paid_leave liable = person("employer_headcount", period) >= p.employer_headcount_threshold - rate = p.medical_rate * (1 - p.medical_employee_share) + employer_rate = p.family_rate * ( + 1 - p.family_employee_share + ) + p.medical_rate * (1 - p.medical_employee_share) + employee_rate = ( + p.family_rate * p.family_employee_share + + p.medical_rate * p.medical_employee_share + ) taxable_wages = person("ma_paid_leave_taxable_wages", period) - return where(liable, rate * taxable_wages, 0) + employer_share = where(liable, employer_rate * taxable_wages, 0) + undeducted = 1 - person("state_payroll_premium_deduction_share", period) + return employer_share + undeducted * employee_rate * taxable_wages diff --git a/policyengine_us/variables/gov/states/me/tax/payroll/paid_leave/me_employee_paid_leave_contribution.py b/policyengine_us/variables/gov/states/me/tax/payroll/paid_leave/me_employee_paid_leave_contribution.py index 874ba8d8f9c..736206e9457 100644 --- a/policyengine_us/variables/gov/states/me/tax/payroll/paid_leave/me_employee_paid_leave_contribution.py +++ b/policyengine_us/variables/gov/states/me/tax/payroll/paid_leave/me_employee_paid_leave_contribution.py @@ -6,13 +6,17 @@ class me_employee_paid_leave_contribution(Variable): entity = Person label = "Maine employee paid leave contribution" documentation = ( - "Employee-side Maine paid leave contribution, assuming the employer " - "withholds the maximum permitted employee share." + "Employee-side Maine Paid Family and Medical Leave premium. The " + "employer remits the premium and may deduct up to half of it from " + "wages (26 M.R.S. s. 850-F(5)); this is that permitted share times " + "state_payroll_premium_deduction_share." ) definition_period = YEAR unit = USD defined_for = StateCode.ME + reference = "https://legislature.maine.gov/legis/statutes/26/title26sec850-F.html" def formula(person, period, parameters): rate = parameters(period).gov.states.me.tax.payroll.paid_leave.employee_rate - return rate * person("me_paid_leave_taxable_wages", period) + permitted = rate * person("me_paid_leave_taxable_wages", period) + return permitted * person("state_payroll_premium_deduction_share", period) diff --git a/policyengine_us/variables/gov/states/me/tax/payroll/paid_leave/me_employer_paid_leave_contribution.py b/policyengine_us/variables/gov/states/me/tax/payroll/paid_leave/me_employer_paid_leave_contribution.py index 98e57db2fd2..c1ac657a992 100644 --- a/policyengine_us/variables/gov/states/me/tax/payroll/paid_leave/me_employer_paid_leave_contribution.py +++ b/policyengine_us/variables/gov/states/me/tax/payroll/paid_leave/me_employer_paid_leave_contribution.py @@ -6,15 +6,21 @@ class me_employer_paid_leave_contribution(Variable): entity = Person label = "Maine employer paid leave contribution" documentation = ( - "Employer-side Maine paid leave contribution, using employer headcount " - "as a proxy for covered employee count." + "Employer-side Maine Paid Family and Medical Leave premium: the " + "employer half for employers with 15 or more employees (employer " + "headcount is the proxy), plus the part of the permitted employee " + "half the employer does not deduct, which every employer must still " + "remit (26 M.R.S. s. 850-F(5))." ) definition_period = YEAR unit = USD defined_for = StateCode.ME + reference = "https://legislature.maine.gov/legis/statutes/26/title26sec850-F.html" def formula(person, period, parameters): p = parameters(period).gov.states.me.tax.payroll.paid_leave liable = person("employer_headcount", period) >= p.employer_headcount_threshold taxable_wages = person("me_paid_leave_taxable_wages", period) - return where(liable, p.employer_rate * taxable_wages, 0) + employer_share = where(liable, p.employer_rate * taxable_wages, 0) + undeducted = 1 - person("state_payroll_premium_deduction_share", period) + return employer_share + undeducted * p.employee_rate * taxable_wages diff --git a/policyengine_us/variables/gov/states/mn/tax/payroll/paid_leave/mn_employee_paid_leave_contribution.py b/policyengine_us/variables/gov/states/mn/tax/payroll/paid_leave/mn_employee_paid_leave_contribution.py index 74f346285ee..c2b427153e2 100644 --- a/policyengine_us/variables/gov/states/mn/tax/payroll/paid_leave/mn_employee_paid_leave_contribution.py +++ b/policyengine_us/variables/gov/states/mn/tax/payroll/paid_leave/mn_employee_paid_leave_contribution.py @@ -6,13 +6,20 @@ class mn_employee_paid_leave_contribution(Variable): entity = Person label = "Minnesota employee paid leave contribution" documentation = ( - "Employee-side Minnesota Paid Leave contribution, assuming the employer " - "withholds the maximum permitted employee share." + "Employee-side Minnesota Paid Leave premium. The premium is payable " + "by the employer, which must pay at least half; employees pay by wage " + "deduction only the part the employer does not pay (Minn. Stat. " + "268B.14, subds. 1, 3 and 5a). This is the largest such part, half " + "the premium at the full rate, times " + "state_payroll_premium_deduction_share. The employer premium is not " + "modeled." ) definition_period = YEAR unit = USD defined_for = StateCode.MN + reference = "https://www.revisor.mn.gov/statutes/cite/268B.14" def formula(person, period, parameters): rate = parameters(period).gov.states.mn.tax.payroll.paid_leave.employee_rate - return rate * person("mn_paid_leave_taxable_wages", period) + permitted = rate * person("mn_paid_leave_taxable_wages", period) + return permitted * person("state_payroll_premium_deduction_share", period) diff --git a/policyengine_us/variables/gov/states/ny/tax/payroll/disability_benefits/ny_employee_disability_benefits_contribution.py b/policyengine_us/variables/gov/states/ny/tax/payroll/disability_benefits/ny_employee_disability_benefits_contribution.py index c4154ab4e3c..608d52a4e74 100644 --- a/policyengine_us/variables/gov/states/ny/tax/payroll/disability_benefits/ny_employee_disability_benefits_contribution.py +++ b/policyengine_us/variables/gov/states/ny/tax/payroll/disability_benefits/ny_employee_disability_benefits_contribution.py @@ -6,16 +6,27 @@ class ny_employee_disability_benefits_contribution(Variable): entity = Person label = "New York employee disability benefits contribution" documentation = ( - "Employee-side New York Disability Benefits withholding, annualized " - "from the statutory weekly cap." + "Employee-side New York Disability Benefits contribution. The " + "employer is authorized, not required, to collect it by payroll " + "deduction, up to 0.5 percent of wages and 60 cents a week, and pays " + "the cost beyond what it collects (Workers' Compensation Law " + "ss. 209(3)(a), (4) and 210(1)); this is that permitted amount, " + "annualized from the weekly cap, times " + "state_payroll_premium_deduction_share. The employer's cost of " + "coverage is not modeled." ) definition_period = YEAR unit = USD defined_for = StateCode.NY + reference = ( + "https://www.nysenate.gov/legislation/laws/WKC/209", + "https://www.nysenate.gov/legislation/laws/WKC/210", + ) def formula(person, period, parameters): p = parameters(period).gov.states.ny.tax.payroll.disability_benefits uncapped = p.employee_rate * person( "ny_disability_benefits_taxable_wages", period ) - return min_(uncapped, p.annual_max_contribution) + permitted = min_(uncapped, p.annual_max_contribution) + return permitted * person("state_payroll_premium_deduction_share", period) diff --git a/policyengine_us/variables/gov/states/ny/tax/payroll/paid_family_leave/ny_employee_paid_family_leave_contribution.py b/policyengine_us/variables/gov/states/ny/tax/payroll/paid_family_leave/ny_employee_paid_family_leave_contribution.py index 6691dff1f8d..9b7fb67e980 100644 --- a/policyengine_us/variables/gov/states/ny/tax/payroll/paid_family_leave/ny_employee_paid_family_leave_contribution.py +++ b/policyengine_us/variables/gov/states/ny/tax/payroll/paid_family_leave/ny_employee_paid_family_leave_contribution.py @@ -5,14 +5,23 @@ class ny_employee_paid_family_leave_contribution(Variable): value_type = float entity = Person label = "New York employee paid family leave contribution" - documentation = "Employee-side New York Paid Family Leave contribution." + documentation = ( + "Employee-side New York Paid Family Leave contribution. The employer " + "is authorized, not required, to collect it by payroll deduction up " + "to the rate and annual maximum the Department of Financial Services " + "sets (Workers' Compensation Law s. 209(3)(b), (4)); this is that " + "permitted amount times state_payroll_premium_deduction_share. The " + "employer's cost of coverage is not modeled." + ) definition_period = YEAR unit = USD defined_for = StateCode.NY + reference = "https://www.nysenate.gov/legislation/laws/WKC/209" def formula(person, period, parameters): p = parameters(period).gov.states.ny.tax.payroll.paid_family_leave uncapped = p.employee_rate * person( "ny_paid_family_leave_taxable_wages", period ) - return min_(uncapped, p.annual_max_contribution) + permitted = min_(uncapped, p.annual_max_contribution) + return permitted * person("state_payroll_premium_deduction_share", period) diff --git a/policyengine_us/variables/gov/states/tax/payroll/employee_state_payroll_tax.py b/policyengine_us/variables/gov/states/tax/payroll/employee_state_payroll_tax.py index 7956a031799..f2c84a26dae 100644 --- a/policyengine_us/variables/gov/states/tax/payroll/employee_state_payroll_tax.py +++ b/policyengine_us/variables/gov/states/tax/payroll/employee_state_payroll_tax.py @@ -23,8 +23,22 @@ class employee_state_payroll_tax(Variable): entity = TaxUnit label = "Employee state payroll taxes and contributions" documentation = ( - "Employee-side mandatory state payroll taxes and payroll-funded " - "contributions, aggregated from jurisdiction-specific rules." + "Employee-side state payroll taxes and payroll-funded contributions, " + "aggregated from jurisdiction-specific rules. Most components are " + "contributions the statute puts on the worker and requires the " + "employer to withhold: California SDI, Connecticut Paid Leave, New " + "Jersey TDI, FLI, UI and workforce contributions, Paid Leave Oregon " + "and the Oregon statewide transit tax, Pennsylvania UC, Rhode Island " + "TDI and WA Cares. The rest are premiums the statute puts on the " + "employer, which may deduct up to a share from wages without being " + "required to: Colorado FAMLI, Delaware Paid Leave, Maine and " + "Massachusetts Paid Family and Medical Leave, Minnesota Paid Leave, " + "New York Paid Family Leave and Disability Benefits, the Vermont " + "Child Care Contribution and Washington Paid Family and Medical " + "Leave. For those, the employee amount is the permitted share times " + "employer_state_payroll_premium_deduction_share, which defaults to 1, " + "the full permitted share; the employer-side variables carry any part " + "the employer does not deduct." ) definition_period = YEAR unit = USD diff --git a/policyengine_us/variables/gov/states/tax/payroll/employer_additional_state_payroll_tax.py b/policyengine_us/variables/gov/states/tax/payroll/employer_additional_state_payroll_tax.py index 0f81b0058e2..34e864a0918 100644 --- a/policyengine_us/variables/gov/states/tax/payroll/employer_additional_state_payroll_tax.py +++ b/policyengine_us/variables/gov/states/tax/payroll/employer_additional_state_payroll_tax.py @@ -19,8 +19,10 @@ class employer_additional_state_payroll_tax(Variable): entity = Person label = "Employer additional state payroll taxes and contributions" documentation = ( - "Employer-side mandatory state payroll taxes and payroll-funded " - "contributions other than state unemployment insurance." + "Employer-side state payroll taxes and payroll-funded contributions " + "other than state unemployment insurance, including any part of a " + "permitted employee premium the employer does not deduct " + "(employer_state_payroll_premium_deduction_share)." ) definition_period = YEAR unit = USD diff --git a/policyengine_us/variables/gov/states/tax/payroll/employer_total_additional_state_payroll_tax.py b/policyengine_us/variables/gov/states/tax/payroll/employer_total_additional_state_payroll_tax.py index 13102382f5a..b5ccf737615 100644 --- a/policyengine_us/variables/gov/states/tax/payroll/employer_total_additional_state_payroll_tax.py +++ b/policyengine_us/variables/gov/states/tax/payroll/employer_total_additional_state_payroll_tax.py @@ -7,7 +7,10 @@ class employer_total_additional_state_payroll_tax(Variable): label = "Employer total additional state payroll taxes and contributions" documentation = ( "Employer-level state payroll taxes and contributions other than " - "state unemployment insurance, from aggregate employer inputs." + "state unemployment insurance, from aggregate employer inputs. For " + "programs whose premium the statute puts on the employer, it applies " + "the person's state_payroll_premium_deduction_share to the whole " + "payroll, as if the employer deducts the same share for everyone." ) definition_period = YEAR unit = USD @@ -18,6 +21,9 @@ def formula(person, period, parameters): ss_taxable = person( "employer_total_taxable_earnings_for_social_security", period ) + # Programs whose premium the statute puts on the employer charge it + # the part of the permitted employee share it does not deduct. + deducted = person("state_payroll_premium_deduction_share", period) state_ui_taxable = person( "employer_total_taxable_earnings_for_state_unemployment_tax", period ) @@ -30,11 +36,14 @@ def formula(person, period, parameters): ) co_p = parameters(period).gov.states.co.tax.payroll.famli - co = where( - headcount >= co_p.employer_headcount_threshold, - co_p.employer_rate - * person("employer_total_co_famli_taxable_wages", period), - 0, + co_wages = person("employer_total_co_famli_taxable_wages", period) + co = ( + where( + headcount >= co_p.employer_headcount_threshold, + co_p.employer_rate * co_wages, + 0, + ) + + (1 - deducted) * co_p.employee_rate * co_wages ) dc = parameters( @@ -55,23 +64,35 @@ def formula(person, period, parameters): [0, de_p.parental_rate], default=de_full_coverage_rate, ) - de = de_contribution_rate * (1 - de_p.employee_share) * ss_taxable + de = de_contribution_rate * (1 - de_p.employee_share * deducted) * ss_taxable ma_p = parameters(period).gov.states.ma.tax.payroll.paid_leave - ma = where( - headcount >= ma_p.employer_headcount_threshold, - ma_p.medical_rate - * (1 - ma_p.medical_employee_share) - * person("employer_total_ma_paid_leave_taxable_wages", period), - 0, + ma_wages = person("employer_total_ma_paid_leave_taxable_wages", period) + ma_employer_rate = ma_p.family_rate * ( + 1 - ma_p.family_employee_share + ) + ma_p.medical_rate * (1 - ma_p.medical_employee_share) + ma_employee_rate = ( + ma_p.family_rate * ma_p.family_employee_share + + ma_p.medical_rate * ma_p.medical_employee_share + ) + ma = ( + where( + headcount >= ma_p.employer_headcount_threshold, + ma_employer_rate * ma_wages, + 0, + ) + + (1 - deducted) * ma_employee_rate * ma_wages ) me_p = parameters(period).gov.states.me.tax.payroll.paid_leave - me = where( - headcount >= me_p.employer_headcount_threshold, - me_p.employer_rate - * person("employer_total_me_paid_leave_taxable_wages", period), - 0, + me_wages = person("employer_total_me_paid_leave_taxable_wages", period) + me = ( + where( + headcount >= me_p.employer_headcount_threshold, + me_p.employer_rate * me_wages, + 0, + ) + + (1 - deducted) * me_p.employee_rate * me_wages ) or_p = parameters(period).gov.states["or"].tax.payroll.paid_leave @@ -89,19 +110,20 @@ def formula(person, period, parameters): * state_ui_taxable ) - vt = parameters( - period - ).gov.states.vt.tax.payroll.child_care.employer_rate * person( + vt_p = parameters(period).gov.states.vt.tax.payroll.child_care + vt = (vt_p.employer_rate + (1 - deducted) * vt_p.employee_rate) * person( "employer_total_vt_child_care_contribution_wages", period ) wa_p = parameters(period).gov.states.wa.tax.payroll.paid_leave - wa = where( - headcount >= wa_p.employer_headcount_threshold, - wa_p.total_rate - * wa_p.employer_share - * person("employer_total_wa_paid_leave_taxable_wages", period), - 0, + wa_wages = person("employer_total_wa_paid_leave_taxable_wages", period) + wa = ( + where( + headcount >= wa_p.employer_headcount_threshold, + wa_p.total_rate * wa_p.employer_share * wa_wages, + 0, + ) + + (1 - deducted) * wa_p.total_rate * (1 - wa_p.employer_share) * wa_wages ) return select( diff --git a/policyengine_us/variables/gov/states/tax/payroll/state_payroll_premium_deduction_share.py b/policyengine_us/variables/gov/states/tax/payroll/state_payroll_premium_deduction_share.py new file mode 100644 index 00000000000..6b0ca269a79 --- /dev/null +++ b/policyengine_us/variables/gov/states/tax/payroll/state_payroll_premium_deduction_share.py @@ -0,0 +1,21 @@ +from policyengine_us.model_api import * + + +class state_payroll_premium_deduction_share(Variable): + value_type = float + entity = Person + label = "State payroll premium deduction share" + documentation = ( + "Share of the permitted employee premium deducted from wages, for " + "state programs whose premium the statute puts on the employer and " + "lets it deduct up to a share from wages. It is " + "employer_state_payroll_premium_deduction_share held between 0 and 1: " + "an employer may not deduct more than the permitted share, and " + "deducting less than nothing has no meaning." + ) + unit = "/1" + definition_period = YEAR + + def formula(person, period, parameters): + share = person("employer_state_payroll_premium_deduction_share", period) + return clip(share, 0, 1) diff --git a/policyengine_us/variables/gov/states/vt/tax/payroll/child_care/vt_employee_child_care_contribution.py b/policyengine_us/variables/gov/states/vt/tax/payroll/child_care/vt_employee_child_care_contribution.py index 1014e8ca0f3..dd92530afe7 100644 --- a/policyengine_us/variables/gov/states/vt/tax/payroll/child_care/vt_employee_child_care_contribution.py +++ b/policyengine_us/variables/gov/states/vt/tax/payroll/child_care/vt_employee_child_care_contribution.py @@ -6,13 +6,17 @@ class vt_employee_child_care_contribution(Variable): entity = Person label = "Vermont employee child care contribution" documentation = ( - "Employee-side Vermont Child Care Contribution, assuming the employer " - "withholds the maximum permitted employee share." + "Employee-side Vermont Child Care Contribution. The employer pays the " + "contribution and may withhold up to a quarter of it from wages " + "(32 V.S.A. s. 10553(a)(1)); this is that permitted share times " + "state_payroll_premium_deduction_share." ) definition_period = YEAR unit = USD defined_for = StateCode.VT + reference = "https://legislature.vermont.gov/statutes/section/32/246/10553" def formula(person, period, parameters): rate = parameters(period).gov.states.vt.tax.payroll.child_care.employee_rate - return rate * person("vt_child_care_contribution_wages", period) + permitted = rate * person("vt_child_care_contribution_wages", period) + return permitted * person("state_payroll_premium_deduction_share", period) diff --git a/policyengine_us/variables/gov/states/vt/tax/payroll/child_care/vt_employer_child_care_contribution.py b/policyengine_us/variables/gov/states/vt/tax/payroll/child_care/vt_employer_child_care_contribution.py index f5aca0696d1..026d417832b 100644 --- a/policyengine_us/variables/gov/states/vt/tax/payroll/child_care/vt_employer_child_care_contribution.py +++ b/policyengine_us/variables/gov/states/vt/tax/payroll/child_care/vt_employer_child_care_contribution.py @@ -6,13 +6,18 @@ class vt_employer_child_care_contribution(Variable): entity = Person label = "Vermont employer child care contribution" documentation = ( - "Employer-side Vermont Child Care Contribution, assuming the employer " - "contributes only the minimum required employer share." + "Employer-side Vermont Child Care Contribution: the three quarters the " + "employer may not withhold, plus the part of the permitted employee " + "quarter it does not withhold, for which it is responsible " + "(32 V.S.A. s. 10553(c)(2))." ) definition_period = YEAR unit = USD defined_for = StateCode.VT + reference = "https://legislature.vermont.gov/statutes/section/32/246/10553" def formula(person, period, parameters): - rate = parameters(period).gov.states.vt.tax.payroll.child_care.employer_rate - return rate * person("vt_child_care_contribution_wages", period) + p = parameters(period).gov.states.vt.tax.payroll.child_care + wages = person("vt_child_care_contribution_wages", period) + undeducted = 1 - person("state_payroll_premium_deduction_share", period) + return (p.employer_rate + undeducted * p.employee_rate) * wages diff --git a/policyengine_us/variables/gov/states/wa/tax/payroll/paid_leave/wa_employee_paid_leave_contribution.py b/policyengine_us/variables/gov/states/wa/tax/payroll/paid_leave/wa_employee_paid_leave_contribution.py index b0b2c6b1c67..3854302f4d7 100644 --- a/policyengine_us/variables/gov/states/wa/tax/payroll/paid_leave/wa_employee_paid_leave_contribution.py +++ b/policyengine_us/variables/gov/states/wa/tax/payroll/paid_leave/wa_employee_paid_leave_contribution.py @@ -6,13 +6,22 @@ class wa_employee_paid_leave_contribution(Variable): entity = Person label = "Washington employee paid leave contribution" documentation = ( - "Employee-side Washington Paid Family and Medical Leave contribution." + "Employee-side Washington Paid Family and Medical Leave premium. The " + "employer collects and remits the premium, may deduct up to the " + "employee share from wages, and may elect to pay all or any portion " + "of it (RCW 50A.10.030(3), (7)); this is that permitted share times " + "state_payroll_premium_deduction_share." ) definition_period = YEAR unit = USD defined_for = StateCode.WA + reference = ( + "https://app.leg.wa.gov/RCW/default.aspx?cite=50A.10.030", + "https://app.leg.wa.gov/WAC/default.aspx?cite=192-510-065", + ) def formula(person, period, parameters): p = parameters(period).gov.states.wa.tax.payroll.paid_leave taxable_wages = person("wa_paid_leave_taxable_wages", period) - return p.total_rate * (1 - p.employer_share) * taxable_wages + permitted = p.total_rate * (1 - p.employer_share) * taxable_wages + return permitted * person("state_payroll_premium_deduction_share", period) diff --git a/policyengine_us/variables/gov/states/wa/tax/payroll/paid_leave/wa_employer_paid_leave_contribution.py b/policyengine_us/variables/gov/states/wa/tax/payroll/paid_leave/wa_employer_paid_leave_contribution.py index f4e26d381fb..d57d3c2873d 100644 --- a/policyengine_us/variables/gov/states/wa/tax/payroll/paid_leave/wa_employer_paid_leave_contribution.py +++ b/policyengine_us/variables/gov/states/wa/tax/payroll/paid_leave/wa_employer_paid_leave_contribution.py @@ -6,14 +6,29 @@ class wa_employer_paid_leave_contribution(Variable): entity = Person label = "Washington employer paid leave contribution" documentation = ( - "Employer-side Washington Paid Family and Medical Leave contribution." + "Employer-side Washington Paid Family and Medical Leave premium: the " + "employer portion for employers with 50 or more employees (employer " + "headcount is the proxy), plus the part of the permitted employee " + "share the employer does not deduct, which it is treated as electing " + "to pay (WAC 192-510-065(2))." ) definition_period = YEAR unit = USD defined_for = StateCode.WA + reference = ( + "https://app.leg.wa.gov/RCW/default.aspx?cite=50A.10.030", + "https://app.leg.wa.gov/WAC/default.aspx?cite=192-510-065", + ) def formula(person, period, parameters): p = parameters(period).gov.states.wa.tax.payroll.paid_leave liable = person("employer_headcount", period) >= p.employer_headcount_threshold taxable_wages = person("wa_paid_leave_taxable_wages", period) - return where(liable, p.total_rate * p.employer_share * taxable_wages, 0) + employer_share = where( + liable, p.total_rate * p.employer_share * taxable_wages, 0 + ) + undeducted = 1 - person("state_payroll_premium_deduction_share", period) + return ( + employer_share + + undeducted * p.total_rate * (1 - p.employer_share) * taxable_wages + ) diff --git a/policyengine_us/variables/input/employer_payroll.py b/policyengine_us/variables/input/employer_payroll.py index 4aff703de14..539b8355460 100644 --- a/policyengine_us/variables/input/employer_payroll.py +++ b/policyengine_us/variables/input/employer_payroll.py @@ -27,6 +27,27 @@ class employer_headcount(Variable): default_value = 100 +class employer_state_payroll_premium_deduction_share(Variable): + value_type = float + entity = Person + label = "Employer state payroll premium deduction share" + documentation = ( + "Share of the largest employee premium the law lets the employer " + "deduct from wages that the employer actually deducts, for state " + "programs whose premium the statute puts on the employer: Colorado " + "FAMLI, Delaware Paid Leave, Maine and Massachusetts Paid Family and " + "Medical Leave, Minnesota Paid Leave, New York Paid Family Leave and " + "Disability Benefits, the Vermont Child Care Contribution and " + "Washington Paid Family and Medical Leave. 1, the default, deducts " + "the full permitted share; 0 means the employer pays the whole " + "premium. The employer pays any part it does not deduct. Values " + "outside 0 to 1 are treated as the nearer bound." + ) + unit = "/1" + definition_period = YEAR + default_value = 1 + + class employer_quarterly_payroll_expense_override(Variable): value_type = float entity = Person From f16096861af36a0b3e306d44833e94a04aea2c6e Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Mon, 19 Oct 2026 15:05:43 -0400 Subject: [PATCH 2/4] Seed small-employer and capped-wage workers in the deduction share invariants Co-Authored-By: Claude Opus 5.5 --- .../de/tax/payroll/paid_leave/employee_share.yaml | 2 +- ...e_payroll_premium_deduction_share_invariants.py | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/policyengine_us/parameters/gov/states/de/tax/payroll/paid_leave/employee_share.yaml b/policyengine_us/parameters/gov/states/de/tax/payroll/paid_leave/employee_share.yaml index d30df3634d2..9961fdb19e2 100644 --- a/policyengine_us/parameters/gov/states/de/tax/payroll/paid_leave/employee_share.yaml +++ b/policyengine_us/parameters/gov/states/de/tax/payroll/paid_leave/employee_share.yaml @@ -1,4 +1,4 @@ -description: Default employee share of Delaware paid leave contributions. +description: Largest share of each Delaware Paid Leave contribution an employer may deduct from wages. values: 0000-01-01: 0 2025-01-01: 0.5 diff --git a/policyengine_us/tests/core/test_state_payroll_premium_deduction_share_invariants.py b/policyengine_us/tests/core/test_state_payroll_premium_deduction_share_invariants.py index 156c530ac80..9f1583c9dbb 100644 --- a/policyengine_us/tests/core/test_state_payroll_premium_deduction_share_invariants.py +++ b/policyengine_us/tests/core/test_state_payroll_premium_deduction_share_invariants.py @@ -126,10 +126,18 @@ def by_copy(simulation, variable, year): ) @given( st.lists(workers, min_size=4, max_size=30).map( - # One worker in each optional state at a share strictly between 0 and - # 1, so every program's properties compare positive amounts. + # Every optional state gets a worker at a large employer below every + # wage base, and one at a 9-employee employer (below the CO, MA, ME + # and WA size thresholds; DE does not cover it) above every wage base + # and New York's PFL maximum; Delaware also gets a 12-employee + # employer (parental leave only). Shares lie strictly between 0 and 1 + # or above 1, so each program's properties compare positive amounts, + # small-employer rules and capped amounts. lambda rows: ( - [(state, 60_000, 100, 0.5, 0.0) for state in OPTIONAL_STATES] + rows + [(state, 60_000, 100, 0.5, 0.0) for state in OPTIONAL_STATES] + + [(state, 250_000, 9, 0.3, 1.2) for state in OPTIONAL_STATES] + + [("DE", 250_000, 12, 0.3, 1.2)] + + rows ) ) ) From 8ec5126d383e113651014316717209d84ddb778f Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Mon, 19 Oct 2026 16:10:12 -0400 Subject: [PATCH 3/4] Address review r1: docstrings, Oregon line, employer-level coverage Describe the deduction-share programs by the employer's choice, not by who owes the premium (NY and WA put the contribution on the worker), note that MN and NY employer costs are not modeled, state why WA PFML is in and Paid Leave Oregon is out, and note that Rev. Rul. 2025-4's treatment of an employer-paid employee share as wages is not modeled. Cap the one-worker employer's taxable total in the invariants so the employer-level path is checked for every modeled state and size, pin the 2027 Massachusetts parameter values, and add file-page anchors to the PDF references. Co-Authored-By: Claude Opus 5.5 --- ...roll_premium_deduction_share_invariants.py | 35 +++++++++++++++---- .../famli/co_employee_famli_contribution.py | 5 +-- .../famli/co_employer_famli_contribution.py | 5 +-- .../ma_employer_paid_leave_contribution.py | 2 +- .../mn_employee_paid_leave_contribution.py | 9 ++--- .../tax/payroll/employee_state_payroll_tax.py | 27 +++++++++----- .../employer_additional_state_payroll_tax.py | 3 +- ...oyer_total_additional_state_payroll_tax.py | 11 +++--- .../state_payroll_premium_deduction_share.py | 4 +-- .../wa_employee_paid_leave_contribution.py | 5 ++- .../variables/input/employer_payroll.py | 19 +++++----- 11 files changed, 84 insertions(+), 41 deletions(-) diff --git a/policyengine_us/tests/core/test_state_payroll_premium_deduction_share_invariants.py b/policyengine_us/tests/core/test_state_payroll_premium_deduction_share_invariants.py index 9f1583c9dbb..a6a02493a68 100644 --- a/policyengine_us/tests/core/test_state_payroll_premium_deduction_share_invariants.py +++ b/policyengine_us/tests/core/test_state_payroll_premium_deduction_share_invariants.py @@ -23,10 +23,12 @@ modeled, so their employer amount is zero at any share. 4. A larger share never lowers the employee amount or raises the employer amount. -5. With employer-level wage totals equal to the worker's own wages (a - one-worker employer), `employer_total_additional_state_payroll_tax` equals - `employer_additional_state_payroll_tax`: the employer-level path and the - per-worker path agree at any share. +5. With employer-level wage totals equal to the worker's own wages, capped at + the Social Security base where the worker's are (a one-worker employer), + `employer_total_additional_state_payroll_tax` equals + `employer_additional_state_payroll_tax` in every modeled state: the + employer-level path and the per-worker path agree at any share and + employer size. 6. Massachusetts' 2027 swap of the family and medical deduction caps, paired with DFML's swap of the two rates (Acts 2026 c. 101 ss. 25, 26, 43(a)), leaves each worker's employee and employer amounts where they were in @@ -45,6 +47,7 @@ from hypothesis import strategies as st from policyengine_us import Simulation +from policyengine_us.system import system YEARS = (2026, 2027) OPTIONAL_STATES = ("CO", "DE", "MA", "ME", "MN", "NY", "VT", "WA") @@ -64,6 +67,10 @@ # Below the 2026 Social Security wage base, so every program's wage base is # the worker's wages in both years. UNCAPPED_WAGES = 184_500 +SOCIAL_SECURITY_CAP = { + year: system.parameters(f"{year}-01-01").gov.irs.payroll.social_security.cap + for year in YEARS +} COPIES = 3 # drawn share a, drawn share b, input left at its default # The model computes in float32: compare to that precision, never past a cent. CENT = 0.01 @@ -94,7 +101,7 @@ def simulate(rows): "employment_income": {year: wages for year in YEARS}, "employer_headcount": {year: headcount for year in YEARS}, "employer_total_taxable_earnings_for_social_security": { - year: wages for year in YEARS + year: min(wages, SOCIAL_SECURITY_CAP[year]) for year in YEARS }, "employer_total_payroll_tax_gross_wages": { year: wages for year in YEARS @@ -184,7 +191,7 @@ def test_state_payroll_premium_deduction_share_invariants(rows): assert (optional[lower, low] <= optional[lower, high] + CENT).all() assert (employer[lower, low] >= employer[lower, high] - CENT).all() # Property 5. - same_path = modeled & uncapped + same_path = modeled np.testing.assert_allclose( employer_total[same_path], employer[same_path], **TOLERANCE ) @@ -199,3 +206,19 @@ def test_state_payroll_premium_deduction_share_invariants(rows): np.testing.assert_allclose( employer_by_year[2027][ma], employer_by_year[2026][ma], **TOLERANCE ) + + +def test_massachusetts_2027_swaps_deduction_caps_and_rates(): + """Pins the four 2027 values: properties 1-6 hold whether they swap or not.""" + p = system.parameters.gov.states.ma.tax.payroll.paid_leave + # 2026: 100% of the 0.18% family rate and 40% of the 0.70% medical rate. + assert p.family_rate("2026-01-01") == 0.0018 + assert p.family_employee_share("2026-01-01") == 1 + assert p.medical_rate("2026-01-01") == 0.007 + assert p.medical_employee_share("2026-01-01") == 0.4 + # 2027 (Acts 2026 c. 101 ss. 25-26; DFML 2027 rates): 40% of the 0.70% + # family rate and 100% of the 0.18% medical rate. + assert p.family_rate("2027-01-01") == 0.007 + assert p.family_employee_share("2027-01-01") == 0.4 + assert p.medical_rate("2027-01-01") == 0.0018 + assert p.medical_employee_share("2027-01-01") == 1 diff --git a/policyengine_us/variables/gov/states/co/tax/payroll/famli/co_employee_famli_contribution.py b/policyengine_us/variables/gov/states/co/tax/payroll/famli/co_employee_famli_contribution.py index 768f238266e..23fb43677bb 100644 --- a/policyengine_us/variables/gov/states/co/tax/payroll/famli/co_employee_famli_contribution.py +++ b/policyengine_us/variables/gov/states/co/tax/payroll/famli/co_employee_famli_contribution.py @@ -14,8 +14,9 @@ class co_employee_famli_contribution(Variable): unit = USD defined_for = StateCode.CO reference = ( - "https://olls.info/crs/crs2025-title-08.pdf", - "https://www.sos.state.co.us/CCR/GenerateRulePdf.do?ruleVersionId=12341&fileName=7%20CCR%201107-1", + "https://olls.info/crs/crs2025-title-08.pdf#page=222", + # PDF pages 7-8 + "https://www.sos.state.co.us/CCR/GenerateRulePdf.do?ruleVersionId=12341&fileName=7%20CCR%201107-1#page=7", ) def formula(person, period, parameters): diff --git a/policyengine_us/variables/gov/states/co/tax/payroll/famli/co_employer_famli_contribution.py b/policyengine_us/variables/gov/states/co/tax/payroll/famli/co_employer_famli_contribution.py index 09d2cee4b0c..08ad3b5628f 100644 --- a/policyengine_us/variables/gov/states/co/tax/payroll/famli/co_employer_famli_contribution.py +++ b/policyengine_us/variables/gov/states/co/tax/payroll/famli/co_employer_famli_contribution.py @@ -15,8 +15,9 @@ class co_employer_famli_contribution(Variable): unit = USD defined_for = StateCode.CO reference = ( - "https://olls.info/crs/crs2025-title-08.pdf", - "https://www.sos.state.co.us/CCR/GenerateRulePdf.do?ruleVersionId=12341&fileName=7%20CCR%201107-1", + "https://olls.info/crs/crs2025-title-08.pdf#page=222", + # PDF pages 7-8 + "https://www.sos.state.co.us/CCR/GenerateRulePdf.do?ruleVersionId=12341&fileName=7%20CCR%201107-1#page=7", ) def formula(person, period, parameters): diff --git a/policyengine_us/variables/gov/states/ma/tax/payroll/paid_leave/ma_employer_paid_leave_contribution.py b/policyengine_us/variables/gov/states/ma/tax/payroll/paid_leave/ma_employer_paid_leave_contribution.py index 140cd0567e1..b88c5450ecc 100644 --- a/policyengine_us/variables/gov/states/ma/tax/payroll/paid_leave/ma_employer_paid_leave_contribution.py +++ b/policyengine_us/variables/gov/states/ma/tax/payroll/paid_leave/ma_employer_paid_leave_contribution.py @@ -19,7 +19,7 @@ class ma_employer_paid_leave_contribution(Variable): reference = ( "https://malegislature.gov/Laws/GeneralLaws/PartI/TitleXXII/Chapter175M/Section6", "https://malegislature.gov/Laws/SessionLaws/Acts/2026/Chapter101", - "https://www.mass.gov/doc/458-cmr-2-family-and-medical-leave/download", + "https://www.mass.gov/doc/458-cmr-2-family-and-medical-leave/download#page=12", ) def formula(person, period, parameters): diff --git a/policyengine_us/variables/gov/states/mn/tax/payroll/paid_leave/mn_employee_paid_leave_contribution.py b/policyengine_us/variables/gov/states/mn/tax/payroll/paid_leave/mn_employee_paid_leave_contribution.py index c2b427153e2..0fdf8023416 100644 --- a/policyengine_us/variables/gov/states/mn/tax/payroll/paid_leave/mn_employee_paid_leave_contribution.py +++ b/policyengine_us/variables/gov/states/mn/tax/payroll/paid_leave/mn_employee_paid_leave_contribution.py @@ -7,10 +7,11 @@ class mn_employee_paid_leave_contribution(Variable): label = "Minnesota employee paid leave contribution" documentation = ( "Employee-side Minnesota Paid Leave premium. The premium is payable " - "by the employer, which must pay at least half; employees pay by wage " - "deduction only the part the employer does not pay (Minn. Stat. " - "268B.14, subds. 1, 3 and 5a). This is the largest such part, half " - "the premium at the full rate, times " + "by the employer, which must pay at least half (a small employer " + "under subd. 5a, at least a quarter of the full rate); employees pay " + "by wage deduction only the part the employer does not pay (Minn. " + "Stat. 268B.14, subds. 1, 3 and 5a). This is the largest such part, " + "half the premium at the full rate, times " "state_payroll_premium_deduction_share. The employer premium is not " "modeled." ) diff --git a/policyengine_us/variables/gov/states/tax/payroll/employee_state_payroll_tax.py b/policyengine_us/variables/gov/states/tax/payroll/employee_state_payroll_tax.py index f2c84a26dae..c448aae2b51 100644 --- a/policyengine_us/variables/gov/states/tax/payroll/employee_state_payroll_tax.py +++ b/policyengine_us/variables/gov/states/tax/payroll/employee_state_payroll_tax.py @@ -29,16 +29,25 @@ class employee_state_payroll_tax(Variable): "employer to withhold: California SDI, Connecticut Paid Leave, New " "Jersey TDI, FLI, UI and workforce contributions, Paid Leave Oregon " "and the Oregon statewide transit tax, Pennsylvania UC, Rhode Island " - "TDI and WA Cares. The rest are premiums the statute puts on the " - "employer, which may deduct up to a share from wages without being " - "required to: Colorado FAMLI, Delaware Paid Leave, Maine and " - "Massachusetts Paid Family and Medical Leave, Minnesota Paid Leave, " - "New York Paid Family Leave and Disability Benefits, the Vermont " - "Child Care Contribution and Washington Paid Family and Medical " - "Leave. For those, the employee amount is the permitted share times " + "TDI and WA Cares. In the rest, the law caps what the employer may " + "deduct from wages and leaves it to decide how much of that to " + "deduct: Colorado FAMLI, Delaware Paid Leave, Maine and Massachusetts " + "Paid Family and Medical Leave, Minnesota Paid Leave and the Vermont " + "Child Care Contribution, whose premium the statute puts on the " + "employer; New York Paid Family Leave and Disability Benefits, which " + "the employer is authorized but not required to collect; and " + "Washington Paid Family and Medical Leave, whose employee share the " + "employer may deduct up to and may pay in any part. For those, the " + "employee amount is the permitted share times " "employer_state_payroll_premium_deduction_share, which defaults to 1, " - "the full permitted share; the employer-side variables carry any part " - "the employer does not deduct." + "the full permitted share, and the employer-side variables carry any " + "part the employer does not deduct, except in Minnesota and New York, " + "whose employer cost is not modeled. Not modeled: an employer's " + "election to pay a required employee contribution as a benefit (Paid " + "Leave Oregon, ORS 657B.150(5)) or voluntary payment of other " + "mandatory contributions, and the federal treatment of an employer's " + "payment of an employee share as the employee's wages (Rev. Rul. " + "2025-4)." ) definition_period = YEAR unit = USD diff --git a/policyengine_us/variables/gov/states/tax/payroll/employer_additional_state_payroll_tax.py b/policyengine_us/variables/gov/states/tax/payroll/employer_additional_state_payroll_tax.py index 34e864a0918..0bbb5e52be0 100644 --- a/policyengine_us/variables/gov/states/tax/payroll/employer_additional_state_payroll_tax.py +++ b/policyengine_us/variables/gov/states/tax/payroll/employer_additional_state_payroll_tax.py @@ -22,7 +22,8 @@ class employer_additional_state_payroll_tax(Variable): "Employer-side state payroll taxes and payroll-funded contributions " "other than state unemployment insurance, including any part of a " "permitted employee premium the employer does not deduct " - "(employer_state_payroll_premium_deduction_share)." + "(employer_state_payroll_premium_deduction_share). Minnesota Paid " + "Leave and the New York PFL and DBL employer costs are not modeled." ) definition_period = YEAR unit = USD diff --git a/policyengine_us/variables/gov/states/tax/payroll/employer_total_additional_state_payroll_tax.py b/policyengine_us/variables/gov/states/tax/payroll/employer_total_additional_state_payroll_tax.py index b5ccf737615..2c41614b842 100644 --- a/policyengine_us/variables/gov/states/tax/payroll/employer_total_additional_state_payroll_tax.py +++ b/policyengine_us/variables/gov/states/tax/payroll/employer_total_additional_state_payroll_tax.py @@ -8,9 +8,10 @@ class employer_total_additional_state_payroll_tax(Variable): documentation = ( "Employer-level state payroll taxes and contributions other than " "state unemployment insurance, from aggregate employer inputs. For " - "programs whose premium the statute puts on the employer, it applies " - "the person's state_payroll_premium_deduction_share to the whole " - "payroll, as if the employer deducts the same share for everyone." + "programs where the law caps the employer's deduction from wages and " + "the employer pays what it does not deduct, it applies the person's " + "state_payroll_premium_deduction_share to the whole payroll, as if " + "the employer deducts the same share for everyone." ) definition_period = YEAR unit = USD @@ -21,8 +22,8 @@ def formula(person, period, parameters): ss_taxable = person( "employer_total_taxable_earnings_for_social_security", period ) - # Programs whose premium the statute puts on the employer charge it - # the part of the permitted employee share it does not deduct. + # Where the law caps the employer's deduction from wages, the employer + # pays the part of the permitted employee share it does not deduct. deducted = person("state_payroll_premium_deduction_share", period) state_ui_taxable = person( "employer_total_taxable_earnings_for_state_unemployment_tax", period diff --git a/policyengine_us/variables/gov/states/tax/payroll/state_payroll_premium_deduction_share.py b/policyengine_us/variables/gov/states/tax/payroll/state_payroll_premium_deduction_share.py index 6b0ca269a79..9abd4cbe95f 100644 --- a/policyengine_us/variables/gov/states/tax/payroll/state_payroll_premium_deduction_share.py +++ b/policyengine_us/variables/gov/states/tax/payroll/state_payroll_premium_deduction_share.py @@ -7,8 +7,8 @@ class state_payroll_premium_deduction_share(Variable): label = "State payroll premium deduction share" documentation = ( "Share of the permitted employee premium deducted from wages, for " - "state programs whose premium the statute puts on the employer and " - "lets it deduct up to a share from wages. It is " + "state programs where the law caps the employer's deduction and " + "leaves the amount to the employer. It is " "employer_state_payroll_premium_deduction_share held between 0 and 1: " "an employer may not deduct more than the permitted share, and " "deducting less than nothing has no meaning." diff --git a/policyengine_us/variables/gov/states/wa/tax/payroll/paid_leave/wa_employee_paid_leave_contribution.py b/policyengine_us/variables/gov/states/wa/tax/payroll/paid_leave/wa_employee_paid_leave_contribution.py index 3854302f4d7..a77513c9c91 100644 --- a/policyengine_us/variables/gov/states/wa/tax/payroll/paid_leave/wa_employee_paid_leave_contribution.py +++ b/policyengine_us/variables/gov/states/wa/tax/payroll/paid_leave/wa_employee_paid_leave_contribution.py @@ -10,7 +10,10 @@ class wa_employee_paid_leave_contribution(Variable): "employer collects and remits the premium, may deduct up to the " "employee share from wages, and may elect to pay all or any portion " "of it (RCW 50A.10.030(3), (7)); this is that permitted share times " - "state_payroll_premium_deduction_share." + "state_payroll_premium_deduction_share. Unlike Paid Leave Oregon, " + "whose employer must deduct a fixed 60 percent (ORS 657B.150(2)(b)), " + "the deduction itself is permissive and capped, and a deduction not " + "taken is the employer's (WAC 192-510-065(2))." ) definition_period = YEAR unit = USD diff --git a/policyengine_us/variables/input/employer_payroll.py b/policyengine_us/variables/input/employer_payroll.py index 539b8355460..7b69a15ec1f 100644 --- a/policyengine_us/variables/input/employer_payroll.py +++ b/policyengine_us/variables/input/employer_payroll.py @@ -34,14 +34,17 @@ class employer_state_payroll_premium_deduction_share(Variable): documentation = ( "Share of the largest employee premium the law lets the employer " "deduct from wages that the employer actually deducts, for state " - "programs whose premium the statute puts on the employer: Colorado " - "FAMLI, Delaware Paid Leave, Maine and Massachusetts Paid Family and " - "Medical Leave, Minnesota Paid Leave, New York Paid Family Leave and " - "Disability Benefits, the Vermont Child Care Contribution and " - "Washington Paid Family and Medical Leave. 1, the default, deducts " - "the full permitted share; 0 means the employer pays the whole " - "premium. The employer pays any part it does not deduct. Values " - "outside 0 to 1 are treated as the nearer bound." + "programs where the law caps the deduction and leaves the amount to " + "the employer: Colorado FAMLI, Delaware Paid Leave, Maine and " + "Massachusetts Paid Family and Medical Leave, Minnesota Paid Leave, " + "New York Paid Family Leave and Disability Benefits, the Vermont " + "Child Care Contribution and Washington Paid Family and Medical " + "Leave. 1, the default, deducts the full permitted share; 0 deducts " + "nothing. The employer pays any part it does not deduct, which the " + "employer-side variables carry except in Minnesota and New York, " + "whose employer cost is not modeled. The federal treatment of that " + "payment as the employee's wages (Rev. Rul. 2025-4) is not modeled. " + "Values outside 0 to 1 are treated as the nearer bound." ) unit = "/1" definition_period = YEAR From 727ebcb881094b80dbf111670a055b50e7e43875 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Mon, 19 Oct 2026 16:33:38 -0400 Subject: [PATCH 4/4] Scope the Rev. Rul. 2025-4 note to the state paid leave funds Co-Authored-By: Claude Opus 5.5 --- .../gov/states/tax/payroll/employee_state_payroll_tax.py | 8 +++++--- policyengine_us/variables/input/employer_payroll.py | 5 +++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/policyengine_us/variables/gov/states/tax/payroll/employee_state_payroll_tax.py b/policyengine_us/variables/gov/states/tax/payroll/employee_state_payroll_tax.py index c448aae2b51..91e48d04977 100644 --- a/policyengine_us/variables/gov/states/tax/payroll/employee_state_payroll_tax.py +++ b/policyengine_us/variables/gov/states/tax/payroll/employee_state_payroll_tax.py @@ -45,9 +45,11 @@ class employee_state_payroll_tax(Variable): "whose employer cost is not modeled. Not modeled: an employer's " "election to pay a required employee contribution as a benefit (Paid " "Leave Oregon, ORS 657B.150(5)) or voluntary payment of other " - "mandatory contributions, and the federal treatment of an employer's " - "payment of an employee share as the employee's wages (Rev. Rul. " - "2025-4)." + "mandatory contributions, and, for the state paid family and medical " + "leave funds (Colorado, Delaware, Maine, Massachusetts, Minnesota and " + "Washington), the federal treatment of an employer's payment of the " + "employee share as the employee's wages (Rev. Rul. 2025-4; Notice " + "2026-6)." ) definition_period = YEAR unit = USD diff --git a/policyengine_us/variables/input/employer_payroll.py b/policyengine_us/variables/input/employer_payroll.py index 7b69a15ec1f..c6c53cd6a67 100644 --- a/policyengine_us/variables/input/employer_payroll.py +++ b/policyengine_us/variables/input/employer_payroll.py @@ -42,8 +42,9 @@ class employer_state_payroll_premium_deduction_share(Variable): "Leave. 1, the default, deducts the full permitted share; 0 deducts " "nothing. The employer pays any part it does not deduct, which the " "employer-side variables carry except in Minnesota and New York, " - "whose employer cost is not modeled. The federal treatment of that " - "payment as the employee's wages (Rev. Rul. 2025-4) is not modeled. " + "whose employer cost is not modeled. For the state paid family and " + "medical leave funds, the federal treatment of that payment as the " + "employee's wages (Rev. Rul. 2025-4; Notice 2026-6) is not modeled. " "Values outside 0 to 1 are treated as the nearer bound." ) unit = "/1"