Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include setax and ptax_amc in income tax rather than in payroll tax #2844

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion taxcalc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
from taxcalc.utils import *
from taxcalc.cli import *

__version__ = '4.3.3'
__version__ = '4.3.3a'
__min_python3_version__ = 10
__max_python3_version__ = 12
39 changes: 18 additions & 21 deletions taxcalc/calcfunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,11 @@ def EI_PayrollTax(SS_Earnings_c, e00200p, e00200s, pencon_p, pencon_s,
Partner self-employment earnings/loss for spouse (included in e26270 total)
payrolltax: float
Total (employee and employer) payroll tax liability
payrolltax = ptax_was + setax + ptax_amc
payrolltax = ptax_was
ptax_was: float
Employee and employer OASDI plus HI FICA tax
setax: float
Self-employment tax
Self-employment tax (included in othertaxes and iitax)
c03260: float
Deductible part of self-employment tax
c03260 = (1 - ALD_SelfEmploymentTax_hc) * 0.5 * setax
Expand All @@ -187,11 +187,11 @@ def EI_PayrollTax(SS_Earnings_c, e00200p, e00200s, pencon_p, pencon_s,
Total self-employment income for filing unit
payrolltax: float
Total (employee and employer) payroll tax liability
payrolltax = ptax_was + setax + ptax_amc
payrolltax = ptax_was
ptax_was: float
Employee and employer OASDI plus HI FICA tax
setax: float
Self-employment tax
Self-employment tax (included in othertaxes and iitax)
c03260: float
Deductible part of self-employment tax
c03260 = (1 - ALD_SelfEmploymentTax_hc) * 0.5 * setax
Expand Down Expand Up @@ -260,9 +260,7 @@ def EI_PayrollTax(SS_Earnings_c, e00200p, e00200s, pencon_p, pencon_s,
extra_ss_income_s * (FICA_ss_trt_employer + FICA_ss_trt_employee))

# compute part of total payroll taxes for filing unit
# (the ptax_amc part of total payroll taxes for the filing unit is
# computed in the AdditionalMedicareTax function below)
payrolltax = ptax_was + setax + extra_payrolltax
payrolltax = ptax_was + extra_payrolltax

# compute OASDI part of payroll taxes
ptax_oasdi = (ptax_ss_was_p + ptax_ss_was_s +
Expand Down Expand Up @@ -1088,9 +1086,9 @@ def AdditionalMedicareTax(e00200, MARS,
AMEDT_ec, sey, AMEDT_rt,
FICA_mc_trt_employer, FICA_mc_trt_employee,
FICA_ss_trt_employer, FICA_ss_trt_employee,
ptax_amc, payrolltax):
ptax_amc):
"""
Computes Additional Medicare Tax (Form 8959) included in payroll taxes.
Computes Additional Medicare Tax (Form 8959) included in othertaxes.

Parameters
-----
Expand All @@ -1113,23 +1111,18 @@ def AdditionalMedicareTax(e00200, MARS,
sey: float
Self-employment income
ptax_amc: float
Additional Medicare Tax
payrolltax: float
payroll tax augmented by Additional Medicare Tax
Additional Medicare Tax (included in othertaxes and iitax)

Returns
-------
ptax_amc: float
Additional Medicare Tax
payrolltax: float
payroll tax augmented by Additional Medicare Tax
Additional Medicare Tax (included in othertaxes and iitax)
"""
line8 = max(0., sey) * (1. - 0.5 * (FICA_mc_trt_employer + FICA_mc_trt_employee + FICA_ss_trt_employer + FICA_ss_trt_employee))
line11 = max(0., AMEDT_ec[MARS - 1] - e00200)
ptax_amc = AMEDT_rt * (max(0., e00200 - AMEDT_ec[MARS - 1]) +
max(0., line8 - line11))
payrolltax += ptax_amc
return (ptax_amc, payrolltax)
return ptax_amc


@iterate_jit(nopython=True)
Expand Down Expand Up @@ -3150,8 +3143,8 @@ def AdditionalCTC(codtc_limited, ACTC_c, n24, earned, ACTC_Income_thd,

@iterate_jit(nopython=True)
def C1040(c05800, c07180, c07200, c07220, c07230, c07240, c07260, c07300,
c07400, c07600, c08000, e09700, e09800, e09900, niit, othertaxes,
c07100, c09200, odc, charity_credit,
c07400, c07600, c08000, e09700, e09800, e09900, niit, setax,
ptax_amc, othertaxes, c07100, c09200, odc, charity_credit,
personal_nonrefundable_credit,
CTC_is_refundable, ODC_is_refundable):
"""
Expand Down Expand Up @@ -3190,8 +3183,12 @@ def C1040(c05800, c07180, c07200, c07220, c07230, c07240, c07260, c07300,
Penalty tax on qualified retirement plans
niit: float
Net Investment Income Tax from Form 8960
setax: float
Self-employment tax
ptax_amc: float
Additional Medicare tax
othertaxes: float
Sum of niit, e09700, e09800, and e09900
Sum of niit, setax, ptax_amc, e09700, e09800, and e09900
c07100: float
Total non-refundable credits used to reduce positive tax liability
c09200: float
Expand Down Expand Up @@ -3221,7 +3218,7 @@ def C1040(c05800, c07180, c07200, c07220, c07230, c07240, c07260, c07300,
# tax after credits (2016 Form 1040, line 56)
tax_net_nonrefundable_credits = max(0., c05800 - c07100)
# tax (including othertaxes) before refundable credits
othertaxes = e09700 + e09800 + e09900 + niit
othertaxes = e09700 + e09800 + e09900 + niit + setax + ptax_amc
c09200 = othertaxes + tax_net_nonrefundable_credits
return (c07100, othertaxes, c09200)

Expand Down
11 changes: 5 additions & 6 deletions taxcalc/records_variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -736,9 +736,8 @@
},
"payrolltax": {
"type": "float",
"desc": "Total (employee + employer) payroll tax liability; appears as PAYTAX variable in tc CLI minimal output (payrolltax = ptax_was + setax + ptax_amc)",
"form": {"2013-2013": "OASDI+HI FICA plus 1040 lines 56 and 60a",
"2014-2016": "OASDI+HI FICA plus 1040 lines 57 and 62a"}
"desc": "Total (employee + employer) payroll tax liability; appears as PAYTAX variable in tc CLI minimal output (payrolltax = ptax_was)",
"form": {"2013-20??": "OASDI+HI FICA"}
},
"refund": {
"type": "float",
Expand Down Expand Up @@ -1133,13 +1132,13 @@
},
"ptax_amc": {
"type": "float",
"desc": "Additional Medicare Tax from Form 8959 (included in payrolltax)",
"desc": "Additional Medicare Tax from Form 8959 (included in othertaxes and iitax)",
"form": {"2013-2013": "1040 line 60a",
"2014-2016": "1040 line 62a"}
},
"ptax_oasdi": {
"type": "float",
"desc": "Employee + employer OASDI FICA tax plus self-employment tax (excludes HI FICA so positive ptax_oasdi is less than ptax_was plus setax)",
"desc": "Employee + employer OASDI FICA tax plus self-employment tax",
"form": {"2013-2013": "OASDI FICA plus 1040 line 56",
"2014-2016": "OASDI FICA plus 1040 line 57"}
},
Expand All @@ -1151,7 +1150,7 @@
},
"setax": {
"type": "float",
"desc": "Self-employment tax",
"desc": "Self-employment tax (included in othertaxes and iitax)",
"form": {"2013-2013": "1040 line 56",
"2014-2016": "1040 line 57"}
},
Expand Down
2 changes: 1 addition & 1 deletion taxcalc/reforms/2017_law.out.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000.00,6723.42,18988.43,554.60,4590.00
12,60000.00,6723.42,48988.43,5935.27,9180.00
13,460000.00,6723.42,453276.58,132718.27,32754.80
13,460000.00,6723.42,453276.58,135058.27,30414.80
21,60000.00,13446.83,29400.57,-2177.25,9180.00
22,120000.00,13446.83,89400.57,8226.47,18360.00
23,240000.00,13446.83,209400.57,44745.39,36720.00
Expand Down
20 changes: 10 additions & 10 deletions taxcalc/reforms/ARPA.out.csv
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000,12400,17600,114.5,4590
12,60000,12400,47600,4462,9180
13,460000,12400,447600,131455,32754.8
21,60000,24800,35200,-3771,9180
22,120000,24800,95200,4924,18360
23,240000,24800,215200,35807,36720
31,30000,18650,11350,-4543.93,4590
32,60000,18650,41350,880,9180
33,120000,18650,101350,13537,18360
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000.00,12400.00,17600.00,114.50,4590.00
12,60000.00,12400.00,47600.00,4462.00,9180.00
13,460000.00,12400.00,447600.00,133795.00,30414.80
21,60000.00,24800.00,35200.00,-3771.00,9180.00
22,120000.00,24800.00,95200.00,4924.00,18360.00
23,240000.00,24800.00,215200.00,35807.00,36720.00
31,30000.00,18650.00,11350.00,-4543.93,4590.00
32,60000.00,18650.00,41350.00,880.00,9180.00
33,120000.00,18650.00,101350.00,13537.00,18360.00
2 changes: 1 addition & 1 deletion taxcalc/reforms/BrownKhanna.out.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000.00,6723.42,18988.43,-930.89,4590.00
12,60000.00,6723.42,48988.43,5935.27,9180.00
13,460000.00,6723.42,453276.58,132718.27,32754.80
13,460000.00,6723.42,453276.58,135058.27,30414.80
21,60000.00,13446.83,29400.57,-6296.60,9180.00
22,120000.00,13446.83,89400.57,8226.47,18360.00
23,240000.00,13446.83,209400.57,44745.39,36720.00
Expand Down
20 changes: 10 additions & 10 deletions taxcalc/reforms/CARES.out.csv
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000,12400,17600,714.5,4590
12,60000,12400,47600,5062,9180
13,460000,12400,447600,131455,32754.8
21,60000,24800,35200,-2571,9180
22,120000,24800,95200,6124,18360
23,240000,24800,215200,35807,36720
31,30000,18650,11350,-3943.93,4590
32,60000,18650,41350,1480,9180
33,120000,18650,101350,14137,18360
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000.00,12400.00,17600.00,714.50,4590.00
12,60000.00,12400.00,47600.00,5062.00,9180.00
13,460000.00,12400.00,447600.00,133795.00,30414.80
21,60000.00,24800.00,35200.00,-2571.00,9180.00
22,120000.00,24800.00,95200.00,6124.00,18360.00
23,240000.00,24800.00,215200.00,35807.00,36720.00
31,30000.00,18650.00,11350.00,-3943.93,4590.00
32,60000.00,18650.00,41350.00,1480.00,9180.00
33,120000.00,18650.00,101350.00,14137.00,18360.00
2 changes: 1 addition & 1 deletion taxcalc/reforms/ConsolidatedAppropriationsAct2021.out.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000.00,12400.00,17600.00,114.50,4590.00
12,60000.00,12400.00,47600.00,4462.00,9180.00
13,460000.00,12400.00,447600.00,131455.00,32754.80
13,460000.00,12400.00,447600.00,133795.00,30414.80
21,60000.00,24800.00,35200.00,-3771.00,9180.00
22,120000.00,24800.00,95200.00,4924.00,18360.00
23,240000.00,24800.00,215200.00,35807.00,36720.00
Expand Down
20 changes: 10 additions & 10 deletions taxcalc/reforms/Larson2019.out.csv
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000,12400,17600,114.5,4620
12,60000,12400,47600,4462,9240
13,460000,12400,447600,131455,40392.5
21,60000,24800,35200,-3771,9240
22,120000,24800,95200,4924,18480
23,240000,24800,215200,35807,36960
31,30000,18650,11350,-4543.93,4620
32,60000,18650,41350,880,9240
33,120000,18650,101350,13537,18480
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000.00,12400.00,17600.00,114.50,4620.00
12,60000.00,12400.00,47600.00,4462.00,9240.00
13,460000.00,12400.00,447600.00,133795.00,38052.50
21,60000.00,24800.00,35200.00,-3771.00,9240.00
22,120000.00,24800.00,95200.00,4924.00,18480.00
23,240000.00,24800.00,215200.00,35807.00,36960.00
31,30000.00,18650.00,11350.00,-4543.93,4620.00
32,60000.00,18650.00,41350.00,880.00,9240.00
33,120000.00,18650.00,101350.00,13537.00,18480.00
2 changes: 1 addition & 1 deletion taxcalc/reforms/Renacci.out.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000.00,15882.08,8823.89,-917.61,4590.00
12,60000.00,15882.08,38823.89,2082.39,9180.00
13,460000.00,15882.08,444117.92,103088.44,32754.80
13,460000.00,15882.08,444117.92,105428.44,30414.80
21,60000.00,31764.18,7059.70,-5920.62,9180.00
22,120000.00,31764.18,67059.70,1605.97,18360.00
23,240000.00,31764.18,187059.70,30882.84,36720.00
Expand Down
20 changes: 10 additions & 10 deletions taxcalc/reforms/SandersDeFazio.out.csv
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000,12400,17600,114.5,4590
12,60000,12400,47600,4462,9180
13,460000,12400,447600,131455,58794.8
21,60000,24800,35200,-3771,9180
22,120000,24800,95200,4924,18360
23,240000,24800,215200,35807,36720
31,30000,18650,11350,-4543.93,4590
32,60000,18650,41350,880,9180
33,120000,18650,101350,13537,18360
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000.00,12400.00,17600.00,114.50,4590.00
12,60000.00,12400.00,47600.00,4462.00,9180.00
13,460000.00,12400.00,447600.00,133795.00,56454.80
21,60000.00,24800.00,35200.00,-3771.00,9180.00
22,120000.00,24800.00,95200.00,4924.00,18360.00
23,240000.00,24800.00,215200.00,35807.00,36720.00
31,30000.00,18650.00,11350.00,-4543.93,4590.00
32,60000.00,18650.00,41350.00,880.00,9180.00
33,120000.00,18650.00,101350.00,13537.00,18360.00
2 changes: 1 addition & 1 deletion taxcalc/reforms/TCJA.out.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000.00,12404.02,17595.98,114.60,4590.00
12,60000.00,12404.02,47595.98,4473.91,9180.00
13,460000.00,12404.02,447595.98,131529.61,32754.80
13,460000.00,12404.02,447595.98,133869.61,30414.80
21,60000.00,24808.03,35191.97,-3770.79,9180.00
22,120000.00,24808.03,95191.97,4947.82,18360.00
23,240000.00,24808.03,215191.97,35840.55,36720.00
Expand Down
2 changes: 1 addition & 1 deletion taxcalc/reforms/Trump2016.out.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000.00,15882.08,14117.92,-105.85,4590.00
12,60000.00,15882.08,44117.92,4067.80,9180.00
13,460000.00,15882.08,444117.92,131867.98,32754.80
13,460000.00,15882.08,444117.92,134207.98,30414.80
21,60000.00,31764.18,28235.82,-2211.70,9180.00
22,120000.00,31764.18,88235.82,6635.60,18360.00
23,240000.00,31764.18,208235.82,41735.60,36720.00
Expand Down
2 changes: 1 addition & 1 deletion taxcalc/reforms/Trump2017.out.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000.00,13446.83,12265.02,-573.50,4590.00
12,60000.00,13446.83,42265.02,2739.00,9180.00
13,460000.00,13446.83,446553.17,106145.92,32754.80
13,460000.00,13446.83,446553.17,108485.92,30414.80
21,60000.00,26893.67,15953.73,-4004.63,9180.00
22,120000.00,26893.67,75953.73,2495.37,18360.00
23,240000.00,26893.67,195953.73,36933.93,36720.00
Expand Down
20 changes: 10 additions & 10 deletions taxcalc/reforms/clp.out.csv
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000,12400,17600,114.5,4590
12,60000,12400,47600,4462,9180
13,460000,12400,447600,131455,32754.8
21,60000,24800,35200,-3771,9180
22,120000,24800,95200,4924,18360
23,240000,24800,215200,35807,36720
31,30000,18650,11350,-4543.93,4590
32,60000,18650,41350,880,9180
33,120000,18650,101350,13537,18360
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000.00,12400.00,17600.00,114.50,4590.00
12,60000.00,12400.00,47600.00,4462.00,9180.00
13,460000.00,12400.00,447600.00,133795.00,30414.80
21,60000.00,24800.00,35200.00,-3771.00,9180.00
22,120000.00,24800.00,95200.00,4924.00,18360.00
23,240000.00,24800.00,215200.00,35807.00,36720.00
31,30000.00,18650.00,11350.00,-4543.93,4590.00
32,60000.00,18650.00,41350.00,880.00,9180.00
33,120000.00,18650.00,101350.00,13537.00,18360.00
2 changes: 1 addition & 1 deletion taxcalc/reforms/ptaxes0.out.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000.00,6723.42,18988.43,554.60,5100.00
12,60000.00,6723.42,48988.43,5935.27,10200.00
13,460000.00,6723.42,453276.58,132718.27,35418.00
13,460000.00,6723.42,453276.58,135058.27,33078.00
21,60000.00,13446.83,29400.57,-2177.25,10200.00
22,120000.00,13446.83,89400.57,8226.47,20400.00
23,240000.00,13446.83,209400.57,44745.39,40800.00
Expand Down
2 changes: 1 addition & 1 deletion taxcalc/reforms/ptaxes1.out.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000.00,6723.42,18988.43,554.60,4590.00
12,60000.00,6723.42,48988.43,5935.27,9180.00
13,460000.00,6723.42,453276.58,132718.27,46680.00
13,460000.00,6723.42,453276.58,135058.27,44340.00
21,60000.00,13446.83,29400.57,-2177.25,9180.00
22,120000.00,13446.83,89400.57,8226.47,18360.00
23,240000.00,13446.83,209400.57,44745.39,36720.00
Expand Down
2 changes: 1 addition & 1 deletion taxcalc/reforms/ptaxes2.out.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000.00,6723.42,18988.43,554.60,4590.00
12,60000.00,6723.42,48988.43,5935.27,9180.00
13,460000.00,6723.42,453276.58,132718.27,72720.00
13,460000.00,6723.42,453276.58,135058.27,70380.00
21,60000.00,13446.83,29400.57,-2177.25,9180.00
22,120000.00,13446.83,89400.57,8226.47,18360.00
23,240000.00,13446.83,209400.57,44745.39,36720.00
Expand Down
2 changes: 1 addition & 1 deletion taxcalc/reforms/ptaxes3.out.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000.00,6723.42,18988.43,554.60,4590.00
12,60000.00,6723.42,48988.43,5935.27,9180.00
13,460000.00,6723.42,453276.58,132718.27,32475.05
13,460000.00,6723.42,453276.58,134778.52,30414.80
21,60000.00,13446.83,29400.57,-2177.25,9180.00
22,120000.00,13446.83,89400.57,8226.47,18360.00
23,240000.00,13446.83,209400.57,44745.39,36720.00
Expand Down
2 changes: 1 addition & 1 deletion taxcalc/reforms/rounding.out.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000.00,12400.00,17600.00,114.50,4590.00
12,60000.00,12400.00,47600.00,4462.00,9180.00
13,460000.00,12400.00,447600.00,131455.00,32754.80
13,460000.00,12400.00,447600.00,133795.00,30414.80
21,60000.00,24800.00,35200.00,-3771.00,9180.00
22,120000.00,24800.00,95200.00,4924.00,18360.00
23,240000.00,24800.00,215200.00,35807.00,36720.00
Expand Down
Loading
Loading