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

Personal exemption payroll tax #1381

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from 8 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
96 changes: 96 additions & 0 deletions taxcalc/current_law_policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -3190,5 +3190,101 @@
"col_var": "",
"col_label": "",
"value": [0.0]
},

"_FICA_ss_k": {
"long_name": "Social Security payroll tax exemption by number of kids.",
"description": "This is the Social Security payroll tax exemption amount for number of kids. ",
"section_1": "Personal Exemptions",
"section_2": "",
"irs_ref": "",
"notes": "",
"row_var": "FLPDYR",
"row_label": ["2013",
"2014",
"2015",
"2016",
"2017"],
"start_year": 2013,
"cpi_inflated": true,
"col_var": "EIC",
"col_label": ["0kids", "1kid", "2kids", "3+kids"],
"value": [[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0]]
},

"_FICA_mc_k": {
"long_name": "Medicaid payroll tax exemption by number of kids.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Medicare not Medicaid.

"description": "This is the Medicaid payroll tax exemption amount for number of kids. ",
"section_1": "Personal Exemptions",
"section_2": "",
"irs_ref": "",
"notes": "",
"row_var": "FLPDYR",
"row_label": ["2013",
"2014",
"2015",
"2016",
"2017"],
"start_year": 2013,
"cpi_inflated": true,
"col_var": "EIC",
"col_label": ["0kids", "1kid", "2kids", "3+kids"],
"value": [[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0]]
},

"_FICA_ss_f": {
"long_name": "Social Security payroll tax exemption by filing status.",
"description": "This is the Social Security payroll tax exemption amount for a given filing status.",
"section_1": "Personal Exemptions",
"section_2": "",
"irs_ref": "",
"notes": "",
"row_var": "FLPDYR",
"row_label": ["2013",
"2014",
"2015",
"2016",
"2017"],
"start_year": 2013,
"cpi_inflated": true,
"col_var": "MARS",
"col_label": ["single", "joint", "separate", "head of household", "widow"],
"value": [[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0]]
},

"_FICA_mc_f": {
"long_name": "Medicaid payroll tax exemption by filing status.",
"description": "This is the Medicaid payroll tax exemption amount for a given filing status.",
"section_1": "Personal Exemptions",
"section_2": "",
"irs_ref": "",
"notes": "",
"row_var": "FLPDYR",
"row_label": ["2013",
"2014",
"2015",
"2016",
"2017"],
"start_year": 2013,
"cpi_inflated": true,
"col_var": "MARS",
"col_label": ["single", "joint", "separate", "head of household", "widow"],
"value": [[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0]]
}
}
62 changes: 33 additions & 29 deletions taxcalc/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ def EI_PayrollTax(SS_Earnings_c, e00200, e00200p, e00200s,
FICA_ss_trt, FICA_mc_trt, ALD_SelfEmploymentTax_hc,
e00900p, e00900s, e02100p, e02100s,
payrolltax, ptax_was, setax, c03260, ptax_oasdi,
sey, earned, earned_p, earned_s):
sey, earned, earned_p, earned_s,
FICA_ss_f, FICA_ss_k, FICA_mc_f, FICA_mc_k,
pte, ss_exemption, mc_exemption,
EIC, MARS):
"""
Compute part of total OASDI+HI payroll taxes and earned income variables.
"""
Expand All @@ -37,22 +40,41 @@ def EI_PayrollTax(SS_Earnings_c, e00200, e00200p, e00200s,
txearn_sey_p = min(max(0., sey_p * sey_frac), SS_Earnings_c - txearn_was_p)
txearn_sey_s = min(max(0., sey_s * sey_frac), SS_Earnings_c - txearn_was_s)

# compute exemption amount for OASDI and HI payroll taxes
ss_exemption = FICA_ss_f[MARS - 1] + FICA_ss_k[EIC]
mc_exemption = FICA_mc_f[MARS - 1] + FICA_mc_k[EIC]

# compute OASDI and HI payroll taxes on wage-and-salary income
ptax_ss_was_p = FICA_ss_trt * txearn_was_p
ptax_ss_was_s = FICA_ss_trt * txearn_was_s
ptax_mc_was_p = FICA_mc_trt * e00200p
ptax_mc_was_s = FICA_mc_trt * e00200s
ptax_ss_was_p = FICA_ss_trt * max(0., txearn_was_p - ss_exemption)
ptax_ss_was_s = FICA_ss_trt * max(0., txearn_was_s - ss_exemption)
ptax_mc_was_p = FICA_mc_trt * max(0., e00200p - mc_exemption)
ptax_mc_was_s = FICA_mc_trt * max(0., e00200s - mc_exemption)
ptax_was = ptax_ss_was_p + ptax_ss_was_s + ptax_mc_was_p + ptax_mc_was_s

# compute self-employment tax on taxable self-employment income
setax_ss_p = FICA_ss_trt * txearn_sey_p
setax_ss_s = FICA_ss_trt * txearn_sey_s
setax_mc_p = FICA_mc_trt * max(0., sey_p * sey_frac)
setax_mc_s = FICA_mc_trt * max(0., sey_s * sey_frac)
setax_ss_p = FICA_ss_trt * max(0., txearn_sey_p - ss_exemption)
setax_ss_s = FICA_ss_trt * max(0., txearn_sey_s - ss_exemption)
setax_mc_p = FICA_mc_trt * max(0., max(0., sey_p * sey_frac) -
mc_exemption)
setax_mc_s = FICA_mc_trt * max(0., max(0., sey_s * sey_frac) -
mc_exemption)
setax_p = setax_ss_p + setax_mc_p
setax_s = setax_ss_s + setax_mc_s
setax = setax_p + setax_s

# compute total earnings exempt from payroll
pte = ((txearn_was_p - max(0., txearn_was_p - ss_exemption)) +
(txearn_was_s - max(0., txearn_was_s - ss_exemption)) +
(e00200p - max(0., e00200p - mc_exemption)) +
(e00200s - max(0., e00200s - mc_exemption)) +
(txearn_sey_p - max(0., txearn_sey_p - ss_exemption)) +
(txearn_sey_s - max(0., txearn_sey_s - ss_exemption)) +
(max(0., sey_p * sey_frac) -
max(0., max(0., sey_p * sey_frac) - mc_exemption)) +
(max(0., sey_s * sey_frac) -
max(0., max(0., sey_s * sey_frac) - mc_exemption)))


# compute part of total regular payroll taxes for filing unit
payrolltax = ptax_was + setax

Expand All @@ -73,8 +95,8 @@ def EI_PayrollTax(SS_Earnings_c, e00200, e00200p, e00200s,
earned_s = max(0., (e00200s + sey_s -
(1. - ALD_SelfEmploymentTax_hc) * 0.5 * setax_s))
return (sey, payrolltax, ptax_was, setax, c03260, ptax_oasdi,
earned, earned_p, earned_s)

earned, earned_p, earned_s,
pte, ss_exemption, mc_exemption)

@iterate_jit(nopython=True)
def DependentCare(nu13, elderly_dependent, earned,
Expand Down Expand Up @@ -1554,21 +1576,3 @@ def ExpandIncome(c00100, ptax_was, e02400, c02500,
employer_fica_share +
nontaxable_ubi) # universal basic income
return expanded_income


@iterate_jit(nopython=True)
def AfterTaxIncome(combined, expanded_income, aftertax_income):
"""
Calculate after tax income

Parameters
----------
combined: combined tax liability
expanded_income: expanded income

Returns
-------
aftertax_income: expanded_income - combined
"""
aftertax_income = expanded_income - combined
return aftertax_income
17 changes: 13 additions & 4 deletions taxcalc/records_variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -881,11 +881,20 @@
"type": "float",
"desc": "Marginal income tax rate (in percentage terms) on extra taxpayer earnings (e00200p)",
"form": {}
},
"aftertax_income": {
},
"ss_exemption": {
"type": "float",
"desc": "After tax income. Equal to expanded_income - combined",
"desc": "Social Security payroll tax exemption. Equal to _SS_em_f + _SS_em_k",
"form": {}
}
},
"mc_exemption": {
"type": "float",
"desc": "Medicaid payroll tax exemption. Equal to _FICA_em_f + _FICA_em_k",
"form": {}
},
"pte": {
"type": "float",
"desc": "Total income not subject to payroll taxes"
}
}
}