# Calculate Federal Income Tax for Grad Students under the House Tax Plan

 Pay Notebook Creator: Salah Ahmed 0 Set Container: Numerical CPU with TINY Memory for 10 Minutes 0 Total 0

# Calculate Federal Income Tax for Grad Students under the House Tax Plan¶

Based on excel sheet from this npr article

{total_income_int: Total Income ? Enter the total amount of your annual take-home income (i.e. money that you get as a paycheck)}

{health_insurance_plan_int: Health Insurance Plan ? Enter the amount of your health insurance plan if your institution gives you one as part of your appointment.}

{tuition_int: Tuition ? Enter the amount of tuition you have had waived}

{fellowship_int: Fellowship? ? no = 0}

In [18]:
# Crosscompute
total_income_int = 35000
health_insurance_plan_int = 4304
tuition_int = 17500
fellowship_int = 0
target_folder = '.'

In [19]:
fellowship = 1 if fellowship_int != 0 else 0

In [20]:
def get_taxable_income(income, std_deduction, personal_exemption):
return income - std_deduction - personal_exemption

In [21]:
# current law
taxable_income = get_taxable_income(total_income_int, 6350, 4050)

In [22]:
taxable_income

Out[22]:
24600
In [23]:
if taxable_income >= 0 and taxable_income <= 9325:
curr_tax = .1 * taxable_income
elif taxable_income > 9325 and taxable_income <= 37950:
curr_tax = 932.5 + (0.15 * (taxable_income - 9325))
elif taxable_income > 37950 and taxable_income <= 91900:
curr_tax =  5526.25 + (0.25 * (taxable_income - 37950))

In [24]:
text = ['current taxable income = %d' % taxable_income]
text.append('current tax = %d' % curr_tax)

In [25]:
# tax cuts and jobs act
income = total_income_int + health_insurance_plan_int + (tuition_int * (1 - fellowship))
new_taxable_income = get_taxable_income(income, 12200, 0)

In [26]:
new_taxable_income

Out[26]:
44604
In [27]:
if new_taxable_income >= 0 and new_taxable_income <= 45000:
new_tax = .12 * new_taxable_income
elif new_taxable_income > 45000 and new_taxable_income <= 200000:
new_tax = 5400 + (0.25 * (new_taxable_income - 45000))

In [28]:
text.append('new taxable income = %d' % new_taxable_income)
text.append('new tax = %d' % new_tax)

In [29]:
tax_incr = new_tax - curr_tax

In [30]:
percent_incr = (tax_incr / curr_tax) * 100

In [31]:
percent_incr

Out[31]:
66.03272586273748
In [32]:
text.append('tax increase (dollars) = \$%d' % tax_incr)
text.append('tax increase (percentage) = %.2f%%' % percent_incr)

In [34]:
from os.path import join
path = join(target_folder, 'results.txt')
with open(path, 'w') as f:
f.writelines([x + '\n' for x in text])
print('results_text_path = %s' % path)

results_text_path = ./results.txt