Tax-Calculator CalcFunctions#
Tax-Calculator CalcFunctions
taxcalc.calcfunctions#
Tax-Calculator functions that calculate payroll and individual income taxes.
These functions are imported into the Calculator class.
Note: the parameter_indexing_CPI_offset parameter is no longer used.
- taxcalc.calcfunctions.AGI(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.AGIsurtax(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.ALD_InvInc_ec_base(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.AMT(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.AdditionalCTC(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.AdditionalMedicareTax(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.Adj(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.AfterTaxIncome(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.AmOppCreditParts(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.BenefitPrograms(calc)[source]#
Aggregate per-record government cost and consumption value of the non-tax benefit programs tracked by Tax-Calculator and write them to the Records arrays benefit_cost_total and benefit_value_total.
This function does not implement any IRS form; it is a model-internal aggregator. For each program a BEN_*_repeal policy parameter, when set, zeroes the program’s per-record array before the sums are formed (UBI has no repeal flag because UBI is itself a reform construct that is zero under current law). In-kind programs are weighted by a BEN_*_value consumption parameter; cash programs (SSI, OASDI = e02400, UI = e02300, UBI) are valued at full dollar cost. benefit_value_total is consumed downstream by ExpandIncome via expanded_income.
- Parameters:
calc (Calculator object) – calc represents the reform while self represents the baseline
- Returns:
The function modifies calc
- Return type:
None
- taxcalc.calcfunctions.C1040(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.CTC_new(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.CharityCredit(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.ChildDepTaxCredit(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.DependentCare(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.EITC(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.EITCamount(basic_frac, phasein_rate, earnings, max_amount, phaseout_start, agi, phaseout_rate)[source]#
Returns the EIC Worksheet A (or B) line 6 amount: the smaller of the earned-income-based credit (line 2, an EIC-Table lookup keyed on earnings) and the AGI-based credit (line 5, the same lookup keyed on AGI when AGI exceeds the phaseout start).
- The trapezoidal credit schedule is:
phase-in: phasein_rate * earnings
plateau: max_amount
phase-out: max_amount - phaseout_rate * (max(earnings, AGI) - ps)
English parameter names are used because the EIC Table is published rather than the algebraic formula; basic_frac is a reform-only knob (0 under current law) that shifts the schedule so a fraction of max_amount is paid at zero earnings.
- Parameters:
basic_frac (float) – Fraction of maximum earned income credit paid at zero earnings (reform-only; 0 under current law)
phasein_rate (float) – Earned income credit phasein rate (EIC Table phase-in slope)
earnings (float) – Earned income for filing unit (EIC Worksheet A line 1)
max_amount (float) – Maximum earned income credit (EIC Table plateau)
phaseout_start (float) – Earned income credit phaseout start (EIC Worksheet A line 3 threshold; AGI/earnings at which line 5 begins to bite)
agi (float) – Adjusted Gross Income (Form 1040 line 11; EIC Worksheet A line 3) — the worksheet uses AGI rather than earnings to compute line 5 when AGI exceeds line 4
phaseout_rate (float) – Earned income credit phaseout rate (EIC Table phase-out slope)
- Returns:
eitc – Earned Income Credit (EIC Worksheet A line 6)
- Return type:
float
- taxcalc.calcfunctions.EI_PayrollTax(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.EducationTaxCredit(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.ExpandIncome(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.F2441(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.GainsTax(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.IITAX(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.ItemDed(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.LumpSumTax(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.NetInvIncTax(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.NonrefundableCredits(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.PersonalTaxCredit(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.RefundablePayrollTaxCredit(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.SSBenefits(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.SchR(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.SchXYZ(taxable_income, MARS, II_rt1, II_rt2, II_rt3, II_rt4, II_rt5, II_rt6, II_rt7, II_rt8, II_brk1, II_brk2, II_brk3, II_brk4, II_brk5, II_brk6, II_brk7)[source]#
Function that returns tax amount given the progressive tax rate schedule specified by the II_rt? and (upper) II_brk? parameters and given taxable income and filing status (MARS).
- Parameters:
taxable_income (float) – Regular taxable income
MARS (int) –
- Filing (marital) status. (1=single, 2=joint, 3=separate,
4=household-head, 5=widow(er))
II_rt1 (float) – Personal income (regular/non-AMT) tax rate 1
II_rt2 (float) – Personal income (regular/non-AMT) tax rate 2
II_rt3 (float) – Personal income (regular/non-AMT) tax rate 3
II_rt4 (float) – Personal income (regular/non-AMT) tax rate 4
II_rt5 (float) – Personal income (regular/non-AMT) tax rate 5
II_rt6 (float) – Personal income (regular/non-AMT) tax rate 6
II_rt7 (float) – Personal income (regular/non-AMT) tax rate 7
II_rt8 (float) – Personal income (regular/non-AMT) tax rate 8
II_brk1 (list) – Personal income (regular/non-AMT) tax bracket (upper threshold) 1
II_brk2 (list) – Personal income (regular/non-AMT) tax bracket (upper threshold) 2
II_brk3 (list) – Personal income (regular/non-AMT) tax bracket (upper threshold) 3
II_brk4 (list) – Personal income (regular/non-AMT) tax bracket (upper threshold) 4
II_brk5 (list) – Personal income (regular/non-AMT) tax bracket (upper threshold) 5
II_brk6 (list) – Personal income (regular/non-AMT) tax bracket (upper threshold) 6
II_brk7 (list) – Personal income (regular/non-AMT) tax bracket (upper threshold) 7
- Return type:
Regular individual income tax liability on all taxable income
- taxcalc.calcfunctions.SchXYZTax(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.StdDed(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.TaxInc(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.
- taxcalc.calcfunctions.UBI(*args, **kwargs)#
wrapper function nested in make_wrapper function nested in iterate_jit decorator.