From 62c47f312c229c43c16236e6d61c3eb89cfd4bff Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 7 Nov 2026 14:56:39 -0500 Subject: [PATCH 1/2] Give state employee payroll taxes their 2018-2027 histories - Connecticut Paid Leave and the Oregon statewide transit tax read zero before contributions began (January 2021, July 2018) instead of carrying their first value back to 2015. - Massachusetts PFML (from October 2019), New Jersey TDI and FLI, New York Paid Family Leave (from 2018) and Rhode Island TDI take each year's published rate and wage base for 2018-2023, where they read zero. - New rate variables for Massachusetts PFML, the Oregon transit tax and the Vermont Child Care Contribution average the rates in force at the four quarter starts, so a partial first year counts only its months in force. - YAML tests pin a pre-start year and historical years for each state. A property-based test compares every month's stored values with the published tables, and each contribution with the published rate times taxable wages. Co-Authored-By: Claude Opus 5.5 --- .../state-payroll-tax-history.fixed.md | 1 + .../tax/payroll/paid_leave/employee_rate.yaml | 6 +- .../employer_headcount_threshold.yaml | 14 +- .../tax/payroll/paid_leave/family_rate.yaml | 15 + .../paid_leave/medical_employee_share.yaml | 14 +- .../tax/payroll/paid_leave/medical_rate.yaml | 15 + .../family_leave_insurance/employee_rate.yaml | 10 +- .../employee_rate.yaml | 10 +- .../taxable_wage_base.yaml | 11 +- .../annual_max_contribution.yaml | 21 + .../paid_family_leave/employee_rate.yaml | 20 + .../statewide_transit/employee_rate.yaml | 2 + .../employee_rate.yaml | 19 +- .../taxable_wage_base.yaml | 19 +- .../tax/payroll/child_care/employee_rate.yaml | 3 + .../tax/payroll/child_care/employer_rate.yaml | 3 + ...st_state_payroll_tax_history_invariants.py | 417 ++++++++++++++++++ .../ct_employee_state_payroll_tax.yaml | 32 ++ .../ma_employee_state_payroll_tax.yaml | 68 +++ ...employee_paid_leave_contribution_rate.yaml | 64 +++ ...employer_paid_leave_contribution_rate.yaml | 92 ++++ .../nj_employee_state_payroll_tax.yaml | 59 +++ ...ployee_paid_family_leave_contribution.yaml | 99 +++++ .../or_employee_state_payroll_tax.yaml | 25 ++ ...r_employee_statewide_transit_tax_rate.yaml | 32 ++ ...ary_disability_insurance_contribution.yaml | 66 +++ ...employee_child_care_contribution_rate.yaml | 38 ++ ...employer_child_care_contribution_rate.yaml | 44 ++ .../ma_employee_paid_leave_contribution.py | 3 +- ...a_employee_paid_leave_contribution_rate.py | 33 ++ .../ma_employer_paid_leave_contribution.py | 7 +- ...a_employer_paid_leave_contribution_rate.py | 36 ++ .../or_employee_statewide_transit_tax.py | 6 +- .../or_employee_statewide_transit_tax_rate.py | 32 ++ ...oyer_total_additional_state_payroll_tax.py | 13 +- .../vt_employee_child_care_contribution.py | 2 +- ...t_employee_child_care_contribution_rate.py | 31 ++ .../vt_employer_child_care_contribution.py | 2 +- ...t_employer_child_care_contribution_rate.py | 30 ++ 39 files changed, 1381 insertions(+), 33 deletions(-) create mode 100644 changelog.d/state-payroll-tax-history.fixed.md create mode 100644 policyengine_us/tests/core/test_state_payroll_tax_history_invariants.py create mode 100644 policyengine_us/tests/policy/baseline/gov/states/ct/tax/payroll/ct_employee_state_payroll_tax.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/ma/tax/payroll/ma_employee_state_payroll_tax.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/ma/tax/payroll/paid_leave/ma_employee_paid_leave_contribution_rate.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/ma/tax/payroll/paid_leave/ma_employer_paid_leave_contribution_rate.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/or/tax/payroll/statewide_transit/or_employee_statewide_transit_tax_rate.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/vt/tax/payroll/child_care/vt_employee_child_care_contribution_rate.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/vt/tax/payroll/child_care/vt_employer_child_care_contribution_rate.yaml create mode 100644 policyengine_us/variables/gov/states/ma/tax/payroll/paid_leave/ma_employee_paid_leave_contribution_rate.py create mode 100644 policyengine_us/variables/gov/states/ma/tax/payroll/paid_leave/ma_employer_paid_leave_contribution_rate.py create mode 100644 policyengine_us/variables/gov/states/or/tax/payroll/statewide_transit/or_employee_statewide_transit_tax_rate.py create mode 100644 policyengine_us/variables/gov/states/vt/tax/payroll/child_care/vt_employee_child_care_contribution_rate.py create mode 100644 policyengine_us/variables/gov/states/vt/tax/payroll/child_care/vt_employer_child_care_contribution_rate.py diff --git a/changelog.d/state-payroll-tax-history.fixed.md b/changelog.d/state-payroll-tax-history.fixed.md new file mode 100644 index 00000000000..8cc73a15544 --- /dev/null +++ b/changelog.d/state-payroll-tax-history.fixed.md @@ -0,0 +1 @@ +Give state employee payroll taxes their published 2018-2027 histories. Connecticut Paid Leave and the Oregon statewide transit tax no longer run back before contributions began (January 2021 and July 2018). Massachusetts PFML (from October 2019), New Jersey TDI and FLI, New York Paid Family Leave (from 2018) and Rhode Island TDI take each year's published rate and wage base for 2018-2023, where they read zero. Massachusetts PFML, the Oregon transit tax and the Vermont Child Care Contribution average the rates in force at the four quarter starts, so a partial first year counts only its months in force. 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 dcdfe438c58..0e44b2ff9c2 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 @@ -1,5 +1,7 @@ description: Employee-side Connecticut Paid Leave contribution rate. values: + # CGS 31-49g(b)(1) starts contributions on January 1, 2021. + 0000-01-01: 0 2021-01-01: 0.005 metadata: @@ -7,8 +9,8 @@ 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 - title: CT Paid Leave Authority Board of Directors, minutes of September 10, 2026 (vote to maintain the 0.5% contribution rate), page 2 diff --git a/policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/employer_headcount_threshold.yaml b/policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/employer_headcount_threshold.yaml index 332cf877f1c..d20deb90bf0 100644 --- a/policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/employer_headcount_threshold.yaml +++ b/policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/employer_headcount_threshold.yaml @@ -1,7 +1,9 @@ description: Minimum employer size for Massachusetts PFML employer contributions. values: 0000-01-01: 0 - 2024-01-01: 25 + # Contributions began October 1, 2019, after legislation delayed the start by + # three months from July 1, 2019. + 2019-10-01: 25 metadata: period: year @@ -12,6 +14,16 @@ metadata: href: https://malegislature.gov/Laws/GeneralLaws/PartI/TitleXXII/Chapter175M/Section6 - title: Massachusetts Paid Family and Medical Leave employer contribution rates and calculator href: https://www.mass.gov/info-details/paid-family-and-medical-leave-employer-contribution-rates-and-calculator + - title: Massachusetts Department of Family and Medical Leave, Notice to Massachusetts employers about the PFML delay (June 14, 2019; archived July 16, 2019) + href: https://web.archive.org/web/20190716144139/https://www.mass.gov/news/notice-to-massachusetts-employers-about-pfml-delay + - title: Massachusetts Paid Family and Medical Leave contribution rates for employers, 2019 (archived November 19, 2019) + href: https://web.archive.org/web/20191119050248/https://www.mass.gov/info-details/family-and-medical-leave-contribution-rates-for-employers + - title: Massachusetts Paid Family and Medical Leave contribution rates for employers, 2020 (archived July 15, 2020) + href: https://web.archive.org/web/20200715141908/https://www.mass.gov/info-details/family-and-medical-leave-contribution-rates-for-employers + - title: Massachusetts Paid Family and Medical Leave employer contribution rates, 2021 and 2022 sections (archived December 24, 2021) + href: https://web.archive.org/web/20211224090330/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, 2022 and 2023 sections (archived March 16, 2023) + href: https://web.archive.org/web/20230316153652/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) 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..505ab65983d 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 @@ -1,6 +1,11 @@ description: Massachusetts PFML family leave contribution rate. values: 0000-01-01: 0 + # Contributions began October 1, 2019, after legislation delayed the start by + # three months from July 1, 2019. + 2019-10-01: 0.0013 + 2022-01-01: 0.0012 + 2023-01-01: 0.0011 2024-01-01: 0.0018 metadata: @@ -12,6 +17,16 @@ metadata: href: https://malegislature.gov/Laws/GeneralLaws/PartI/TitleXXII/Chapter175M/Section6 - title: Massachusetts Paid Family and Medical Leave employer contribution rates and calculator href: https://www.mass.gov/info-details/paid-family-and-medical-leave-employer-contribution-rates-and-calculator + - title: Massachusetts Department of Family and Medical Leave, Notice to Massachusetts employers about the PFML delay (June 14, 2019; archived July 16, 2019) + href: https://web.archive.org/web/20190716144139/https://www.mass.gov/news/notice-to-massachusetts-employers-about-pfml-delay + - title: Massachusetts Paid Family and Medical Leave contribution rates for employers, 2019 (archived November 19, 2019) + href: https://web.archive.org/web/20191119050248/https://www.mass.gov/info-details/family-and-medical-leave-contribution-rates-for-employers + - title: Massachusetts Paid Family and Medical Leave contribution rates for employers, 2020 (archived July 15, 2020) + href: https://web.archive.org/web/20200715141908/https://www.mass.gov/info-details/family-and-medical-leave-contribution-rates-for-employers + - title: Massachusetts Paid Family and Medical Leave employer contribution rates, 2021 and 2022 sections (archived December 24, 2021) + href: https://web.archive.org/web/20211224090330/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, 2022 and 2023 sections (archived March 16, 2023) + href: https://web.archive.org/web/20230316153652/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) 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..6086792b08e 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. values: 0000-01-01: 0 - 2024-01-01: 0.4 + # Contributions began October 1, 2019, after legislation delayed the start by + # three months from July 1, 2019. + 2019-10-01: 0.4 metadata: period: year @@ -12,6 +14,16 @@ metadata: href: https://malegislature.gov/Laws/GeneralLaws/PartI/TitleXXII/Chapter175M/Section6 - title: Massachusetts Paid Family and Medical Leave employer contribution rates and calculator href: https://www.mass.gov/info-details/paid-family-and-medical-leave-employer-contribution-rates-and-calculator + - title: Massachusetts Department of Family and Medical Leave, Notice to Massachusetts employers about the PFML delay (June 14, 2019; archived July 16, 2019) + href: https://web.archive.org/web/20190716144139/https://www.mass.gov/news/notice-to-massachusetts-employers-about-pfml-delay + - title: Massachusetts Paid Family and Medical Leave contribution rates for employers, 2019 (archived November 19, 2019) + href: https://web.archive.org/web/20191119050248/https://www.mass.gov/info-details/family-and-medical-leave-contribution-rates-for-employers + - title: Massachusetts Paid Family and Medical Leave contribution rates for employers, 2020 (archived July 15, 2020) + href: https://web.archive.org/web/20200715141908/https://www.mass.gov/info-details/family-and-medical-leave-contribution-rates-for-employers + - title: Massachusetts Paid Family and Medical Leave employer contribution rates, 2021 and 2022 sections (archived December 24, 2021) + href: https://web.archive.org/web/20211224090330/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, 2022 and 2023 sections (archived March 16, 2023) + href: https://web.archive.org/web/20230316153652/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) 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..a3954cf7fa3 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 @@ -1,6 +1,11 @@ description: Massachusetts PFML medical leave contribution rate. values: 0000-01-01: 0 + # Contributions began October 1, 2019, after legislation delayed the start by + # three months from July 1, 2019. + 2019-10-01: 0.0062 + 2022-01-01: 0.0056 + 2023-01-01: 0.0052 2024-01-01: 0.007 metadata: @@ -12,6 +17,16 @@ metadata: href: https://malegislature.gov/Laws/GeneralLaws/PartI/TitleXXII/Chapter175M/Section6 - title: Massachusetts Paid Family and Medical Leave employer contribution rates and calculator href: https://www.mass.gov/info-details/paid-family-and-medical-leave-employer-contribution-rates-and-calculator + - title: Massachusetts Department of Family and Medical Leave, Notice to Massachusetts employers about the PFML delay (June 14, 2019; archived July 16, 2019) + href: https://web.archive.org/web/20190716144139/https://www.mass.gov/news/notice-to-massachusetts-employers-about-pfml-delay + - title: Massachusetts Paid Family and Medical Leave contribution rates for employers, 2019 (archived November 19, 2019) + href: https://web.archive.org/web/20191119050248/https://www.mass.gov/info-details/family-and-medical-leave-contribution-rates-for-employers + - title: Massachusetts Paid Family and Medical Leave contribution rates for employers, 2020 (archived July 15, 2020) + href: https://web.archive.org/web/20200715141908/https://www.mass.gov/info-details/family-and-medical-leave-contribution-rates-for-employers + - title: Massachusetts Paid Family and Medical Leave employer contribution rates, 2021 and 2022 sections (archived December 24, 2021) + href: https://web.archive.org/web/20211224090330/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, 2022 and 2023 sections (archived March 16, 2023) + href: https://web.archive.org/web/20230316153652/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) diff --git a/policyengine_us/parameters/gov/states/nj/tax/payroll/family_leave_insurance/employee_rate.yaml b/policyengine_us/parameters/gov/states/nj/tax/payroll/family_leave_insurance/employee_rate.yaml index e9232738acf..8dc2e797bf1 100644 --- a/policyengine_us/parameters/gov/states/nj/tax/payroll/family_leave_insurance/employee_rate.yaml +++ b/policyengine_us/parameters/gov/states/nj/tax/payroll/family_leave_insurance/employee_rate.yaml @@ -1,9 +1,17 @@ description: Employee-side New Jersey family leave insurance contribution rate. values: - 0000-01-01: 0 + # Worker FLI contributions existed before 2018. The model does not encode earlier + # years, so it carries the 2018 value back to 2015, its first year. + 2018-01-01: 0.0009 + 2019-01-01: 0.0008 + 2020-01-01: 0.0016 + 2021-01-01: 0.0028 + 2022-01-01: 0.0014 + 2023-01-01: 0.0006 2024-01-01: 0.0009 2025-01-01: 0.0033 2026-01-01: 0.0023 + 2027-01-01: 0.0024 metadata: period: year diff --git a/policyengine_us/parameters/gov/states/nj/tax/payroll/temporary_disability_insurance/employee_rate.yaml b/policyengine_us/parameters/gov/states/nj/tax/payroll/temporary_disability_insurance/employee_rate.yaml index bdaecfff388..4a919a2b974 100644 --- a/policyengine_us/parameters/gov/states/nj/tax/payroll/temporary_disability_insurance/employee_rate.yaml +++ b/policyengine_us/parameters/gov/states/nj/tax/payroll/temporary_disability_insurance/employee_rate.yaml @@ -1,9 +1,17 @@ description: Employee-side New Jersey temporary disability insurance contribution rate. values: - 0000-01-01: 0 + # Worker TDI contributions existed before 2018. The model does not encode earlier + # years, so it carries the 2018 value back to 2015, its first year. + 2018-01-01: 0.0019 + 2019-01-01: 0.0017 + 2020-01-01: 0.0026 + 2021-01-01: 0.0047 + 2022-01-01: 0.0014 + 2023-01-01: 0 2024-01-01: 0 2025-01-01: 0.0023 2026-01-01: 0.0019 + 2027-01-01: 0.0024 metadata: period: year diff --git a/policyengine_us/parameters/gov/states/nj/tax/payroll/temporary_disability_insurance/taxable_wage_base.yaml b/policyengine_us/parameters/gov/states/nj/tax/payroll/temporary_disability_insurance/taxable_wage_base.yaml index 73c9ec26b57..3eb1b43efe8 100644 --- a/policyengine_us/parameters/gov/states/nj/tax/payroll/temporary_disability_insurance/taxable_wage_base.yaml +++ b/policyengine_us/parameters/gov/states/nj/tax/payroll/temporary_disability_insurance/taxable_wage_base.yaml @@ -1,6 +1,15 @@ description: Taxable wage base for New Jersey TDI and FLI employee contributions. values: - 0000-01-01: 0 + # The worker TDI and FLI wage base existed before 2018. The model does not encode + # earlier years, so it carries the 2018 value back to 2015, its first year. + # NJDOL lists one wage base for UI, TDI and FLI through 2019. From 2020 the + # worker TDI and FLI base is separate. + 2018-01-01: 33_700 + 2019-01-01: 34_400 + 2020-01-01: 134_900 + 2021-01-01: 138_200 + 2022-01-01: 151_900 + 2023-01-01: 156_800 2024-01-01: 161_400 2025-01-01: 165_400 2026-01-01: 171_100 diff --git a/policyengine_us/parameters/gov/states/ny/tax/payroll/paid_family_leave/annual_max_contribution.yaml b/policyengine_us/parameters/gov/states/ny/tax/payroll/paid_family_leave/annual_max_contribution.yaml index 94b0f368b48..b65e048e227 100644 --- a/policyengine_us/parameters/gov/states/ny/tax/payroll/paid_family_leave/annual_max_contribution.yaml +++ b/policyengine_us/parameters/gov/states/ny/tax/payroll/paid_family_leave/annual_max_contribution.yaml @@ -1,6 +1,13 @@ description: Maximum annual New York Paid Family Leave employee contribution. values: + # Contributions began January 1, 2018. 0000-01-01: 0 + 2018-01-01: 85.56 + 2019-01-01: 107.97 + 2020-01-01: 196.72 + 2021-01-01: 385.34 + 2022-01-01: 423.71 + 2023-01-01: 399.43 2024-01-01: 333.25 2025-01-01: 354.53 2026-01-01: 411.91 @@ -13,6 +20,20 @@ metadata: reference: - title: New York Workers' Compensation Law Section 209 href: https://www.nysenate.gov/legislation/laws/WKC/209 + - title: New York Department of Financial Services, Decision on premium rate for Paid Family Leave benefits and maximum employee contribution for coverage beginning January 1, 2018 + href: https://www.dfs.ny.gov/apps_and_licensing/health_insurers/pfl_rate_decision_2018_page + - title: New York State Office of the State Comptroller, Payroll Bulletin 1619, New York State Paid Family Leave Program (2018 maximum annual deduction of $85.56) + href: https://www.osc.ny.gov/state-agencies/payroll-bulletins/state-agencies/1619-new-york-state-paid-family-leave-program-ny-paid-family-leave + - title: New York Department of Financial Services, Decision on premium rate for Paid Family Leave benefits and maximum employee contribution for coverage beginning January 1, 2019 + href: https://www.dfs.ny.gov/apps_and_licensing/health_insurers/pfl_rate_decision_2019_page + - title: New York Department of Financial Services, Decision on premium rate for Paid Family Leave benefits and maximum employee contribution for coverage beginning January 1, 2020 + href: https://www.dfs.ny.gov/apps_and_licensing/health_insurers/pfl_rate_decision_2020_page + - title: New York Department of Financial Services, Decision on premium rate for Paid Family Leave benefits and maximum employee contribution for coverage beginning January 1, 2021 + href: https://www.dfs.ny.gov/apps_and_licensing/health_insurers/pfl_rate_decision_2021_page + - title: New York Department of Financial Services, Decision on premium rate for Paid Family Leave benefits and maximum employee contribution for coverage beginning January 1, 2022 + href: https://www.dfs.ny.gov/apps_and_licensing/health_insurers/pfl_rate_decision_2022 + - title: New York Department of Financial Services, Decision on premium rate for Paid Family Leave benefits and maximum employee contribution for coverage beginning January 1, 2023 + href: https://www.dfs.ny.gov/apps_and_licensing/health_insurers/pfl_rate_decision_2023 - title: New York Workers' Compensation Board, NYS Paid Family Leave enhancements for 2024 (January 5, 2024) href: https://www.wcb.ny.gov/content/main/PressRe/pfl-enhancements-2024.jsp - title: New York Department of Financial Services, Decision on premium rate for Paid Family Leave benefits and maximum employee contribution for coverage beginning January 1, 2025 diff --git a/policyengine_us/parameters/gov/states/ny/tax/payroll/paid_family_leave/employee_rate.yaml b/policyengine_us/parameters/gov/states/ny/tax/payroll/paid_family_leave/employee_rate.yaml index 55a877bc037..c4ca170e87f 100644 --- a/policyengine_us/parameters/gov/states/ny/tax/payroll/paid_family_leave/employee_rate.yaml +++ b/policyengine_us/parameters/gov/states/ny/tax/payroll/paid_family_leave/employee_rate.yaml @@ -1,6 +1,14 @@ description: Employee-side New York Paid Family Leave contribution rate. values: + # Contributions began January 1, 2018. 0000-01-01: 0 + 2018-01-01: 0.00126 + 2019-01-01: 0.00153 + 2020-01-01: 0.0027 + # 2021 and 2022: 0.506% plus a 0.005% risk adjustment for COVID-19 claims. + 2021-01-01: 0.00511 + 2022-01-01: 0.00511 + 2023-01-01: 0.00455 2024-01-01: 0.00373 2025-01-01: 0.00388 2026-01-01: 0.00432 @@ -13,6 +21,18 @@ metadata: reference: - title: New York Workers' Compensation Law Section 209 href: https://www.nysenate.gov/legislation/laws/WKC/209 + - title: New York Department of Financial Services, Decision on premium rate for Paid Family Leave benefits and maximum employee contribution for coverage beginning January 1, 2018 + href: https://www.dfs.ny.gov/apps_and_licensing/health_insurers/pfl_rate_decision_2018_page + - title: New York Department of Financial Services, Decision on premium rate for Paid Family Leave benefits and maximum employee contribution for coverage beginning January 1, 2019 + href: https://www.dfs.ny.gov/apps_and_licensing/health_insurers/pfl_rate_decision_2019_page + - title: New York Department of Financial Services, Decision on premium rate for Paid Family Leave benefits and maximum employee contribution for coverage beginning January 1, 2020 + href: https://www.dfs.ny.gov/apps_and_licensing/health_insurers/pfl_rate_decision_2020_page + - title: New York Department of Financial Services, Decision on premium rate for Paid Family Leave benefits and maximum employee contribution for coverage beginning January 1, 2021 + href: https://www.dfs.ny.gov/apps_and_licensing/health_insurers/pfl_rate_decision_2021_page + - title: New York Department of Financial Services, Decision on premium rate for Paid Family Leave benefits and maximum employee contribution for coverage beginning January 1, 2022 + href: https://www.dfs.ny.gov/apps_and_licensing/health_insurers/pfl_rate_decision_2022 + - title: New York Department of Financial Services, Decision on premium rate for Paid Family Leave benefits and maximum employee contribution for coverage beginning January 1, 2023 + href: https://www.dfs.ny.gov/apps_and_licensing/health_insurers/pfl_rate_decision_2023 - title: New York Workers' Compensation Board, NYS Paid Family Leave enhancements for 2024 (January 5, 2024) href: https://www.wcb.ny.gov/content/main/PressRe/pfl-enhancements-2024.jsp - title: New York Department of Financial Services, Decision on premium rate for Paid Family Leave benefits and maximum employee contribution for coverage beginning January 1, 2025 diff --git a/policyengine_us/parameters/gov/states/or/tax/payroll/statewide_transit/employee_rate.yaml b/policyengine_us/parameters/gov/states/or/tax/payroll/statewide_transit/employee_rate.yaml index 5d7dc65e284..d9e10425fae 100644 --- a/policyengine_us/parameters/gov/states/or/tax/payroll/statewide_transit/employee_rate.yaml +++ b/policyengine_us/parameters/gov/states/or/tax/payroll/statewide_transit/employee_rate.yaml @@ -1,5 +1,7 @@ description: Employee-side Oregon statewide transit tax rate. values: + # Employers began withholding the tax on July 1, 2018. + 0000-01-01: 0 2018-07-01: 0.001 metadata: diff --git a/policyengine_us/parameters/gov/states/ri/tax/payroll/temporary_disability_insurance/employee_rate.yaml b/policyengine_us/parameters/gov/states/ri/tax/payroll/temporary_disability_insurance/employee_rate.yaml index ffed130e368..5bd7a26e018 100644 --- a/policyengine_us/parameters/gov/states/ri/tax/payroll/temporary_disability_insurance/employee_rate.yaml +++ b/policyengine_us/parameters/gov/states/ri/tax/payroll/temporary_disability_insurance/employee_rate.yaml @@ -1,6 +1,13 @@ description: Employee-side Rhode Island TDI contribution rate. values: - 0000-01-01: 0 + # Rhode Island TDI contributions existed before 2018. The model does not encode + # earlier years, so it carries the 2018 value back to 2015, its first year. + 2018-01-01: 0.011 + 2019-01-01: 0.011 + 2020-01-01: 0.013 + 2021-01-01: 0.013 + 2022-01-01: 0.011 + 2023-01-01: 0.011 2024-01-01: 0.012 2025-01-01: 0.013 2026-01-01: 0.011 @@ -12,6 +19,16 @@ metadata: reference: - title: Rhode Island General Laws Section 28-40-1 href: https://webserver.rilegislature.gov/Statutes/TITLE28/28-40/28-40-1_28-40-1.htm + - title: Rhode Island Division of Taxation, Advisory for Tax Professionals ADV 2017-47 (2018 TDI rate and taxable wage base) + href: https://tax.ri.gov/sites/g/files/xkgbur541/files/Advisory/ADV-2017-47.pdf + - title: Rhode Island Division of Taxation, Advisory for Tax Professionals ADV 2019-37 (2019 and 2020 TDI rates and taxable wage bases) + href: http://www.tax.ri.gov/Advisory/ADV_2019_37.pdf + - title: Rhode Island Division of Taxation, Advisory for Tax Professionals ADV 2020-63 (2021 TDI rate and taxable wage base) + href: http://www.tax.ri.gov/Advisory/ADV_2020_63.pdf + - title: Rhode Island Department of Labor and Training, 2022 UI and TDI quick reference + href: https://dlt.ri.gov/sites/g/files/xkgbur571/files/2021-12/quickref.pdf + - title: Rhode Island Department of Labor and Training, 2023 UI and TDI quick reference + href: https://dlt.ri.gov/sites/g/files/xkgbur571/files/2021-12/quickref_0.pdf - title: 2024 Rhode Island tax rates for unemployment insurance and temporary disability insurance href: https://dlt.ri.gov/press-releases/2024-tax-rates-unemployment-insurance-and-temporary-disability-insurance - title: 2025 Rhode Island tax rates for unemployment insurance and temporary disability insurance diff --git a/policyengine_us/parameters/gov/states/ri/tax/payroll/temporary_disability_insurance/taxable_wage_base.yaml b/policyengine_us/parameters/gov/states/ri/tax/payroll/temporary_disability_insurance/taxable_wage_base.yaml index 19bccb52267..6b417c55e20 100644 --- a/policyengine_us/parameters/gov/states/ri/tax/payroll/temporary_disability_insurance/taxable_wage_base.yaml +++ b/policyengine_us/parameters/gov/states/ri/tax/payroll/temporary_disability_insurance/taxable_wage_base.yaml @@ -1,6 +1,13 @@ description: Taxable wage base for Rhode Island TDI employee contributions. values: - 0000-01-01: 0 + # The Rhode Island TDI wage base existed before 2018. The model does not encode + # earlier years, so it carries the 2018 value back to 2015, its first year. + 2018-01-01: 69_300 + 2019-01-01: 71_000 + 2020-01-01: 72_300 + 2021-01-01: 74_000 + 2022-01-01: 81_500 + 2023-01-01: 84_000 2024-01-01: 87_000 2025-01-01: 89_200 2026-01-01: 100_000 @@ -12,6 +19,16 @@ metadata: reference: - title: Rhode Island General Laws Section 28-40-1 href: https://webserver.rilegislature.gov/Statutes/TITLE28/28-40/28-40-1_28-40-1.htm + - title: Rhode Island Division of Taxation, Advisory for Tax Professionals ADV 2017-47 (2018 TDI rate and taxable wage base) + href: https://tax.ri.gov/sites/g/files/xkgbur541/files/Advisory/ADV-2017-47.pdf + - title: Rhode Island Division of Taxation, Advisory for Tax Professionals ADV 2019-37 (2019 and 2020 TDI rates and taxable wage bases) + href: http://www.tax.ri.gov/Advisory/ADV_2019_37.pdf + - title: Rhode Island Division of Taxation, Advisory for Tax Professionals ADV 2020-63 (2021 TDI rate and taxable wage base) + href: http://www.tax.ri.gov/Advisory/ADV_2020_63.pdf + - title: Rhode Island Department of Labor and Training, 2022 UI and TDI quick reference + href: https://dlt.ri.gov/sites/g/files/xkgbur571/files/2021-12/quickref.pdf + - title: Rhode Island Department of Labor and Training, 2023 UI and TDI quick reference + href: https://dlt.ri.gov/sites/g/files/xkgbur571/files/2021-12/quickref_0.pdf - title: 2024 Rhode Island tax rates for unemployment insurance and temporary disability insurance href: https://dlt.ri.gov/press-releases/2024-tax-rates-unemployment-insurance-and-temporary-disability-insurance - title: 2025 Rhode Island tax rates for unemployment insurance and temporary disability insurance diff --git a/policyengine_us/parameters/gov/states/vt/tax/payroll/child_care/employee_rate.yaml b/policyengine_us/parameters/gov/states/vt/tax/payroll/child_care/employee_rate.yaml index 9f292e211cc..a2a0d8f5b7c 100644 --- a/policyengine_us/parameters/gov/states/vt/tax/payroll/child_care/employee_rate.yaml +++ b/policyengine_us/parameters/gov/states/vt/tax/payroll/child_care/employee_rate.yaml @@ -1,5 +1,6 @@ description: Employee-side Vermont Child Care Contribution rate. values: + # Collection began July 1, 2024. 0000-01-01: 0 2024-07-01: 0.0011 @@ -12,3 +13,5 @@ metadata: href: https://legislature.vermont.gov/statutes/fullchapter/32/246 - title: Vermont Child Care Contribution guidance href: https://tax.vermont.gov/sites/tax/files/documents/GB-1326.pdf#page=3 + - title: Vermont Department of Taxes, Child Care Contribution + href: https://tax.vermont.gov/business/child-care-contribution diff --git a/policyengine_us/parameters/gov/states/vt/tax/payroll/child_care/employer_rate.yaml b/policyengine_us/parameters/gov/states/vt/tax/payroll/child_care/employer_rate.yaml index fa10e105b2f..101c6797916 100644 --- a/policyengine_us/parameters/gov/states/vt/tax/payroll/child_care/employer_rate.yaml +++ b/policyengine_us/parameters/gov/states/vt/tax/payroll/child_care/employer_rate.yaml @@ -1,5 +1,6 @@ description: Employer-side Vermont Child Care Contribution rate. values: + # Collection began July 1, 2024. 0000-01-01: 0 2024-07-01: 0.0033 @@ -12,3 +13,5 @@ metadata: href: https://legislature.vermont.gov/statutes/fullchapter/32/246 - title: Vermont Child Care Contribution guidance href: https://tax.vermont.gov/sites/tax/files/documents/GB-1326.pdf#page=3 + - title: Vermont Department of Taxes, Child Care Contribution + href: https://tax.vermont.gov/business/child-care-contribution diff --git a/policyengine_us/tests/core/test_state_payroll_tax_history_invariants.py b/policyengine_us/tests/core/test_state_payroll_tax_history_invariants.py new file mode 100644 index 00000000000..570fdeecf31 --- /dev/null +++ b/policyengine_us/tests/core/test_state_payroll_tax_history_invariants.py @@ -0,0 +1,417 @@ +"""Invariants for the 2018-2027 histories of state employee payroll taxes. + +The tables below copy the rates and wage bases that state agencies published, +from the sources cited in each parameter file, so these tests compare the +model with those publications and not with its own parameters. + +Two tests read the stored parameters without a simulation: + +1. Schedule: in every month from 2015 through each table's last year, every + parameter this history covers equals the published value for that month. + Programs that began after 2015 read zero before their first contribution + date: Connecticut Paid Leave (January 2021), Massachusetts PFML (October + 2019), New York Paid Family Leave (January 2018), the Oregon statewide + transit tax (July 2018) and the Vermont Child Care Contribution (July 2024). + New Jersey's TDI and FLI and Rhode Island's TDI predate 2018. The model does + not encode their earlier years, so 2015-2017 read the 2018 value, an + intended approximation that this test pins. +2. Dates: every stored value of a parameter that an annual rate averages + begins a calendar quarter. The annual rates read only the four quarter + starts, so this keeps them equal to the average of all twelve months. + +Hypothesis draws batches of workers, each with wages, a raise, a state and an +employer headcount; a seeded population of 100 workers adds breadth. Each +batch runs as one vectorized simulation covering SIMULATED_YEARS, which +include each program's partial first year (Oregon 2018, Massachusetts 2019, +Vermont 2024). For every worker and year: + +3. Differential: each contribution equals the published rate, averaged over + all twelve months where a rate starts mid-year, times the published + taxable wages, with New York's annual maximum. +4. Bounds: each contribution lies between zero and its highest monthly rate + times positive wages, and wages at or below zero owe nothing. +5. Monotonicity: no contribution falls when wages rise. +6. Agreement: the employer-total path equals the worker path for + Massachusetts and Vermont when its taxable wages equal the worker's. +7. Geography: outside its state, each contribution is zero. +""" + +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 + +TOLERANCE = 0.01 # dollars +RATE_TOLERANCE = 1e-12 +FIRST_YEAR = 2015 # policyengine_us.tools.parameters.FIRST_MODELED_YEAR +MONTHS = range(1, 13) + +# Connecticut Paid Leave: 0.5% of wages up to the Social Security wage base +# from January 1, 2021 (CGS 31-49g(b)(1)). +CT_RATE, CT_START = 0.005, (2021, 1) + +# Massachusetts PFML, Department of Family and Medical Leave: the family and +# medical leave rates from each month. Contributions began October 1, 2019. +# The employer may withhold all of the family rate and 40% of the medical rate; +# an employer with 25 or more covered individuals pays the other 60%. +MA_SCHEDULE = ( + ((2019, 10), 0.0013, 0.0062), + ((2022, 1), 0.0012, 0.0056), + ((2023, 1), 0.0011, 0.0052), + ((2024, 1), 0.0018, 0.0070), +) +MA_MEDICAL_EMPLOYEE_SHARE = 0.4 +MA_EMPLOYER_THRESHOLD = 25 +MA_LAST_YEAR = 2026 + +# New Jersey Department of Labor and Workforce Development, employer rate +# information: worker TDI rate, worker FLI rate, TDI and FLI worker wage base. +NJ_WORKER = { + 2018: (0.0019, 0.0009, 33_700), + 2019: (0.0017, 0.0008, 34_400), + 2020: (0.0026, 0.0016, 134_900), + 2021: (0.0047, 0.0028, 138_200), + 2022: (0.0014, 0.0014, 151_900), + 2023: (0, 0.0006, 156_800), + 2024: (0, 0.0009, 161_400), + 2025: (0.0023, 0.0033, 165_400), + 2026: (0.0019, 0.0023, 171_100), + 2027: (0.0024, 0.0024, 177_100), +} + +# New York Paid Family Leave, Department of Financial Services rate decisions: +# employee rate and annual maximum contribution. Contributions began in 2018. +NY_PFL = { + 2018: (0.00126, 85.56), + 2019: (0.00153, 107.97), + 2020: (0.0027, 196.72), + 2021: (0.00511, 385.34), + 2022: (0.00511, 423.71), + 2023: (0.00455, 399.43), + 2024: (0.00373, 333.25), + 2025: (0.00388, 354.53), + 2026: (0.00432, 411.91), + 2027: (0.00452, 451.81), +} + +# Oregon statewide transit tax: 0.1% of wages from July 1, 2018 (ORS 320.550; +# Oregon Department of Revenue). +OR_TRANSIT_RATE, OR_TRANSIT_START = 0.001, (2018, 7) + +# Rhode Island TDI, Division of Taxation advisories and Department of Labor and +# Training quick references: employee rate and taxable wage base. +RI_TDI = { + 2018: (0.011, 69_300), + 2019: (0.011, 71_000), + 2020: (0.013, 72_300), + 2021: (0.013, 74_000), + 2022: (0.011, 81_500), + 2023: (0.011, 84_000), + 2024: (0.012, 87_000), + 2025: (0.013, 89_200), + 2026: (0.011, 100_000), +} + +# Vermont Child Care Contribution, Department of Taxes: 0.44% of wages from +# July 1, 2024, of which the employer may withhold 0.11% from the employee. +VT_EMPLOYEE_RATE, VT_EMPLOYER_RATE, VT_START = 0.0011, 0.0033, (2024, 7) + +LAST_YEAR = 2026 # last year of the CT, OR and VT checks + +# Social Security contribution and benefit base, Social Security Administration. +SS_WAGE_BASE = {2018: 128_400, 2019: 132_900, 2024: 168_600} + +SIMULATED_YEARS = (2018, 2019, 2024) +STATES = ["CT", "MA", "NJ", "NY", "OR", "RI", "VT", "NH"] + +P = system.parameters.gov.states + + +def _ma_rates(year_month): + family = medical = 0 + for start, family_rate, medical_rate in MA_SCHEDULE: + if year_month >= start: + family, medical = family_rate, medical_rate + return family, medical + + +def _from(start, year_month, rate): + return rate if year_month >= start else 0 + + +def _carried_back(table, year): + # Years before 2018 are not encoded; the model carries 2018 back to 2015. + return table[max(year, 2018)] + + +def _monthly(year, rate_in_month): + return [rate_in_month((year, month)) for month in MONTHS] + + +def _published_monthly_rates(year): + """Rates in force in each month of the year, by contribution variable.""" + ma = [_ma_rates((year, month)) for month in MONTHS] + tdi, fli, _ = NJ_WORKER[year] + ny_rate, _ = NY_PFL.get(year, (0, 0)) + ri_rate, _ = RI_TDI[year] + return { + "ct_employee_paid_leave_contribution": _monthly( + year, lambda ym: _from(CT_START, ym, CT_RATE) + ), + "ma_employee_paid_leave_contribution": [ + family + MA_MEDICAL_EMPLOYEE_SHARE * medical for family, medical in ma + ], + "ma_employer_paid_leave_contribution": [ + (1 - MA_MEDICAL_EMPLOYEE_SHARE) * medical for _, medical in ma + ], + "nj_employee_temporary_disability_insurance_contribution": [tdi] * 12, + "nj_employee_family_leave_insurance_contribution": [fli] * 12, + "ny_employee_paid_family_leave_contribution": [ny_rate] * 12, + "or_employee_statewide_transit_tax": _monthly( + year, lambda ym: _from(OR_TRANSIT_START, ym, OR_TRANSIT_RATE) + ), + "ri_employee_temporary_disability_insurance_contribution": [ri_rate] * 12, + "vt_employee_child_care_contribution": _monthly( + year, lambda ym: _from(VT_START, ym, VT_EMPLOYEE_RATE) + ), + "vt_employer_child_care_contribution": _monthly( + year, lambda ym: _from(VT_START, ym, VT_EMPLOYER_RATE) + ), + } + + +STATE_OF = { + "ct_employee_paid_leave_contribution": "CT", + "ma_employee_paid_leave_contribution": "MA", + "ma_employer_paid_leave_contribution": "MA", + "nj_employee_temporary_disability_insurance_contribution": "NJ", + "nj_employee_family_leave_insurance_contribution": "NJ", + "ny_employee_paid_family_leave_contribution": "NY", + "or_employee_statewide_transit_tax": "OR", + "ri_employee_temporary_disability_insurance_contribution": "RI", + "vt_employee_child_care_contribution": "VT", + "vt_employer_child_care_contribution": "VT", +} + + +def _expected(variable, year, wages, headcount): + """Published rate times published taxable wages, for workers in the state.""" + positive = np.maximum(wages, 0) + rate = np.mean(_published_monthly_rates(year)[variable]) + if variable.startswith(("ct_", "ma_")): + taxable = np.minimum(positive, SS_WAGE_BASE[year]) + elif variable.startswith("nj_"): + taxable = np.minimum(positive, NJ_WORKER[year][2]) + elif variable.startswith("ri_"): + taxable = np.minimum(positive, RI_TDI[year][1]) + else: + taxable = positive + amount = rate * taxable + if variable == "ma_employer_paid_leave_contribution": + amount = np.where(headcount >= MA_EMPLOYER_THRESHOLD, amount, 0) + if variable.startswith("ny_"): + amount = np.minimum(amount, NY_PFL.get(year, (0, 0))[1]) + return amount + + +def _instants(last_year): + for year in range(FIRST_YEAR, last_year + 1): + for month in MONTHS: + yield year, month, f"{year}-{month:02d}-01" + + +def test_stored_histories_match_published_tables_in_every_month(): + ma = P.ma.tax.payroll.paid_leave + nj = P.nj.tax.payroll + ny = P.ny.tax.payroll.paid_family_leave + oregon = getattr(P, "or").tax.payroll.statewide_transit + ri = P.ri.tax.payroll.temporary_disability_insurance + vt = P.vt.tax.payroll.child_care + for year, month, instant in _instants(LAST_YEAR): + year_month = (year, month) + ct_rate = _from(CT_START, year_month, CT_RATE) + assert P.ct.tax.payroll.paid_leave.employee_rate(instant) == ct_rate + assert oregon.employee_rate(instant) == _from( + OR_TRANSIT_START, year_month, OR_TRANSIT_RATE + ) + assert vt.employee_rate(instant) == _from( + VT_START, year_month, VT_EMPLOYEE_RATE + ) + assert vt.employer_rate(instant) == _from( + VT_START, year_month, VT_EMPLOYER_RATE + ) + ri_rate, ri_base = _carried_back(RI_TDI, year) + assert ri.employee_rate(instant) == ri_rate + assert ri.taxable_wage_base(instant) == ri_base + for year, month, instant in _instants(MA_LAST_YEAR): + family, medical = _ma_rates((year, month)) + assert ma.family_rate(instant) == family + assert ma.medical_rate(instant) == medical + if (year, month) >= MA_SCHEDULE[0][0]: + assert ma.medical_employee_share(instant) == MA_MEDICAL_EMPLOYEE_SHARE + assert ma.employer_headcount_threshold(instant) == MA_EMPLOYER_THRESHOLD + for year, month, instant in _instants(2027): + tdi, fli, base = _carried_back(NJ_WORKER, year) + assert nj.temporary_disability_insurance.employee_rate(instant) == tdi + assert nj.family_leave_insurance.employee_rate(instant) == fli + assert nj.temporary_disability_insurance.taxable_wage_base(instant) == base + ny_rate, ny_cap = NY_PFL.get(year, (0, 0)) + assert ny.employee_rate(instant) == ny_rate + assert ny.annual_max_contribution(instant) == ny_cap + + +def test_quarter_averaged_parameters_change_only_at_quarter_starts(): + # A value dated inside a quarter would need the annual rate to read more + # than the four quarter starts. + ma = P.ma.tax.payroll.paid_leave + averaged = [ + ma.family_rate, + ma.medical_rate, + ma.medical_employee_share, + ma.employer_headcount_threshold, + getattr(P, "or").tax.payroll.statewide_transit.employee_rate, + P.vt.tax.payroll.child_care.employee_rate, + P.vt.tax.payroll.child_care.employer_rate, + ] + for parameter in averaged: + for entry in parameter.values_list: + _, month, day = entry.instant_str.split("-") + assert int(month) in (1, 4, 7, 10) and day == "01", ( + parameter.name, + entry.instant_str, + ) + + +wages = st.one_of( + st.integers(-50_000, 0).map(float), + st.integers(0, 400_000).map(float), +) +workers = st.fixed_dictionaries( + { + "wages": wages, + "raise": st.integers(0, 100_000).map(float), + "state": st.sampled_from(STATES), + "headcount": st.integers(0, 60), + } +) + +SEED = 20261107 + + +def _seeded_workers(n=100): + rng = np.random.default_rng(SEED) + return [ + { + "wages": float(rng.integers(-50_000, 400_001)), + "raise": float(rng.integers(0, 100_001)), + "state": str(rng.choice(STATES)), + "headcount": int(rng.integers(0, 61)), + } + for _ in range(n) + ] + + +def _people(batch): + # Each worker appears twice, at their wages and after their raise. + return [ + {**worker, "wages": wages, "twin": i} + for i, worker in enumerate(batch) + for wages in (worker["wages"], worker["wages"] + worker["raise"]) + ] + + +def _situation(people): + def every_year(value): + return {year: value for year in SIMULATED_YEARS} + + situation = {"people": {}, "households": {}} + for i, person in enumerate(people): + positive = max(person["wages"], 0) + situation["people"][f"person_{i}"] = { + "employment_income": every_year(person["wages"]), + "employer_headcount": every_year(person["headcount"]), + "employer_total_ma_paid_leave_taxable_wages": { + year: min(positive, SS_WAGE_BASE[year]) for year in SIMULATED_YEARS + }, + "employer_total_vt_child_care_contribution_wages": every_year(positive), + } + situation["households"][f"household_{i}"] = { + "members": [f"person_{i}"], + "state_code": every_year(person["state"]), + } + return situation + + +def _check(batch): + people = _people(batch) + wages = np.array([person["wages"] for person in people]) + headcount = np.array([person["headcount"] for person in people]) + state = np.array([person["state"] for person in people]) + positive = np.maximum(wages, 0) + base, raised = np.arange(0, len(people), 2), np.arange(1, len(people), 2) + + sim = Simulation(situation=_situation(people)) + for year in SIMULATED_YEARS: + monthly = _published_monthly_rates(year) + computed = { + variable: np.asarray(sim.calculate(variable, year), dtype=float) + for variable in STATE_OF + } + for variable, amount in computed.items(): + in_state = state == STATE_OF[variable] + + # 3. Differential against the published tables. + expected = _expected(variable, year, wages, headcount) + np.testing.assert_allclose( + amount[in_state], + expected[in_state], + atol=TOLERANCE, + rtol=0, + err_msg=f"{variable} {year}", + ) + + # 4. Bounds. + top_rate = max(monthly[variable]) + assert (amount >= 0).all(), (variable, year) + assert (amount <= top_rate * positive + TOLERANCE).all(), (variable, year) + np.testing.assert_array_equal(amount[wages <= 0], 0) + + # 5. Monotonicity. + assert (amount[raised] >= amount[base] - TOLERANCE).all(), (variable, year) + + # 7. Geography. + np.testing.assert_array_equal(amount[~in_state], 0) + + # 6. Agreement of the employer-total and worker paths. + employer_total = np.asarray( + sim.calculate("employer_total_additional_state_payroll_tax", year), + dtype=float, + ) + for state_code, variable in ( + ("MA", "ma_employer_paid_leave_contribution"), + ("VT", "vt_employer_child_care_contribution"), + ): + in_state = state == state_code + np.testing.assert_allclose( + employer_total[in_state], + computed[variable][in_state], + atol=TOLERANCE, + rtol=0, + err_msg=f"{variable} {year}", + ) + + +@settings( + max_examples=4, + deadline=None, + suppress_health_check=[HealthCheck.too_slow, HealthCheck.data_too_large], +) +@given(st.lists(workers, min_size=1, max_size=12)) +def test_state_payroll_tax_history_invariants(batch): + _check(batch) + + +def test_state_payroll_tax_history_invariants_seeded_population(): + _check(_seeded_workers()) diff --git a/policyengine_us/tests/policy/baseline/gov/states/ct/tax/payroll/ct_employee_state_payroll_tax.yaml b/policyengine_us/tests/policy/baseline/gov/states/ct/tax/payroll/ct_employee_state_payroll_tax.yaml new file mode 100644 index 00000000000..6d373bc4835 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ct/tax/payroll/ct_employee_state_payroll_tax.yaml @@ -0,0 +1,32 @@ +# Connecticut Paid Leave employee contributions. CGS 31-49g(b)(1) starts them on +# January 1, 2021, at 0.5% of wages up to the Social Security wage base. + +- name: Connecticut collects no paid leave contribution in 2020, before contributions began. + period: 2020 + input: + employment_income: 50_000 + state_code: CT + output: + ct_employee_paid_leave_contribution: 0 + ct_employee_state_payroll_tax: 0 + employee_state_payroll_tax: 0 + +- name: Connecticut paid leave contribution in 2021 is 0.5% of wages. + period: 2021 + input: + employment_income: 50_000 + state_code: CT + output: + # 0.5% * 50,000 = 250. + ct_employee_paid_leave_contribution: 250 + ct_employee_state_payroll_tax: 250 + employee_state_payroll_tax: 250 + +- name: Connecticut paid leave contribution in 2022 stops at the 147,000 Social Security wage base. + period: 2022 + input: + employment_income: 200_000 + state_code: CT + output: + # 0.5% * 147,000 = 735. + ct_employee_paid_leave_contribution: 735 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ma/tax/payroll/ma_employee_state_payroll_tax.yaml b/policyengine_us/tests/policy/baseline/gov/states/ma/tax/payroll/ma_employee_state_payroll_tax.yaml new file mode 100644 index 00000000000..4fe202f7c90 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ma/tax/payroll/ma_employee_state_payroll_tax.yaml @@ -0,0 +1,68 @@ +# Massachusetts employee PFML contributions before 2024. Contributions began +# October 1, 2019. The employee rate is 0.378% from then through 2021, 0.344% +# in 2022 and 0.318% in 2023, on wages up to the Social Security wage base. + +- name: Massachusetts collects no PFML contribution in 2018, before contributions began. + period: 2018 + input: + employment_income: 60_000 + state_code: MA + output: + ma_employee_paid_leave_contribution: 0 + ma_employee_state_payroll_tax: 0 + employee_state_payroll_tax: 0 + +- name: Massachusetts PFML contribution in 2019 covers wages from October 1. + period: 2019 + absolute_error_margin: 0.01 + input: + employment_income: 60_000 + state_code: MA + output: + # 0.378% * 3/12 * 60,000 = 56.70. + ma_employee_paid_leave_contribution: 56.70 + ma_employee_state_payroll_tax: 56.70 + employee_state_payroll_tax: 56.70 + +- name: Massachusetts PFML contribution in 2021 is 0.378% of wages. + period: 2021 + absolute_error_margin: 0.01 + input: + employment_income: 60_000 + state_code: MA + output: + # 0.378% * 60,000 = 226.80. + ma_employee_paid_leave_contribution: 226.80 + ma_employee_state_payroll_tax: 226.80 + employee_state_payroll_tax: 226.80 + +- name: Massachusetts PFML contribution in 2021 stops at the 142,800 Social Security wage base. + period: 2021 + absolute_error_margin: 0.01 + input: + employment_income: 200_000 + state_code: MA + output: + ma_paid_leave_taxable_wages: 142_800 + # 0.378% * 142,800 = 539.78. + ma_employee_paid_leave_contribution: 539.78 + +- name: Massachusetts PFML contribution in 2022 is 0.344% of wages. + period: 2022 + absolute_error_margin: 0.01 + input: + employment_income: 60_000 + state_code: MA + output: + # 0.344% * 60,000 = 206.40. + ma_employee_paid_leave_contribution: 206.40 + +- name: Massachusetts PFML contribution in 2023 is 0.318% of wages. + period: 2023 + absolute_error_margin: 0.01 + input: + employment_income: 60_000 + state_code: MA + output: + # 0.318% * 60,000 = 190.80. + ma_employee_paid_leave_contribution: 190.80 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ma/tax/payroll/paid_leave/ma_employee_paid_leave_contribution_rate.yaml b/policyengine_us/tests/policy/baseline/gov/states/ma/tax/payroll/paid_leave/ma_employee_paid_leave_contribution_rate.yaml new file mode 100644 index 00000000000..5d2f110d7fa --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ma/tax/payroll/paid_leave/ma_employee_paid_leave_contribution_rate.yaml @@ -0,0 +1,64 @@ +# Massachusetts PFML rate an employer may withhold from wages: the whole family +# leave rate plus 40% of the medical leave rate. Contributions began October 1, +# 2019. DFML's published rates: 0.13% family and 0.62% medical from then through +# 2021, 0.12% and 0.56% in 2022, 0.11% and 0.52% in 2023, and 0.18% and 0.70% +# from 2024. + +- name: Massachusetts PFML employee rate is zero in 2018, before contributions began. + period: 2018 + input: + state_code: MA + output: + ma_employee_paid_leave_contribution_rate: 0 + +- name: Massachusetts PFML employee rate in 2019 counts only October through December. + period: 2019 + absolute_error_margin: 0.0000001 + input: + state_code: MA + output: + # (0.13% + 40% * 0.62%) * 3/12 = 0.378% * 3/12 = 0.0945%. + ma_employee_paid_leave_contribution_rate: 0.000945 + +- name: Massachusetts PFML employee rate in 2021 is 0.378%. + period: 2021 + absolute_error_margin: 0.0000001 + input: + state_code: MA + output: + # 0.13% + 40% * 0.62% = 0.378%. + ma_employee_paid_leave_contribution_rate: 0.00378 + +- name: Massachusetts PFML employee rate in 2022 is 0.344%. + period: 2022 + absolute_error_margin: 0.0000001 + input: + state_code: MA + output: + # 0.12% + 40% * 0.56% = 0.344%. + ma_employee_paid_leave_contribution_rate: 0.00344 + +- name: Massachusetts PFML employee rate in 2023 is 0.318%. + period: 2023 + absolute_error_margin: 0.0000001 + input: + state_code: MA + output: + # 0.11% + 40% * 0.52% = 0.318%. + ma_employee_paid_leave_contribution_rate: 0.00318 + +- name: Massachusetts PFML employee rate in 2024 is 0.46%. + period: 2024 + absolute_error_margin: 0.0000001 + input: + state_code: MA + output: + # 0.18% + 40% * 0.70% = 0.46%. + ma_employee_paid_leave_contribution_rate: 0.0046 + +- name: Massachusetts PFML employee rate is zero outside Massachusetts. + period: 2021 + input: + state_code: NH + output: + ma_employee_paid_leave_contribution_rate: 0 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ma/tax/payroll/paid_leave/ma_employer_paid_leave_contribution_rate.yaml b/policyengine_us/tests/policy/baseline/gov/states/ma/tax/payroll/paid_leave/ma_employer_paid_leave_contribution_rate.yaml new file mode 100644 index 00000000000..5d0d0d90b67 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ma/tax/payroll/paid_leave/ma_employer_paid_leave_contribution_rate.yaml @@ -0,0 +1,92 @@ +# Massachusetts PFML employer share: 60% of the medical leave rate, owed by +# employers with 25 or more covered individuals (employer headcount stands in +# for covered individuals). Contributions began October 1, 2019, with a 0.62% +# medical rate through 2021, 0.56% in 2022 and 0.52% in 2023. + +- name: Massachusetts PFML employer rate is zero in 2018, before contributions began. + period: 2018 + input: + employer_headcount: 100 + state_code: MA + output: + ma_employer_paid_leave_contribution_rate: 0 + +- name: Massachusetts PFML employer rate in 2019 counts only October through December. + period: 2019 + absolute_error_margin: 0.0000001 + input: + employment_income: 60_000 + employer_headcount: 25 + state_code: MA + output: + # 60% * 0.62% * 3/12 = 0.372% * 3/12 = 0.093%. + ma_employer_paid_leave_contribution_rate: 0.00093 + # 0.093% * 60,000 = 55.80. + ma_employer_paid_leave_contribution: 55.80 + ma_employer_additional_state_payroll_tax: 55.80 + employer_additional_state_payroll_tax: 55.80 + +- name: Massachusetts PFML employer rate in 2019 is zero below 25 covered individuals. + period: 2019 + absolute_error_margin: 0.01 + input: + employment_income: 60_000 + employer_headcount: 24 + state_code: MA + output: + ma_employer_paid_leave_contribution_rate: 0 + ma_employer_paid_leave_contribution: 0 + # The employee share does not depend on employer size: 0.0945% * 60,000. + ma_employee_paid_leave_contribution: 56.70 + +- name: Massachusetts PFML employer rate in 2021 is 0.372%. + period: 2021 + absolute_error_margin: 0.0000001 + input: + employer_headcount: 25 + state_code: MA + output: + # 60% * 0.62% = 0.372%. + ma_employer_paid_leave_contribution_rate: 0.00372 + +- name: Massachusetts PFML employer rate in 2022 is 0.336%. + period: 2022 + absolute_error_margin: 0.0000001 + input: + employer_headcount: 50 + state_code: MA + output: + # 60% * 0.56% = 0.336%. + ma_employer_paid_leave_contribution_rate: 0.00336 + +- name: Massachusetts PFML employer rate in 2023 is 0.312%. + period: 2023 + absolute_error_margin: 0.0000001 + input: + employer_headcount: 50 + state_code: MA + output: + # 60% * 0.52% = 0.312%. + ma_employer_paid_leave_contribution_rate: 0.00312 + +- name: Massachusetts employer-total PFML in 2019 applies the October-to-December share. + period: 2019 + absolute_error_margin: 0.01 + input: + employer_headcount: 30 + employer_total_ma_paid_leave_taxable_wages: 1_000_000 + state_code: MA + output: + # 0.093% * 1,000,000 = 930. + employer_total_additional_state_payroll_tax: 930 + +- name: Massachusetts employer-total PFML in 2022 applies the 0.336% employer rate. + period: 2022 + absolute_error_margin: 0.01 + input: + employer_headcount: 30 + employer_total_ma_paid_leave_taxable_wages: 1_000_000 + state_code: MA + output: + # 0.336% * 1,000,000 = 3,360. + employer_total_additional_state_payroll_tax: 3_360 diff --git a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/payroll/nj_employee_state_payroll_tax.yaml b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/payroll/nj_employee_state_payroll_tax.yaml index e45495c1e5a..eb49c8dc205 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/payroll/nj_employee_state_payroll_tax.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/payroll/nj_employee_state_payroll_tax.yaml @@ -276,3 +276,62 @@ # NJDOL's 2027 TDI and FLI taxable wage base for workers is $177,100. nj_temporary_disability_insurance_taxable_wages: 177_100 nj_family_leave_insurance_taxable_wages: 177_100 + +# Worker TDI and FLI rates and wage bases from NJDOL's employer rate information +# page. Through 2019 the TDI and FLI worker wage base equals the UI wage base. + +- name: New Jersey worker contributions in 2018 share the 33,700 wage base. + period: 2018 + absolute_error_margin: 0.01 + input: + employment_income: 50_000 + state_code: NJ + output: + nj_temporary_disability_insurance_taxable_wages: 33_700 + nj_family_leave_insurance_taxable_wages: 33_700 + # TDI: 0.19% * 33,700 = 64.03. + nj_employee_temporary_disability_insurance_contribution: 64.03 + # FLI: 0.09% * 33,700 = 30.33. + nj_employee_family_leave_insurance_contribution: 30.33 + # UI: 0.3825% * 33,700 = 128.9025; workforce: 0.0425% * 33,700 = 14.3225. + # 64.03 + 30.33 + 128.9025 + 14.3225 = 237.585. + nj_employee_state_payroll_tax: 237.585 + employee_state_payroll_tax: 237.585 + +- name: New Jersey worker TDI and FLI in 2021 stop at the 138,200 wage base. + period: 2021 + absolute_error_margin: 0.01 + input: + employment_income: 150_000 + state_code: NJ + output: + nj_temporary_disability_insurance_taxable_wages: 138_200 + # TDI: 0.47% * 138,200 = 649.54. + nj_employee_temporary_disability_insurance_contribution: 649.54 + # FLI: 0.28% * 138,200 = 386.96. + nj_employee_family_leave_insurance_contribution: 386.96 + # UI and workforce: (0.3825% + 0.0425%) * 36,200 = 153.85. + # 649.54 + 386.96 + 153.85 = 1,190.35. + nj_employee_state_payroll_tax: 1_190.35 + +- name: New Jersey charged workers no TDI in 2023, and FLI was 0.06%. + period: 2023 + absolute_error_margin: 0.01 + input: + employment_income: 50_000 + state_code: NJ + output: + nj_employee_temporary_disability_insurance_contribution: 0 + # FLI: 0.06% * 50,000 = 30. + nj_employee_family_leave_insurance_contribution: 30 + +- name: New Jersey 2027 worker TDI and FLI rates are each 0.24%. + period: 2027 + absolute_error_margin: 0.01 + input: + employment_income: 50_000 + state_code: NJ + output: + # 0.24% * 50,000 = 120. + nj_employee_temporary_disability_insurance_contribution: 120 + nj_employee_family_leave_insurance_contribution: 120 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ny/tax/payroll/paid_family_leave/ny_employee_paid_family_leave_contribution.yaml b/policyengine_us/tests/policy/baseline/gov/states/ny/tax/payroll/paid_family_leave/ny_employee_paid_family_leave_contribution.yaml index b94764f17c4..3859971ca45 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ny/tax/payroll/paid_family_leave/ny_employee_paid_family_leave_contribution.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ny/tax/payroll/paid_family_leave/ny_employee_paid_family_leave_contribution.yaml @@ -63,3 +63,102 @@ output: # 0.452% * 100,000 = 452.00, capped at 451.81. ny_employee_paid_family_leave_contribution: 451.81 + +# Contributions began January 1, 2018. DFS set the rate and annual maximum for +# each year: 0.126% and 85.56 in 2018, 0.153% and 107.97 in 2019, 0.270% and +# 196.72 in 2020, 0.511% and 385.34 in 2021, 0.511% and 423.71 in 2022, and +# 0.455% and 399.43 in 2023. + +- name: New York collects no Paid Family Leave contribution in 2017, before the program began. + period: 2017 + input: + employment_income: 60_000 + state_code: NY + output: + ny_employee_paid_family_leave_contribution: 0 + # Disability Benefits: min(0.5% * 60,000, 31.20) = 31.20. + ny_employee_state_payroll_tax: 31.20 + employee_state_payroll_tax: 31.20 + +- name: New York Paid Family Leave 2018 contribution is 0.126% of wages. + period: 2018 + absolute_error_margin: 0.01 + input: + employment_income: 60_000 + state_code: NY + output: + # 0.126% * 60,000 = 75.60, below the 2018 cap of 85.56. + ny_employee_paid_family_leave_contribution: 75.60 + # 75.60 + 31.20 Disability Benefits = 106.80. + ny_employee_state_payroll_tax: 106.80 + employee_state_payroll_tax: 106.80 + +- name: New York Paid Family Leave 2018 contribution stops at the 85.56 annual maximum. + period: 2018 + input: + employment_income: 100_000 + state_code: NY + output: + # 0.126% * 100,000 = 126.00, capped at 85.56. + ny_employee_paid_family_leave_contribution: 85.56 + +- name: New York Paid Family Leave 2019 contribution is 0.153% of wages. + period: 2019 + absolute_error_margin: 0.01 + input: + employment_income: 60_000 + state_code: NY + output: + # 0.153% * 60,000 = 91.80, below the 2019 cap of 107.97. + ny_employee_paid_family_leave_contribution: 91.80 + +- name: New York Paid Family Leave 2020 contribution is 0.270% of wages. + period: 2020 + absolute_error_margin: 0.01 + input: + employment_income: 60_000 + state_code: NY + output: + # 0.270% * 60,000 = 162.00, below the 2020 cap of 196.72. + ny_employee_paid_family_leave_contribution: 162.00 + +- name: New York Paid Family Leave 2021 contribution is 0.511% of wages. + period: 2021 + absolute_error_margin: 0.01 + input: + employment_income: 60_000 + state_code: NY + output: + # 0.511% * 60,000 = 306.60, below the 2021 cap of 385.34. + ny_employee_paid_family_leave_contribution: 306.60 + +- name: New York Paid Family Leave 2021 contribution stops at the 385.34 annual maximum. + period: 2021 + input: + employment_income: 100_000 + state_code: NY + output: + # 0.511% * 100,000 = 511.00, capped at 385.34. + ny_employee_paid_family_leave_contribution: 385.34 + +- name: New York Paid Family Leave 2022 contribution stops at the 423.71 annual maximum. + period: 2022 + input: + employment_income: 100_000 + state_code: NY + output: + # 0.511% * 100,000 = 511.00, capped at 423.71. + ny_employee_paid_family_leave_contribution: 423.71 + +- name: New York Paid Family Leave 2023 contribution is 0.455% of wages. + period: 2023 + absolute_error_margin: 0.01 + input: + employment_income: 60_000 + state_code: NY + output: + # 0.455% * 60,000 = 273.00, below the 2023 cap of 399.43. + ny_employee_paid_family_leave_contribution: 273.00 + # 273.00 + 31.20 Disability Benefits = 304.20. + ny_employee_state_payroll_tax: 304.20 + employee_state_payroll_tax: 304.20 diff --git a/policyengine_us/tests/policy/baseline/gov/states/or/tax/payroll/or_employee_state_payroll_tax.yaml b/policyengine_us/tests/policy/baseline/gov/states/or/tax/payroll/or_employee_state_payroll_tax.yaml index e389a52643c..36acbf256b8 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/or/tax/payroll/or_employee_state_payroll_tax.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/or/tax/payroll/or_employee_state_payroll_tax.yaml @@ -55,3 +55,28 @@ or_employee_statewide_transit_tax: 50 or_employee_state_payroll_tax: 350 employee_state_payroll_tax: 350 + +# Employers began withholding the statewide transit tax on July 1, 2018 +# (Oregon DOR, Statewide Transit Tax). + +- name: Oregon collects no statewide transit tax in 2017, before withholding began. + period: 2017 + input: + employment_income: 50_000 + state_code: OR + output: + or_employee_statewide_transit_tax: 0 + or_employee_state_payroll_tax: 0 + employee_state_payroll_tax: 0 + +- name: Oregon statewide transit tax in 2018 covers wages from July 1. + period: 2018 + absolute_error_margin: 0.01 + input: + employment_income: 50_000 + state_code: OR + output: + # 0.1% * 6/12 * 50,000 = 25. + or_employee_statewide_transit_tax: 25 + or_employee_state_payroll_tax: 25 + employee_state_payroll_tax: 25 diff --git a/policyengine_us/tests/policy/baseline/gov/states/or/tax/payroll/statewide_transit/or_employee_statewide_transit_tax_rate.yaml b/policyengine_us/tests/policy/baseline/gov/states/or/tax/payroll/statewide_transit/or_employee_statewide_transit_tax_rate.yaml new file mode 100644 index 00000000000..d384d07f203 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/or/tax/payroll/statewide_transit/or_employee_statewide_transit_tax_rate.yaml @@ -0,0 +1,32 @@ +# Oregon statewide transit tax: 0.1% of wages, withheld from July 1, 2018. + +- name: Oregon statewide transit tax rate is zero in 2017, before withholding began. + period: 2017 + input: + state_code: OR + output: + or_employee_statewide_transit_tax_rate: 0 + +- name: Oregon statewide transit tax rate in 2018 counts only July through December. + period: 2018 + absolute_error_margin: 0.0000001 + input: + state_code: OR + output: + # 0.1% * 6/12 = 0.05%. + or_employee_statewide_transit_tax_rate: 0.0005 + +- name: Oregon statewide transit tax rate is 0.1% in 2019. + period: 2019 + absolute_error_margin: 0.0000001 + input: + state_code: OR + output: + or_employee_statewide_transit_tax_rate: 0.001 + +- name: Oregon statewide transit tax rate is zero outside Oregon. + period: 2019 + input: + state_code: WA + output: + or_employee_statewide_transit_tax_rate: 0 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ri/tax/payroll/temporary_disability_insurance/ri_employee_temporary_disability_insurance_contribution.yaml b/policyengine_us/tests/policy/baseline/gov/states/ri/tax/payroll/temporary_disability_insurance/ri_employee_temporary_disability_insurance_contribution.yaml index 1173b091488..8db4428f2e4 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ri/tax/payroll/temporary_disability_insurance/ri_employee_temporary_disability_insurance_contribution.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ri/tax/payroll/temporary_disability_insurance/ri_employee_temporary_disability_insurance_contribution.yaml @@ -40,3 +40,69 @@ ri_temporary_disability_insurance_taxable_wages: 89_200 # 1.3% * 89,200 = 1,159.60, the 2025 maximum contribution DLT announced. ri_employee_temporary_disability_insurance_contribution: 1_159.60 + +# 2018 to 2023 rates and wage bases from the Division of Taxation's annual +# advisories (ADV 2017-47, 2019-37 and 2020-63) and DLT's quick references. + +- name: Rhode Island 2018 TDI contribution stops at the 69,300 taxable wage base. + period: 2018 + absolute_error_margin: 0.01 + input: + employment_income: 100_000 + state_code: RI + output: + ri_temporary_disability_insurance_taxable_wages: 69_300 + # 1.1% * 69,300 = 762.30, the 2018 maximum in ADV 2017-47. + ri_employee_temporary_disability_insurance_contribution: 762.30 + ri_employee_state_payroll_tax: 762.30 + employee_state_payroll_tax: 762.30 + +- name: Rhode Island 2020 TDI contribution is 1.3% of wages. + period: 2020 + absolute_error_margin: 0.01 + input: + employment_income: 60_000 + state_code: RI + output: + # 1.3% * 60,000 = 780.00. + ri_employee_temporary_disability_insurance_contribution: 780.00 + +- name: Rhode Island 2020 TDI contribution stops at the 72,300 taxable wage base. + period: 2020 + absolute_error_margin: 0.01 + input: + employment_income: 100_000 + state_code: RI + output: + # 1.3% * 72,300 = 939.90, the 2020 maximum in ADV 2019-37. + ri_employee_temporary_disability_insurance_contribution: 939.90 + +- name: Rhode Island 2021 TDI contribution stops at the 74,000 taxable wage base. + period: 2021 + absolute_error_margin: 0.01 + input: + employment_income: 100_000 + state_code: RI + output: + # 1.3% * 74,000 = 962.00, the 2021 maximum in ADV 2020-63. + ri_employee_temporary_disability_insurance_contribution: 962.00 + +- name: Rhode Island 2022 TDI contribution stops at the 81,500 taxable wage base. + period: 2022 + absolute_error_margin: 0.01 + input: + employment_income: 100_000 + state_code: RI + output: + # 1.1% * 81,500 = 896.50. + ri_employee_temporary_disability_insurance_contribution: 896.50 + +- name: Rhode Island 2023 TDI contribution stops at the 84,000 taxable wage base. + period: 2023 + absolute_error_margin: 0.01 + input: + employment_income: 100_000 + state_code: RI + output: + # 1.1% * 84,000 = 924.00. + ri_employee_temporary_disability_insurance_contribution: 924.00 diff --git a/policyengine_us/tests/policy/baseline/gov/states/vt/tax/payroll/child_care/vt_employee_child_care_contribution_rate.yaml b/policyengine_us/tests/policy/baseline/gov/states/vt/tax/payroll/child_care/vt_employee_child_care_contribution_rate.yaml new file mode 100644 index 00000000000..028500dda6b --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/vt/tax/payroll/child_care/vt_employee_child_care_contribution_rate.yaml @@ -0,0 +1,38 @@ +# Vermont Child Care Contribution: 0.44% of wages from July 1, 2024, of which an +# employer may withhold up to 0.11% from the employee. + +- name: Vermont child care employee rate is zero in 2023, before collection began. + period: 2023 + input: + employment_income: 50_000 + state_code: VT + output: + vt_employee_child_care_contribution_rate: 0 + vt_employee_child_care_contribution: 0 + vt_employee_state_payroll_tax: 0 + employee_state_payroll_tax: 0 + +- name: Vermont child care employee rate in 2024 counts only July through December. + period: 2024 + absolute_error_margin: 0.01 + input: + employment_income: 50_000 + state_code: VT + output: + # 0.11% * 6/12 = 0.055%. + vt_employee_child_care_contribution_rate: 0.00055 + # 0.055% * 50,000 = 27.50. + vt_employee_child_care_contribution: 27.50 + vt_employee_state_payroll_tax: 27.50 + employee_state_payroll_tax: 27.50 + +- name: Vermont child care employee rate is 0.11% in 2025. + period: 2025 + absolute_error_margin: 0.01 + input: + employment_income: 50_000 + state_code: VT + output: + vt_employee_child_care_contribution_rate: 0.0011 + # 0.11% * 50,000 = 55. + vt_employee_child_care_contribution: 55 diff --git a/policyengine_us/tests/policy/baseline/gov/states/vt/tax/payroll/child_care/vt_employer_child_care_contribution_rate.yaml b/policyengine_us/tests/policy/baseline/gov/states/vt/tax/payroll/child_care/vt_employer_child_care_contribution_rate.yaml new file mode 100644 index 00000000000..56bb3b5b66a --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/vt/tax/payroll/child_care/vt_employer_child_care_contribution_rate.yaml @@ -0,0 +1,44 @@ +# Vermont Child Care Contribution: 0.44% of wages from July 1, 2024. The model +# assumes the employer withholds the most it may (0.11%) and pays the other +# 0.33%. + +- name: Vermont child care employer rate is zero in 2023, before collection began. + period: 2023 + input: + employment_income: 50_000 + state_code: VT + output: + vt_employer_child_care_contribution_rate: 0 + vt_employer_child_care_contribution: 0 + +- name: Vermont child care employer rate in 2024 counts only July through December. + period: 2024 + absolute_error_margin: 0.01 + input: + employment_income: 50_000 + state_code: VT + output: + # 0.33% * 6/12 = 0.165%. + vt_employer_child_care_contribution_rate: 0.00165 + # 0.165% * 50,000 = 82.50. + vt_employer_child_care_contribution: 82.50 + vt_employer_additional_state_payroll_tax: 82.50 + employer_additional_state_payroll_tax: 82.50 + +- name: Vermont child care employer rate is 0.33% in 2025. + period: 2025 + absolute_error_margin: 0.0000001 + input: + state_code: VT + output: + vt_employer_child_care_contribution_rate: 0.0033 + +- name: Vermont employer-total child care contribution in 2024 applies the July-to-December share. + period: 2024 + absolute_error_margin: 0.01 + input: + employer_total_vt_child_care_contribution_wages: 1_000_000 + state_code: VT + output: + # 0.165% * 1,000,000 = 1,650. + employer_total_additional_state_payroll_tax: 1_650 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..5b2fec3fcce 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 @@ -14,6 +14,5 @@ class ma_employee_paid_leave_contribution(Variable): defined_for = StateCode.MA 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 + rate = person("ma_employee_paid_leave_contribution_rate", period) return rate * person("ma_paid_leave_taxable_wages", period) diff --git a/policyengine_us/variables/gov/states/ma/tax/payroll/paid_leave/ma_employee_paid_leave_contribution_rate.py b/policyengine_us/variables/gov/states/ma/tax/payroll/paid_leave/ma_employee_paid_leave_contribution_rate.py new file mode 100644 index 00000000000..ca43d5c5a9e --- /dev/null +++ b/policyengine_us/variables/gov/states/ma/tax/payroll/paid_leave/ma_employee_paid_leave_contribution_rate.py @@ -0,0 +1,33 @@ +from policyengine_us.model_api import * + +MONTHS_IN_QUARTER = 3 + + +class ma_employee_paid_leave_contribution_rate(Variable): + value_type = float + entity = Person + label = "Massachusetts employee paid leave contribution rate" + documentation = ( + "Annual effective rate of the Massachusetts Paid Family and Medical " + "Leave contribution that the employer may withhold from wages: the " + "family leave rate plus the employee share of the medical leave rate. " + "Contributions began October 1, 2019, so the annual rate averages the " + "rates in effect at the start of each calendar quarter, assuming wages " + "accrue evenly over the year. Every rate change so far began a quarter, " + "so this equals the average over all twelve months." + ) + definition_period = YEAR + unit = "/1" + defined_for = StateCode.MA + reference = ( + "https://malegislature.gov/Laws/GeneralLaws/PartI/TitleXXII/Chapter175M/Section6", + "https://web.archive.org/web/20190716144139/https://www.mass.gov/news/notice-to-massachusetts-employers-about-pfml-delay", + ) + + def formula(person, period, parameters): + quarter_starts = period.get_subperiods(MONTH)[::MONTHS_IN_QUARTER] + total = 0 + for quarter_start in quarter_starts: + p = parameters(quarter_start).gov.states.ma.tax.payroll.paid_leave + total = total + p.family_rate + p.medical_rate * p.medical_employee_share + return total / len(quarter_starts) 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..30b29e357cd 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 @@ -14,8 +14,5 @@ class ma_employer_paid_leave_contribution(Variable): defined_for = StateCode.MA 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) - taxable_wages = person("ma_paid_leave_taxable_wages", period) - return where(liable, rate * taxable_wages, 0) + rate = person("ma_employer_paid_leave_contribution_rate", period) + return rate * person("ma_paid_leave_taxable_wages", period) diff --git a/policyengine_us/variables/gov/states/ma/tax/payroll/paid_leave/ma_employer_paid_leave_contribution_rate.py b/policyengine_us/variables/gov/states/ma/tax/payroll/paid_leave/ma_employer_paid_leave_contribution_rate.py new file mode 100644 index 00000000000..0b2ce76048b --- /dev/null +++ b/policyengine_us/variables/gov/states/ma/tax/payroll/paid_leave/ma_employer_paid_leave_contribution_rate.py @@ -0,0 +1,36 @@ +from policyengine_us.model_api import * + +MONTHS_IN_QUARTER = 3 + + +class ma_employer_paid_leave_contribution_rate(Variable): + value_type = float + entity = Person + label = "Massachusetts employer paid leave contribution rate" + documentation = ( + "Annual effective rate of the employer's share of the Massachusetts " + "Paid Family and Medical Leave medical leave contribution, using " + "employer headcount as a proxy for covered individuals. Contributions " + "began October 1, 2019, so the annual rate averages the rates in effect " + "at the start of each calendar quarter, assuming wages accrue evenly " + "over the year. Every rate change so far began a quarter, so this " + "equals the average over all twelve months." + ) + definition_period = YEAR + unit = "/1" + defined_for = StateCode.MA + reference = ( + "https://malegislature.gov/Laws/GeneralLaws/PartI/TitleXXII/Chapter175M/Section6", + "https://web.archive.org/web/20190716144139/https://www.mass.gov/news/notice-to-massachusetts-employers-about-pfml-delay", + ) + + def formula(person, period, parameters): + headcount = person("employer_headcount", period) + quarter_starts = period.get_subperiods(MONTH)[::MONTHS_IN_QUARTER] + total = 0 + for quarter_start in quarter_starts: + p = parameters(quarter_start).gov.states.ma.tax.payroll.paid_leave + rate = p.medical_rate * (1 - p.medical_employee_share) + liable = headcount >= p.employer_headcount_threshold + total = total + where(liable, rate, 0) + return total / len(quarter_starts) diff --git a/policyengine_us/variables/gov/states/or/tax/payroll/statewide_transit/or_employee_statewide_transit_tax.py b/policyengine_us/variables/gov/states/or/tax/payroll/statewide_transit/or_employee_statewide_transit_tax.py index d8a0efc7a63..7d44109903a 100644 --- a/policyengine_us/variables/gov/states/or/tax/payroll/statewide_transit/or_employee_statewide_transit_tax.py +++ b/policyengine_us/variables/gov/states/or/tax/payroll/statewide_transit/or_employee_statewide_transit_tax.py @@ -11,9 +11,5 @@ class or_employee_statewide_transit_tax(Variable): defined_for = StateCode.OR def formula(person, period, parameters): - rate = ( - parameters(period) - .gov.states["or"] - .tax.payroll.statewide_transit.employee_rate - ) + rate = person("or_employee_statewide_transit_tax_rate", period) return rate * person("or_statewide_transit_taxable_wages", period) diff --git a/policyengine_us/variables/gov/states/or/tax/payroll/statewide_transit/or_employee_statewide_transit_tax_rate.py b/policyengine_us/variables/gov/states/or/tax/payroll/statewide_transit/or_employee_statewide_transit_tax_rate.py new file mode 100644 index 00000000000..cbdadd8ddfc --- /dev/null +++ b/policyengine_us/variables/gov/states/or/tax/payroll/statewide_transit/or_employee_statewide_transit_tax_rate.py @@ -0,0 +1,32 @@ +from policyengine_us.model_api import * + +MONTHS_IN_QUARTER = 3 + + +class or_employee_statewide_transit_tax_rate(Variable): + value_type = float + entity = Person + label = "Oregon employee statewide transit tax rate" + documentation = ( + "Annual effective rate of the Oregon statewide transit tax. Employers " + "began withholding the tax on July 1, 2018, so the annual rate averages " + "the rates in effect at the start of each calendar quarter, assuming " + "wages accrue evenly over the year. Every rate change so far began a " + "quarter, so this equals the average over all twelve months." + ) + definition_period = YEAR + unit = "/1" + defined_for = StateCode.OR + reference = ( + "https://www.oregonlegislature.gov/bills_laws/ors/ors320.html", + "https://www.oregon.gov/dor/programs/businesses/pages/statewide-transit-tax.aspx", + ) + + def formula(person, period, parameters): + quarter_starts = period.get_subperiods(MONTH)[::MONTHS_IN_QUARTER] + return sum( + parameters(quarter_start) + .gov.states["or"] + .tax.payroll.statewide_transit.employee_rate + for quarter_start in quarter_starts + ) / len(quarter_starts) 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..ca5f7da2da3 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 @@ -57,13 +57,8 @@ def formula(person, period, parameters): ) de = de_contribution_rate * (1 - de_p.employee_share) * 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 = person("ma_employer_paid_leave_contribution_rate", period) * person( + "employer_total_ma_paid_leave_taxable_wages", period ) me_p = parameters(period).gov.states.me.tax.payroll.paid_leave @@ -89,9 +84,7 @@ def formula(person, period, parameters): * state_ui_taxable ) - vt = parameters( - period - ).gov.states.vt.tax.payroll.child_care.employer_rate * person( + vt = person("vt_employer_child_care_contribution_rate", period) * person( "employer_total_vt_child_care_contribution_wages", period ) 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..d637ca7999c 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 @@ -14,5 +14,5 @@ class vt_employee_child_care_contribution(Variable): defined_for = StateCode.VT def formula(person, period, parameters): - rate = parameters(period).gov.states.vt.tax.payroll.child_care.employee_rate + rate = person("vt_employee_child_care_contribution_rate", period) return rate * person("vt_child_care_contribution_wages", period) diff --git a/policyengine_us/variables/gov/states/vt/tax/payroll/child_care/vt_employee_child_care_contribution_rate.py b/policyengine_us/variables/gov/states/vt/tax/payroll/child_care/vt_employee_child_care_contribution_rate.py new file mode 100644 index 00000000000..2db9f169690 --- /dev/null +++ b/policyengine_us/variables/gov/states/vt/tax/payroll/child_care/vt_employee_child_care_contribution_rate.py @@ -0,0 +1,31 @@ +from policyengine_us.model_api import * + +MONTHS_IN_QUARTER = 3 + + +class vt_employee_child_care_contribution_rate(Variable): + value_type = float + entity = Person + label = "Vermont employee child care contribution rate" + documentation = ( + "Annual effective rate of the Vermont Child Care Contribution that an " + "employer may withhold from wages. Collection began July 1, 2024, so " + "the annual rate averages the rates in effect at the start of each " + "calendar quarter, assuming wages accrue evenly over the year. Every " + "rate change so far began a quarter, so this equals the average over " + "all twelve months." + ) + definition_period = YEAR + unit = "/1" + defined_for = StateCode.VT + reference = ( + "https://legislature.vermont.gov/statutes/fullchapter/32/246", + "https://tax.vermont.gov/business/child-care-contribution", + ) + + def formula(person, period, parameters): + quarter_starts = period.get_subperiods(MONTH)[::MONTHS_IN_QUARTER] + return sum( + parameters(quarter_start).gov.states.vt.tax.payroll.child_care.employee_rate + for quarter_start in quarter_starts + ) / len(quarter_starts) 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..cc0674a392a 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 @@ -14,5 +14,5 @@ class vt_employer_child_care_contribution(Variable): defined_for = StateCode.VT def formula(person, period, parameters): - rate = parameters(period).gov.states.vt.tax.payroll.child_care.employer_rate + rate = person("vt_employer_child_care_contribution_rate", period) return rate * person("vt_child_care_contribution_wages", period) diff --git a/policyengine_us/variables/gov/states/vt/tax/payroll/child_care/vt_employer_child_care_contribution_rate.py b/policyengine_us/variables/gov/states/vt/tax/payroll/child_care/vt_employer_child_care_contribution_rate.py new file mode 100644 index 00000000000..f66088270c9 --- /dev/null +++ b/policyengine_us/variables/gov/states/vt/tax/payroll/child_care/vt_employer_child_care_contribution_rate.py @@ -0,0 +1,30 @@ +from policyengine_us.model_api import * + +MONTHS_IN_QUARTER = 3 + + +class vt_employer_child_care_contribution_rate(Variable): + value_type = float + entity = Person + label = "Vermont employer child care contribution rate" + documentation = ( + "Annual effective rate of the employer's share of the Vermont Child " + "Care Contribution. Collection began July 1, 2024, so the annual rate " + "averages the rates in effect at the start of each calendar quarter, " + "assuming wages accrue evenly over the year. Every rate change so far " + "began a quarter, so this equals the average over all twelve months." + ) + definition_period = YEAR + unit = "/1" + defined_for = StateCode.VT + reference = ( + "https://legislature.vermont.gov/statutes/fullchapter/32/246", + "https://tax.vermont.gov/business/child-care-contribution", + ) + + def formula(person, period, parameters): + quarter_starts = period.get_subperiods(MONTH)[::MONTHS_IN_QUARTER] + return sum( + parameters(quarter_start).gov.states.vt.tax.payroll.child_care.employer_rate + for quarter_start in quarter_starts + ) / len(quarter_starts) From 10ec882e916d3426aed58295d95690d4327895ef Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Mon, 9 Nov 2026 14:51:02 -0500 Subject: [PATCH 2/2] Test the deduction share in the partial first years and the 2027 MA rates Six YAML cases whose expected values apply the published rates by hand: - Massachusetts 2019 at a 0.5 deduction share: the worker pays half of the October-December permitted amount (47.25 on $100,000) and the employer pays its own share plus the other half (140.25); the employer total adds the same half of the employee rate on $1,000,000 (1,402.50). - Vermont 2024 at a 0.5 deduction share: 27.50 and 192.50 on $100,000, and 1,925 for the employer total on $1,000,000. - The 2027 rate variables after the swap of caps and rates: 0.46% for the employee and 0.42% for an employer with 25 covered individuals. Co-Authored-By: Claude Opus 5.5 --- .../ma_employee_paid_leave_contribution.yaml | 16 +++++++++ ...employee_paid_leave_contribution_rate.yaml | 13 +++++++- ...employer_paid_leave_contribution_rate.yaml | 27 ++++++++++++++- ...employer_child_care_contribution_rate.yaml | 33 +++++++++++++++++-- 4 files changed, 84 insertions(+), 5 deletions(-) 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 29418b29c3b..cfd2796d26e 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 @@ -121,3 +121,19 @@ ma_employee_paid_leave_contribution: 442.29 # 60% * 0.70% = 0.42%; 0.42% * 192,300 = 807.66; 807.66 + 442.29 = 1,249.95. ma_employer_paid_leave_contribution: 1_249.95 + +- name: Massachusetts PFML 2019 partial deduction share applies to the October-to-December contribution. + period: 2019 + absolute_error_margin: 0.01 + input: + employment_income: 100_000 + employer_headcount: 25 + employer_state_payroll_premium_deduction_share: 0.5 + state_code: MA + output: + # 0.13% + 40% * 0.62% = 0.378% for one quarter of the year is 0.0945%; + # 0.0945% * 100,000 = 94.50 permitted, of which the employer deducts half. + ma_employee_paid_leave_contribution: 47.25 + # 60% * 0.62% = 0.372% for one quarter is 0.093%; 0.093% * 100,000 = 93.00, + # plus the 47.25 the employer does not deduct. + ma_employer_paid_leave_contribution: 140.25 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ma/tax/payroll/paid_leave/ma_employee_paid_leave_contribution_rate.yaml b/policyengine_us/tests/policy/baseline/gov/states/ma/tax/payroll/paid_leave/ma_employee_paid_leave_contribution_rate.yaml index 5d2f110d7fa..11aa93a036e 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ma/tax/payroll/paid_leave/ma_employee_paid_leave_contribution_rate.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ma/tax/payroll/paid_leave/ma_employee_paid_leave_contribution_rate.yaml @@ -2,7 +2,9 @@ # leave rate plus 40% of the medical leave rate. Contributions began October 1, # 2019. DFML's published rates: 0.13% family and 0.62% medical from then through # 2021, 0.12% and 0.56% in 2022, 0.11% and 0.52% in 2023, and 0.18% and 0.70% -# from 2024. +# from 2024. From 2027 the caps and the rates swap (Acts 2026 c. 101 ss. 25-26 +# and DFML's 2027 rates): 40% of the 0.70% family rate plus all of the 0.18% +# medical rate. - name: Massachusetts PFML employee rate is zero in 2018, before contributions began. period: 2018 @@ -56,6 +58,15 @@ # 0.18% + 40% * 0.70% = 0.46%. ma_employee_paid_leave_contribution_rate: 0.0046 +- name: Massachusetts PFML employee rate stays 0.46% in 2027 after the caps and the rates swap. + period: 2027 + absolute_error_margin: 0.0000001 + input: + state_code: MA + output: + # 40% * 0.70% + 0.18% = 0.28% + 0.18% = 0.46%. + ma_employee_paid_leave_contribution_rate: 0.0046 + - name: Massachusetts PFML employee rate is zero outside Massachusetts. period: 2021 input: diff --git a/policyengine_us/tests/policy/baseline/gov/states/ma/tax/payroll/paid_leave/ma_employer_paid_leave_contribution_rate.yaml b/policyengine_us/tests/policy/baseline/gov/states/ma/tax/payroll/paid_leave/ma_employer_paid_leave_contribution_rate.yaml index 5d0d0d90b67..d2f87aa9114 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ma/tax/payroll/paid_leave/ma_employer_paid_leave_contribution_rate.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ma/tax/payroll/paid_leave/ma_employer_paid_leave_contribution_rate.yaml @@ -1,7 +1,9 @@ # Massachusetts PFML employer share: 60% of the medical leave rate, owed by # employers with 25 or more covered individuals (employer headcount stands in # for covered individuals). Contributions began October 1, 2019, with a 0.62% -# medical rate through 2021, 0.56% in 2022 and 0.52% in 2023. +# medical rate through 2021, 0.56% in 2022 and 0.52% in 2023. From 2027 the +# caps and the rates swap, and the employer share is 60% of the 0.70% family +# rate. - name: Massachusetts PFML employer rate is zero in 2018, before contributions began. period: 2018 @@ -69,6 +71,16 @@ # 60% * 0.52% = 0.312%. ma_employer_paid_leave_contribution_rate: 0.00312 +- name: Massachusetts PFML employer rate in 2027 is 60% of the 0.70% family rate. + period: 2027 + absolute_error_margin: 0.0000001 + input: + employer_headcount: 25 + state_code: MA + output: + # 60% * 0.70% = 0.42%; the employer may deduct all of the 0.18% medical rate. + ma_employer_paid_leave_contribution_rate: 0.0042 + - name: Massachusetts employer-total PFML in 2019 applies the October-to-December share. period: 2019 absolute_error_margin: 0.01 @@ -90,3 +102,16 @@ output: # 0.336% * 1,000,000 = 3,360. employer_total_additional_state_payroll_tax: 3_360 + +- name: Massachusetts employer-total PFML in 2019 adds the undeducted part of the October-to-December employee share. + period: 2019 + absolute_error_margin: 0.01 + input: + employer_headcount: 30 + employer_state_payroll_premium_deduction_share: 0.5 + employer_total_ma_paid_leave_taxable_wages: 1_000_000 + state_code: MA + output: + # 0.093% * 1,000,000 = 930, plus half of the 0.0945% employee rate: + # 0.5 * 0.0945% * 1,000,000 = 472.50. + employer_total_additional_state_payroll_tax: 1_402.50 diff --git a/policyengine_us/tests/policy/baseline/gov/states/vt/tax/payroll/child_care/vt_employer_child_care_contribution_rate.yaml b/policyengine_us/tests/policy/baseline/gov/states/vt/tax/payroll/child_care/vt_employer_child_care_contribution_rate.yaml index 56bb3b5b66a..e104dfa48f8 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/vt/tax/payroll/child_care/vt_employer_child_care_contribution_rate.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/vt/tax/payroll/child_care/vt_employer_child_care_contribution_rate.yaml @@ -1,6 +1,7 @@ -# Vermont Child Care Contribution: 0.44% of wages from July 1, 2024. The model -# assumes the employer withholds the most it may (0.11%) and pays the other -# 0.33%. +# Vermont Child Care Contribution: 0.44% of wages from July 1, 2024. By default +# the model assumes the employer withholds the most it may (0.11%) and pays the +# other 0.33%; employer_state_payroll_premium_deduction_share sets a smaller +# deduction, and the employer pays the rest. - name: Vermont child care employer rate is zero in 2023, before collection began. period: 2023 @@ -42,3 +43,29 @@ output: # 0.165% * 1,000,000 = 1,650. employer_total_additional_state_payroll_tax: 1_650 + +- name: Vermont child care 2024 partial deduction share applies to the July-to-December contribution. + period: 2024 + absolute_error_margin: 0.01 + input: + employment_income: 100_000 + employer_state_payroll_premium_deduction_share: 0.5 + state_code: VT + output: + # 0.11% for half the year is 0.055%; 0.055% * 100,000 = 55 permitted, of + # which the employer deducts half. + vt_employee_child_care_contribution: 27.50 + # 0.33% for half the year is 0.165%; 0.165% * 100,000 = 165, plus the 27.50 + # the employer does not deduct. + vt_employer_child_care_contribution: 192.50 + +- name: Vermont employer-total child care contribution in 2024 adds the undeducted part of the July-to-December employee share. + period: 2024 + absolute_error_margin: 0.01 + input: + employer_state_payroll_premium_deduction_share: 0.5 + employer_total_vt_child_care_contribution_wages: 1_000_000 + state_code: VT + output: + # 0.165% * 1,000,000 = 1,650, plus half of 0.055% * 1,000,000 = 275. + employer_total_additional_state_payroll_tax: 1_925