Skip to content

Add soi_iitax parameter#3072

Merged
jdebacker merged 7 commits into
PSLmodels:masterfrom
martinholmer:add-soi-param
May 27, 2026
Merged

Add soi_iitax parameter#3072
jdebacker merged 7 commits into
PSLmodels:masterfrom
martinholmer:add-soi-param

Conversation

@martinholmer
Copy link
Copy Markdown
Collaborator

@martinholmer martinholmer commented May 23, 2026

Fixes #3071 by adding a new parameter called soi_iitax that controls
the categorization of the self-employment tax (setax) and the
additional Medicare tax (ptax_amc) as being part of the income tax
or as being part of the payroll tax.

It is important that Tax-Calculator have this flexibility because
grouping setax and ptax_amc as being part of the income tax
(soi_iitax==true) reflects the structure of IRS tax forms and
corresponds to SOI statistics used to construct the TMD input data files.
But categorizing setax and ptax_amc as being payroll taxes
(soi_iitax==false) is the tax-analysis approach used by all federal
tax agencies.

This pull request sets the value of soi_iitax to false in all years
so that Tax-Calculator produces conventional tax-analysis results by
default. Note that this is a change from the way Tax-Calculator has
worked since its beginnings. Concurrently, the code in the TMD
repository has been revised so that the value of soi_iitax is true
and Tax-Calculator produces SOI-compatible income tax statistics.

Also, a test has been added to the test_reforms.py module to confirm
that the new soi_iitax logic produces the correct results described
in issue #3071 for a reform that eliminates the cap on FICA and SECA
taxable earnings.

How does PolicyEngine-US handle this issue?

The following prompt:

❯ Looking at the code in the GitHub PolicyEngine-US repository, does that model
include the SECA tax (that is, the self-employment social security tax) in
the income tax total or in the payroll tax total?

produced this Claude Code response:

⏺ Let me look at the PolicyEngine-US repository to find how SECA tax is
categorized.

⏺ Explore(Find SECA tax categorization in PolicyEngine-US)
⎿  Done (64 tool uses · 58.6k tokens · 4m 59s)
(ctrl+o to expand)

⏺ In PolicyEngine-US, SECA tax is in neither — it's kept as its own separate tax
category.

The model has three distinct tax buckets under
/policyengine_us/variables/gov/irs/tax/:

  1. federal_income/ — income tax before refundable credits minus refundable
    credits. Does not include SECA.
  2. payroll/ — employee Social Security tax, employee Medicare tax, additional
    Medicare tax, employee state payroll tax. Does not include SECA.
  3. self_employment/ — self_employment_social_security_tax +
    self_employment_medicare_tax. Stands alone.

So self_employment_tax is a person-level variable summing the SE Social
Security and SE Medicare components, computed independently from both income
tax and employee payroll tax totals.

@martinholmer martinholmer requested a review from jdebacker May 23, 2026 20:45
@codecov
Copy link
Copy Markdown

codecov Bot commented May 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (3c10be1) to head (8711818).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #3072   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           13        13           
  Lines         2721      2721           
=========================================
  Hits          2721      2721           
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
taxcalc/__init__.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread taxcalc.egg-info/SOURCES.txt
Copy link
Copy Markdown
Member

@jdebacker jdebacker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice PR. I like how you created the boolean to allow modeling of the IRS/SOI concept and traditional revenue estimates.

I have just one question on some files that are removed. When I'm clear on those changes, I'll merge.

@jdebacker
Copy link
Copy Markdown
Member

Ah - those files being removed are just clean up of the repo. Thanks! Merging,

@jdebacker jdebacker merged commit a1655ac into PSLmodels:master May 27, 2026
9 checks passed
@martinholmer martinholmer deleted the add-soi-param branch May 27, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SECA taxes not being included in total payroll taxes

2 participants