Skip to content

Commit

Permalink
Merge pull request #2786 from martinholmer/add-ctc_nonrefundable-vari…
Browse files Browse the repository at this point in the history
…able

Add ctc_nonrefundable variable
  • Loading branch information
martinholmer authored Jul 29, 2024
2 parents fb0c3c0 + 2c6ee1b commit b17eeb9
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 21 deletions.
37 changes: 22 additions & 15 deletions taxcalc/calcfunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2455,7 +2455,7 @@ def ChildDepTaxCredit(age_head, age_spouse, nu18, n24, MARS, c00100, XTOT, num,
c07200,
CTC_c, CTC_ps, CTC_prt, exact, ODC_c,
CTC_c_under6_bonus, nu06,
CTC_refundable, CTC_include17,
CTC_is_refundable, CTC_include17,
c07220, odc, codtc_limited):
"""
Computes amounts on "Child Tax Credit and Credit for Other Dependents
Expand Down Expand Up @@ -2554,7 +2554,7 @@ def ChildDepTaxCredit(age_head, age_spouse, nu18, n24, MARS, c00100, XTOT, num,
line13 = line11 - line12
line14 = 0.
line15 = max(0., line13 - line14)
if CTC_refundable:
if CTC_is_refundable:
c07220 = line10 * line1 / line3
odc = max(0., line10 - c07220)
codtc_limited = max(0., line10 - c07220 - odc)
Expand Down Expand Up @@ -2924,7 +2924,7 @@ def CharityCredit(e19800, e20100, c00100, CR_Charity_rt, CR_Charity_f,
def NonrefundableCredits(c05800, e07240, e07260, e07300, e07400,
e07600, p08000, odc,
personal_nonrefundable_credit,
CTC_refundable,
CTC_is_refundable,
CR_RetirementSavings_hc, CR_ForeignTax_hc,
CR_ResidentialEnergy_hc, CR_GeneralBusiness_hc,
CR_MinimumTax_hc, CR_OtherCredits_hc, charity_credit,
Expand Down Expand Up @@ -2953,7 +2953,7 @@ def NonrefundableCredits(c05800, e07240, e07260, e07300, e07400,
Other Dependent Credit
personal_nonrefundable_credit: float
Personal nonrefundable credit
CTC_refundable: bool
CTC_is_refundable: bool
Whether the child tax credit is fully refundable
CR_RetirementSavings_hc: float
Credit for retirement savings haircut
Expand Down Expand Up @@ -3033,7 +3033,7 @@ def NonrefundableCredits(c05800, e07240, e07260, e07300, e07400,
c07240 = min(e07240 * (1. - CR_RetirementSavings_hc), avail)
avail = avail - c07240
# Child tax credit
if not CTC_refundable:
if not CTC_is_refundable:
c07220 = min(c07220, avail)
avail = avail - c07220
# Other dependent credit
Expand Down Expand Up @@ -3067,7 +3067,8 @@ def NonrefundableCredits(c05800, e07240, e07260, e07300, e07400,
@iterate_jit(nopython=True)
def AdditionalCTC(codtc_limited, ACTC_c, n24, earned, ACTC_Income_thd,
ACTC_rt, nu06, ACTC_rt_bonus_under6family, ACTC_ChildNum,
CTC_refundable, CTC_include17, age_head, age_spouse, MARS, nu18,
CTC_is_refundable, CTC_include17,
age_head, age_spouse, MARS, nu18,
ptax_was, c03260, e09800, c59660, e11200,
c11070):
"""
Expand Down Expand Up @@ -3115,7 +3116,7 @@ def AdditionalCTC(codtc_limited, ACTC_c, n24, earned, ACTC_Income_thd,
# Part I
line3 = codtc_limited

if CTC_refundable:
if CTC_is_refundable:
line4 = 0.
else:
if CTC_include17:
Expand Down Expand Up @@ -3156,7 +3157,8 @@ def AdditionalCTC(codtc_limited, ACTC_c, n24, earned, ACTC_Income_thd,
def C1040(c05800, c07180, c07200, c07220, c07230, c07240, c07260, c07300,
c07400, c07600, c08000, e09700, e09800, e09900, niit, othertaxes,
c07100, c09200, odc, charity_credit,
personal_nonrefundable_credit, CTC_refundable, ODC_refundable):
personal_nonrefundable_credit,
CTC_is_refundable, ODC_is_refundable):
"""
Computes total used nonrefundable credits, c07100, othertaxes, and
income tax before refundable credits, c09200.
Expand Down Expand Up @@ -3217,8 +3219,9 @@ def C1040(c05800, c07180, c07200, c07220, c07230, c07240, c07260, c07300,
"""
# total used nonrefundable credits (as computed in NonrefundableCredits)
c07100 = (c07180 + c07200 + c07600 + c07300 + c07400 +
c07220 * (1. - CTC_refundable) + c08000 +
c07230 + c07240 + c07260 + odc * (1. - ODC_refundable) + charity_credit +
c07220 * (1. - CTC_is_refundable) + c08000 +
c07230 + c07240 + c07260 +
odc * (1. - ODC_is_refundable) + charity_credit +
personal_nonrefundable_credit)
# tax after credits (2016 Form 1040, line 56)
tax_net_nonrefundable_credits = max(0., c05800 - c07100)
Expand Down Expand Up @@ -3319,8 +3322,8 @@ def CTC_new(CTC_new_c, CTC_new_rt, CTC_new_c_under6_bonus,
@iterate_jit(nopython=True)
def IITAX(c59660, c11070, c10960, personal_refundable_credit, ctc_new, rptc,
c09200, payrolltax, CDCC_refund, recovery_rebate_credit,
eitc, c07220, odc, CTC_refundable, ODC_refundable, refund,
ctc_total, ctc_refundable, iitax, combined):
eitc, c07220, odc, CTC_is_refundable, ODC_is_refundable, refund,
ctc_total, ctc_refundable, ctc_nonrefundable, iitax, combined):
"""
Computes final taxes.
Expand Down Expand Up @@ -3366,17 +3369,19 @@ def IITAX(c59660, c11070, c10960, personal_refundable_credit, ctc_new, rptc,
Total CTC amount (c07220 + c11070 + odc + ctc_new)
ctc_refundable: float
Portion of total CTC amount that is refundable
ctc_nonrefundable: float
Portion of total CTC amount that is nonrefundable
iitax: float
Total federal individual income tax liability
combined: float
Sum of iitax and payrolltax and lumpsum_tax
"""
eitc = c59660
if CTC_refundable:
if CTC_is_refundable:
ctc_refund = c07220
else:
ctc_refund = 0.
if ODC_refundable:
if ODC_is_refundable:
odc_refund = odc
else:
odc_refund = 0.
Expand All @@ -3385,9 +3390,11 @@ def IITAX(c59660, c11070, c10960, personal_refundable_credit, ctc_new, rptc,
odc_refund)
ctc_total = c07220 + c11070 + odc + ctc_new
ctc_refundable = ctc_refund + c11070 + odc_refund + ctc_new
ctc_nonrefundable = max(0., ctc_total - ctc_refundable)
iitax = c09200 - refund
combined = iitax + payrolltax
return (eitc, refund, ctc_total, ctc_refundable, iitax, combined)
return (eitc, refund, ctc_total, ctc_refundable, ctc_nonrefundable,
iitax, combined)


@JIT(nopython=True)
Expand Down
4 changes: 2 additions & 2 deletions taxcalc/policy_current_law.json
Original file line number Diff line number Diff line change
Expand Up @@ -16591,7 +16591,7 @@
"cps": true
}
},
"CTC_refundable": {
"CTC_is_refundable": {
"title": "Whether the child tax credit is fully refundable",
"description": "If true, the child tax credit is made fully refundable.",
"notes": "If true, the Additional Child Tax Credit is not used.",
Expand Down Expand Up @@ -16625,7 +16625,7 @@
"cps": true
}
},
"ODC_refundable": {
"ODC_is_refundable": {
"title": "Whether the other dependents tax credit is fully refundable",
"description": "If true, the other dependents tax credit is made fully refundable.",
"notes": "",
Expand Down
5 changes: 5 additions & 0 deletions taxcalc/records_variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,11 @@
"desc": "Total CTC amount (c07220 + c11070 + odc + ctc_new)",
"form": {"2013-20??": "calculated variable"}
},
"ctc_nonrefundable": {
"type": "float",
"desc": "Portion of total CTC amount that is nonrefundable",
"form": {"2013-20??": "calculated variable"}
},
"ctc_refundable": {
"type": "float",
"desc": "Portion of total CTC amount that is refundable",
Expand Down
8 changes: 4 additions & 4 deletions taxcalc/reforms/ARPA.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
"2021": 0},
"UI_thd": {"2020": [150000, 150000, 150000, 150000, 150000],
"2021": [0, 0, 0, 0, 0]},
"CTC_refundable": {"2021": true,
"2022": false},
"ODC_refundable": {"2021": true,
"2022": false},
"CTC_is_refundable": {"2021": true,
"2022": false},
"ODC_is_refundable": {"2021": true,
"2022": false},
"CTC_include17": {"2021": true,
"2022": false},
"CTC_new_c": {"2021": 1000,
Expand Down

0 comments on commit b17eeb9

Please sign in to comment.