PSLmodels/Tax-Calculator

Parameterize the `2500` value in `AGI` formula

MaxGhenis opened this issue · 1 comments

The hard-coded 2500 in the AGI formula here looks like a phase-out start:

# phase-out personal exemption amount
if exact == 1: # exact calculation as on tax forms
line5 = max(0., c00100 - II_em_ps[MARS - 1])
line6 = math.ceil(line5 / (2500. / sep))
line7 = II_prt * line6
c04600 = max(0., pre_c04600 * (1. - line7))
else: # smoothed calculation needed for sensible mtr calculation
dispc_numer = II_prt * (c00100 - II_em_ps[MARS - 1])
dispc_denom = 2500. / sep
dispc = min(1., max(0., dispc_numer / dispc_denom))
c04600 = pre_c04600 * (1. - dispc)
return (c00100, pre_c04600, c04600)

It looks like the 2500 is part of the personal exemption phaseout.

From section 151 of the internal revenue code:

For each $2,500 (or fraction thereof) by which the taxpayer’s adjusted gross income for the taxable year exceeds the applicable amount, the personal exemption is reduced by 2 percent.