Skip to content

Commit

Permalink
Merge pull request #2659 from jdebacker/sey400
Browse files Browse the repository at this point in the history
Threshold for self-employment income exempt from SECA taxes
  • Loading branch information
MattHJensen authored Jun 24, 2022
2 parents 726c51b + 8969262 commit 98b23dc
Show file tree
Hide file tree
Showing 8 changed files with 112 additions and 28 deletions.
11 changes: 10 additions & 1 deletion taxcalc/calcfunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ def BenefitPrograms(calc):
@iterate_jit(nopython=True)
def EI_PayrollTax(SS_Earnings_c, e00200p, e00200s, pencon_p, pencon_s,
FICA_ss_trt, FICA_mc_trt, ALD_SelfEmploymentTax_hc,
SS_Earnings_thd, e00900p, e00900s, e02100p, e02100s, k1bx14p,
SS_Earnings_thd, SECA_Earnings_thd,
e00900p, e00900s, e02100p, e02100s, k1bx14p,
k1bx14s, payrolltax, ptax_was, setax, c03260, ptax_oasdi,
sey, earned, earned_p, earned_s,
was_plus_sey_p, was_plus_sey_s):
Expand Down Expand Up @@ -134,6 +135,9 @@ def EI_PayrollTax(SS_Earnings_c, e00200p, e00200s, pencon_p, pencon_s,
Additional taxable earnings threshold for Social Security
Individual earnings above this threshold are subjected to OASDI payroll tax, in addtion to
earnings below the maximum taxable earnings threshold.
SECA_Earnings_thd: float
Threshold value for self-employment income below which there is
no SECA tax liability
e00900p: float
Schedule C business net profit/loss for taxpayer
e00900s: float
Expand Down Expand Up @@ -233,6 +237,11 @@ def EI_PayrollTax(SS_Earnings_c, e00200p, e00200s, pencon_p, pencon_s,
setax_p = setax_ss_p + setax_mc_p
setax_s = setax_ss_s + setax_mc_s
setax = setax_p + setax_s
# # no tax if low amount of self-employment income
if sey * sey_frac > SECA_Earnings_thd:
setax = setax_p + setax_s
else:
setax = 0.0

# compute extra OASDI payroll taxes on the portion of the sum
# of wage-and-salary income and taxable self employment income
Expand Down
26 changes: 26 additions & 0 deletions taxcalc/policy_current_law.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,32 @@
"cps": true
}
},
"SECA_Earnings_thd": {
"title": "Minimum self-employment earnings before trigger SECA liability",
"description": "Individual self-employment earnings below this amount are not subject to SECA taxes.",
"notes": "To compute earnings for this threshold, will multiply net self-employment by 1 - SECA_Earnings_hc",
"section_1": "Payroll Taxes",
"section_2": "Social Security FICA",
"indexable": true,
"indexed": false,
"type": "float",
"value": [
{
"year": 2013,
"value": 400.0
}
],
"validators": {
"range": {
"min": 0,
"max": 9e+99
}
},
"compatible_data": {
"puf": true,
"cps": true
}
},
"SS_Earnings_thd": {
"title": "Additional Taxable Earnings Threshold for Social Security",
"description": "Individual earnings above this threshold are subjected to Social Security (OASDI) payroll tax, in addition to earnings below the maximum taxable earnings threshold.",
Expand Down
26 changes: 13 additions & 13 deletions taxcalc/tests/cmpi_cps_expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ ALL 6.179 22.043 -72.0
TABLE for ITAX
AGI category T-C SOI %diff
[-9e+99, 1) -0.020 0.242 -108.0
[1, 5000) -1.630 0.041 -4084.5
[1, 5000) -1.630 0.041 -4084.7
[5000, 10000) -7.181 0.368 -2051.4
[10000, 15000) -10.397 1.381 -852.7
[15000, 20000) -8.674 3.524 -346.2
Expand All @@ -77,37 +77,37 @@ AGI category T-C SOI %diff
[40000, 50000) 25.845 32.530 -20.6
[50000, 75000) 84.127 99.792 -15.7
[75000, 100000) 91.075 105.901 -14.0
[100000, 200000) 343.322 316.350 +8.5
[100000, 200000) 343.323 316.350 +8.5
[200000, 500000) 239.244 299.832 -20.2
[500000, 1000000) 62.869 154.389 -59.3
[1000000, 1500000) 26.106 66.324 -60.6
[1500000, 2000000) 5.167 39.672 -87.0
[2000000, 5000000) 7.754 101.489 -92.4
[5000000, 10000000) 7.473 56.334 -86.7
[10000000, 9e+99) 49.446 139.611 -64.6
ALL 918.982 1457.891 -37.0
ALL 918.983 1457.891 -37.0
TABLE for SETAX
AGI category T-C SOI %diff
[-9e+99, 1) 0.020 0.656 -97.0
[1, 5000) 0.102 0.555 -81.6
[-9e+99, 1) 0.014 0.656 -97.9
[1, 5000) 0.101 0.555 -81.8
[5000, 10000) 0.319 1.896 -83.2
[10000, 15000) 0.745 3.514 -78.8
[10000, 15000) 0.744 3.514 -78.8
[15000, 20000) 0.859 2.823 -69.6
[20000, 25000) 1.466 1.996 -26.6
[25000, 30000) 4.397 1.802 +144.0
[30000, 40000) 7.329 3.360 +118.2
[40000, 50000) 5.876 2.820 +108.4
[50000, 75000) 7.656 5.958 +28.5
[75000, 100000) 4.149 5.275 -21.3
[100000, 200000) 9.515 12.149 -21.7
[25000, 30000) 4.396 1.802 +144.0
[30000, 40000) 7.328 3.360 +118.1
[40000, 50000) 5.875 2.820 +108.4
[50000, 75000) 7.655 5.958 +28.5
[75000, 100000) 4.147 5.275 -21.4
[100000, 200000) 9.513 12.149 -21.7
[200000, 500000) 5.037 9.686 -48.0
[500000, 1000000) 0.719 3.486 -79.4
[1000000, 1500000) 0.181 1.194 -84.8
[1500000, 2000000) 0.003 0.643 -99.5
[2000000, 5000000) 0.041 1.253 -96.7
[5000000, 10000000) 0.031 0.470 -93.4
[10000000, 9e+99) 0.073 0.638 -88.6
ALL 48.519 60.174 -19.4
ALL 48.503 60.174 -19.4
TABLE for AMTAX
AGI category T-C SOI %diff
[-9e+99, 1) 0.000 0.022 -100.0
Expand Down
8 changes: 4 additions & 4 deletions taxcalc/tests/cmpi_puf_expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,19 @@ AGI category T-C SOI %diff
[15000, 20000) 3.636 2.823 +28.8
[20000, 25000) 2.223 1.996 +11.4
[25000, 30000) 1.988 1.802 +10.3
[30000, 40000) 3.084 3.360 -8.2
[40000, 50000) 2.915 2.820 +3.4
[30000, 40000) 3.083 3.360 -8.2
[40000, 50000) 2.914 2.820 +3.3
[50000, 75000) 5.794 5.958 -2.7
[75000, 100000) 4.699 5.275 -10.9
[100000, 200000) 9.316 12.149 -23.3
[100000, 200000) 9.315 12.149 -23.3
[200000, 500000) 6.013 9.686 -37.9
[500000, 1000000) 1.638 3.486 -53.0
[1000000, 1500000) 0.490 1.194 -58.9
[1500000, 2000000) 0.188 0.643 -70.7
[2000000, 5000000) 0.282 1.253 -77.4
[5000000, 10000000) 0.063 0.470 -86.6
[10000000, 9e+99) 0.033 0.638 -94.8
ALL 49.781 60.174 -17.3
ALL 49.779 60.174 -17.3
TABLE for AMTAX
AGI category T-C SOI %diff
[-9e+99, 1) 0.012 0.022 -45.5
Expand Down
10 changes: 5 additions & 5 deletions taxcalc/tests/cpscsv_agg_expect.csv
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ Itemized Deduction ($b),1223.9,620.2,662.1,733.4,760.9,728.2,771.9,822.6,878.9,1
Standard Deduction Filers (#m),124.1,175.0,176.6,177.4,179.0,183.1,184.6,186.0,187.4,139.1
Standard Deduction ($b),1090.5,2945.0,3020.6,3088.3,3145.6,3324.6,3413.3,3506.9,3604.7,1451.1
Personal Exemption ($b),1383.5,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1870.9
Taxable Income ($b),6229.7,7976.5,8397.0,8372.9,9126.0,9363.1,9743.6,10184.5,10658.7,10508.5
Taxable Income ($b),6229.7,7976.5,8397.0,8372.9,9126.0,9363.1,9743.6,10184.6,10658.7,10508.5
Regular Tax ($b),1107.9,1383.9,1460.0,1457.7,1585.9,1630.6,1705.0,1789.2,1879.9,2088.3
AMT Income ($b),8320.5,10279.2,10758.5,10791.9,11610.8,11950.0,12395.9,12908.8,13458.6,13457.8
AMT Liability ($b),8.2,0.8,0.9,0.4,1.0,1.0,0.9,0.9,0.9,15.3
AMT Filers (#m),2.6,0.2,0.2,0.1,0.2,0.2,0.2,0.2,0.2,4.1
Tax before Credits ($b),1116.1,1384.7,1460.9,1458.1,1586.9,1631.6,1705.9,1790.1,1880.8,2103.6
Tax before Credits ($b),1116.1,1384.7,1460.9,1458.1,1586.9,1631.6,1705.9,1790.2,1880.8,2103.6
Refundable Credits ($b),70.7,102.4,102.4,657.7,834.2,105.9,106.1,106.2,107.0,91.6
Nonrefundable Credits ($b),32.6,97.2,99.2,98.8,2.1,103.7,105.6,107.5,109.4,33.1
Reform Surtaxes ($b),0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
Other Taxes ($b),5.5,11.0,11.1,11.0,11.8,12.3,13.1,13.7,14.5,15.3
Ind Income Tax ($b),1018.2,1196.1,1270.4,712.7,762.4,1434.4,1507.3,1590.2,1678.9,1994.3
Payroll Taxes ($b),1041.0,1141.5,1195.6,1206.6,1268.2,1323.0,1380.1,1442.0,1506.5,1570.0
Combined Liability ($b),2059.2,2337.6,2466.0,1919.2,2030.6,2757.4,2887.4,3032.1,3185.3,3564.3
Payroll Taxes ($b),1041.0,1141.5,1195.6,1206.6,1268.2,1323.0,1380.1,1442.0,1506.4,1570.0
Combined Liability ($b),2059.1,2337.6,2465.9,1919.2,2030.6,2757.4,2887.4,3032.1,3185.3,3564.3
With Income Tax <= 0 (#m),88.0,96.2,96.8,136.0,130.8,99.8,100.5,101.1,101.5,98.5
With Combined Tax <= 0 (#m),62.7,65.3,66.2,98.7,100.0,69.5,70.5,71.4,72.2,71.4
With Combined Tax <= 0 (#m),62.8,65.3,66.3,98.7,100.1,69.6,70.5,71.4,72.3,71.5
UBI Benefits ($b),0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
"Total Benefits, Consumption Value ($b)",2790.9,3225.5,3428.6,3617.9,4011.6,4064.2,4306.0,4560.9,4830.4,5105.8
Total Benefits Cost ($b),2790.9,3225.5,3428.6,3617.9,4011.6,4064.2,4306.0,4560.9,4830.4,5105.8
2 changes: 1 addition & 1 deletion taxcalc/tests/pufcsv_agg_expect.csv
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Ind Income Tax ($b),1577.9,1531.8,1620.3,1062.1,1165.8,1809.1,1882.9,1978.2,2081
Payroll Taxes ($b),1083.8,1133.1,1186.2,1197.8,1259.0,1312.4,1368.7,1429.5,1493.2,1556.1
Combined Liability ($b),2661.7,2664.9,2806.5,2259.8,2424.8,3121.5,3251.6,3407.7,3575.0,3979.0
With Income Tax <= 0 (#m),92.8,98.5,99.6,132.4,127.5,103.2,104.2,105.0,106.0,101.9
With Combined Tax <= 0 (#m),63.3,65.5,66.7,102.7,96.4,70.3,71.4,72.4,73.5,72.9
With Combined Tax <= 0 (#m),63.4,65.5,66.7,102.7,96.4,70.3,71.4,72.4,73.5,73.0
UBI Benefits ($b),0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
"Total Benefits, Consumption Value ($b)",1052.3,1104.9,1174.1,1244.8,1494.0,1406.5,1489.3,1579.4,1672.9,1772.0
Total Benefits Cost ($b),1052.3,1104.9,1174.1,1244.8,1494.0,1406.5,1489.3,1579.4,1672.9,1772.0
8 changes: 4 additions & 4 deletions taxcalc/tests/pufcsv_mtr_expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ PTAX and ITAX mtr histogram bin counts for e00200s:
119177 : 0 20308 0 0 0 0 0 89701 9168 0
119177 : 1449 22 766 2750 11486 31171 26130 24100 20734 569
PTAX and ITAX mtr histogram bin counts for e00900p:
252868 : 21567 26608 0 0 0 0 0 204693 0 0
252868 : 7375 73 1967 12984 60475 64290 56852 30530 18020 302
252868 : 213351 6567 0 0 0 0 0 32950 0 0
252868 : 7375 73 1967 12888 47679 74863 51687 32973 22719 644
PTAX and ITAX mtr histogram bin counts for e00300:
252868 : 252868 0 0 0 0 0 0 0 0 0
252868 : 0 0 0 0 67637 76838 46575 31861 29137 820
Expand Down Expand Up @@ -59,5 +59,5 @@ PTAX and ITAX mtr histogram bin counts for e20100:
252868 : 252868 0 0 0 0 0 0 0 0 0
252868 : 39488 32429 19769 4902 156280 0 0 0 0 0
PTAX and ITAX mtr histogram bin counts for k1bx14p:
252868 : 21567 26608 0 0 0 0 0 204693 0 0
252868 : 7375 73 1967 12984 60475 64290 56852 30530 18020 302
252868 : 213351 6567 0 0 0 0 0 32950 0 0
252868 : 7375 73 1967 12888 47679 74863 51687 32973 22719 644
49 changes: 49 additions & 0 deletions taxcalc/tests/test_calcfunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,55 @@ def test_StdDed(test_tuple, expected_value, skip_jit):
assert np.allclose(test_value, expected_value)


tuple1 = (120000, 10000, 15000, 100, 2000, 0.12, 0.03, 0, 99999999999,
400, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,
None, None, None, None, None)
tuple2 = (120000, 10000, 15000, 100, 2000, 0.12, 0.03, 0, 99999999999,
400, 2000, 0, 10000, 0, 0, 3000, None, None, None, None, None,
None, None, None, None, None, None)
tuple3 = (120000, 150000, 15000, 100, 2000, 0.12, 0.03, 0, 99999999999,
400, 2000, 0, 10000, 0, 0, 3000, None, None, None, None, None,
None, None, None, None, None, None)
tuple4 = (120000, 500000, 15000, 100, 2000, 0.12, 0.03, 0, 400000,
400, 2000, 0, 10000, 0, 0, 3000, None, None, None, None, None,
None, None, None, None, None, None)
tuple5 = (120000, 10000, 15000, 100, 2000, 0.12, 0.03, 0, 99999999999,
400, 300, 0, 0, 0, 0, 0, None, None, None, None, None,
None, None, None, None, None, None)
tuple6 = (120000, 10000, 15000, 100, 2000, 0.12, 0.03, 0, 99999999999,
400, 0, 0, 0, 0, -40000, 0, None, None, None, None, None,
None, None, None, None, None, None)
expected1 = (0, 4065, 4065, 0, 0, 3252, 25000, 10000, 15000, 10100,
17000)
expected2 = (15000, 6146.25, 4065, 2081.25, 1040.625, 4917, 38959.375,
21167.5, 17791.875, 21380, 19820)
expected3 = (15000, 22202.25, 21453, 749.25, 374.625, 16773, 179625.375,
161833.5, 17791.875, 161380, 19820)
expected4 = (15000, 46067.85, 31953, 749.25, 374.625, 30138.6,
529625.375, 511833.5, 17791.875, 511380, 19820)
expected5 = (300, 4065, 4065, 0, 0, 3285.3, 25300, 10279.1875, 15000,
10382, 17000)
expected6 = (-40000, 4065, 4065, 0, 0, 3252, 0, 0, 15000, 10100, 17000)

@pytest.mark.parametrize(
'test_tuple,expected_value', [
(tuple1, expected1),
(tuple2, expected2),
(tuple3, expected3),
(tuple4, expected4),
(tuple5, expected5),
(tuple6, expected6)], ids=[
'case 1', 'case 2', 'case 3', 'case 4', 'case 5', 'case 6'])
def test_EI_PayrollTax(test_tuple, expected_value, skip_jit):
"""
Tests the EI_PayrollTax function
"""
test_value = calcfunctions.EI_PayrollTax(*test_tuple)
print('Test value = ', test_value)

assert np.allclose(test_value, expected_value)


def test_AfterTaxIncome(skip_jit):
'''
Tests the AfterTaxIncome function
Expand Down

0 comments on commit 98b23dc

Please sign in to comment.