Skip to content
1 change: 1 addition & 0 deletions changelog.d/payroll-employer-deduction-share.added.md
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
"""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, 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
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
from policyengine_us.system import system

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
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
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: min(wages, SOCIAL_SECURITY_CAP[year]) 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(
# 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]
+ [(state, 250_000, 9, 0.3, 1.2) for state in OPTIONAL_STATES]
+ [("DE", 250_000, 12, 0.3, 1.2)]
+ 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
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
)


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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading
Loading