taxcalc 4.1.0__py3-none-any.whl → 4.2.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
taxcalc/__init__.py CHANGED
@@ -14,4 +14,4 @@ from taxcalc.taxcalcio import *
14
14
  from taxcalc.utils import *
15
15
  from taxcalc.cli import *
16
16
 
17
- __version__ = '4.1.0'
17
+ __version__ = '4.2.1'
taxcalc/calcfunctions.py CHANGED
@@ -781,7 +781,7 @@ def ItemDedCap(e17500, e18400, e18500, e19200, e19800, e20100, e20400, g20500,
781
781
  e19800: float
782
782
  Itemizable charitable giving: cash/check contributions
783
783
  e20100: float
784
- Itemizable charitalb giving: other than cash/check contributions
784
+ Itemizable charitable giving: other than cash/check contributions
785
785
  e20400: float
786
786
  Itemizable gross (before 10% AGI disregard) casualty or theft loss
787
787
  g20500: float
@@ -887,7 +887,7 @@ def ItemDed(e17500_capped, e18400_capped, e18500_capped, e19200_capped,
887
887
  c17000, c18300, c19200, c19700, c20500, c20800,
888
888
  ID_ps, ID_Medical_frt, ID_Medical_frt_add4aged, ID_Medical_hc,
889
889
  ID_Casualty_frt, ID_Casualty_hc, ID_Miscellaneous_frt,
890
- ID_Miscellaneous_hc, ID_Charity_crt_all, ID_Charity_crt_noncash,
890
+ ID_Miscellaneous_hc, ID_Charity_crt_cash, ID_Charity_crt_noncash,
891
891
  ID_prt, ID_crt, ID_c, ID_StateLocalTax_hc, ID_Charity_frt,
892
892
  ID_Charity_hc, ID_InterestPaid_hc, ID_RealEstate_hc,
893
893
  ID_Medical_c, ID_StateLocalTax_c, ID_RealEstate_c,
@@ -957,8 +957,8 @@ def ItemDed(e17500_capped, e18400_capped, e18500_capped, e19200_capped,
957
957
  Floor (as decimal fraction of AGI) for deductible miscellaneous expenses
958
958
  ID_Miscellaneous_hc: float
959
959
  Miscellaneous expense deduction haircut
960
- ID_Charity_crt_all: float
961
- Ceiling (as decimal fraction of AGI) for all charitable contribution deductions
960
+ ID_Charity_crt_cash: float
961
+ Ceiling (as decimal fraction of AGI) for cash charitable contribution deductions
962
962
  ID_Charity_crt_noncash: float
963
963
  Ceiling (as decimal fraction of AGI) for noncash charitable contribution deductions
964
964
  ID_prt: float
@@ -1047,8 +1047,9 @@ def ItemDed(e17500_capped, e18400_capped, e18500_capped, e19200_capped,
1047
1047
  c19200 = e19200_capped * (1. - ID_InterestPaid_hc)
1048
1048
  c19200 = min(c19200, ID_InterestPaid_c[MARS - 1])
1049
1049
  # Charity
1050
- lim30 = min(ID_Charity_crt_noncash * posagi, e20100_capped)
1051
- c19700 = min(ID_Charity_crt_all * posagi, lim30 + e19800_capped)
1050
+ charity_ded_cash = min(ID_Charity_crt_cash * posagi, e19800_capped)
1051
+ charity_ded_noncash = min(ID_Charity_crt_noncash * posagi, e20100_capped)
1052
+ c19700 = charity_ded_cash + charity_ded_noncash
1052
1053
  # charity floor is zero in present law
1053
1054
  charity_floor = max(ID_Charity_frt * posagi, ID_Charity_f[MARS - 1])
1054
1055
  c19700 = max(0., c19700 - charity_floor) * (1. - ID_Charity_hc)
@@ -1133,9 +1134,9 @@ def AdditionalMedicareTax(e00200, MARS,
1133
1134
 
1134
1135
  @iterate_jit(nopython=True)
1135
1136
  def StdDed(DSI, earned, STD, age_head, age_spouse, STD_Aged, STD_Dep,
1136
- MARS, MIDR, blind_head, blind_spouse, standard, c19700,
1137
- STD_allow_charity_ded_nonitemizers,
1138
- STD_charity_ded_nonitemizers_max):
1137
+ MARS, MIDR, blind_head, blind_spouse, standard,
1138
+ STD_allow_charity_ded_nonitemizers, e19800, ID_Charity_crt_cash,
1139
+ c00100, STD_charity_ded_nonitemizers_max):
1139
1140
  """
1140
1141
  Calculates standard deduction, including standard deduction for
1141
1142
  dependents, aged and bind.
@@ -1166,12 +1167,16 @@ def StdDed(DSI, earned, STD, age_head, age_spouse, STD_Aged, STD_Dep,
1166
1167
  1 if spouse is blind, 0 otherwise
1167
1168
  standard: float
1168
1169
  Standard deduction (zero for itemizers)
1169
- c19700: float
1170
- Schedule A: charity contributions deducted
1171
1170
  STD_allow_charity_ded_nonitemizers: bool
1172
1171
  Allow standard deduction filers to take the charitable contributions deduction
1172
+ e19800: float
1173
+ Schedule A: cash charitable contributions
1174
+ ID_Charity_crt_cash: float
1175
+ Fraction of AGI cap on cash charitable deductions
1176
+ c00100: float
1177
+ Federal AGI
1173
1178
  STD_charity_ded_nonitemizers_max: float
1174
- Ceiling amount (in dollars) for charitable deductions for non-itemizers
1179
+ Ceiling amount (in dollars) for charitable deductions for nonitemizers
1175
1180
 
1176
1181
  Returns
1177
1182
  -------
@@ -1199,13 +1204,15 @@ def StdDed(DSI, earned, STD, age_head, age_spouse, STD_Aged, STD_Dep,
1199
1204
  standard = basic_stded + extra_stded
1200
1205
  if MARS == 3 and MIDR == 1:
1201
1206
  standard = 0.
1207
+ # calculate CARES cash charity deduction for nonitemizers
1202
1208
  if STD_allow_charity_ded_nonitemizers:
1203
- standard += min(c19700, STD_charity_ded_nonitemizers_max)
1209
+ capped_ded = min(e19800, ID_Charity_crt_cash * c00100)
1210
+ standard += min(capped_ded, STD_charity_ded_nonitemizers_max[MARS - 1])
1204
1211
  return standard
1205
1212
 
1206
1213
 
1207
1214
  @iterate_jit(nopython=True)
1208
- def TaxInc(c00100, standard, c04470, c04600, MARS, e00900, e26270,
1215
+ def TaxInc(c00100, standard, c04470, c04600, MARS, e00900, c03260, e26270,
1209
1216
  e02100, e27200, e00650, c01000, PT_SSTB_income,
1210
1217
  PT_binc_w2_wages, PT_ubia_property, PT_qbid_rt,
1211
1218
  PT_qbid_taxinc_thd, PT_qbid_taxinc_gap, PT_qbid_w2_wages_rt,
@@ -1229,6 +1236,8 @@ def TaxInc(c00100, standard, c04470, c04600, MARS, e00900, e26270,
1229
1236
  Filing (marital) status. (1=single, 2=joint, 3=separate, 4=household-head, 5=widow(er))
1230
1237
  e00900: float
1231
1238
  Schedule C business net profit/loss for filing unit
1239
+ c03260: float
1240
+ Self-employment (SECA) tax above-the-line deduction
1232
1241
  e26270: float
1233
1242
  Schedule E: combined partnership and S-corporation net income/loss
1234
1243
  e02100: float
@@ -1280,7 +1289,7 @@ def TaxInc(c00100, standard, c04470, c04600, MARS, e00900, e26270,
1280
1289
  pre_qbid_taxinc = max(0., c00100 - max(c04470, standard) - c04600)
1281
1290
  # calculate qualified business income deduction
1282
1291
  qbided = 0.
1283
- qbinc = max(0., e00900 + e26270 + e02100 + e27200)
1292
+ qbinc = max(0., e00900 - c03260 + e26270 + e02100 + e27200)
1284
1293
  if qbinc > 0. and PT_qbid_rt > 0.:
1285
1294
  qbid_before_limits = qbinc * PT_qbid_rt
1286
1295
  lower_thd = PT_qbid_taxinc_thd[MARS - 1]
@@ -1899,7 +1908,7 @@ def AGIsurtax(c00100, MARS, AGI_surtax_trt, AGI_surtax_thd, taxbc, surtax):
1899
1908
  def AMT(e07300, dwks13, standard, f6251, c00100, c18300, taxbc,
1900
1909
  c04470, c17000, c20800, c21040, e24515, MARS, sep, dwks19,
1901
1910
  dwks14, c05700, e62900, e00700, dwks10, age_head, age_spouse,
1902
- earned, cmbtp,
1911
+ earned, cmbtp, qbided,
1903
1912
  AMT_child_em_c_age, AMT_brk1,
1904
1913
  AMT_em, AMT_prt, AMT_rt1, AMT_rt2,
1905
1914
  AMT_child_em, AMT_em_ps, AMT_em_pe,
@@ -1936,7 +1945,7 @@ def AMT(e07300, dwks13, standard, f6251, c00100, c18300, taxbc,
1936
1945
  c20800: float
1937
1946
  Schedule A: net limited miscellaneous deductions deducted
1938
1947
  c21040: float
1939
- Itemized deductiosn that are phased out
1948
+ Itemized deductions that are phased out
1940
1949
  e24515: float
1941
1950
  Schedule D: Un-Recaptured Section 1250 Gain
1942
1951
  MARS: int
@@ -1963,6 +1972,8 @@ def AMT(e07300, dwks13, standard, f6251, c00100, c18300, taxbc,
1963
1972
  Earned income for filing unit
1964
1973
  cmbtp: float
1965
1974
  Estimate of income on (AMT) Form 6251 but not in AGI
1975
+ qbided: float
1976
+ Qualified business income deduction
1966
1977
  AMT_child_em_c_age: float
1967
1978
  Age ceiling for special AMT exemption
1968
1979
  AMT_brk1: float
@@ -2014,11 +2025,11 @@ def AMT(e07300, dwks13, standard, f6251, c00100, c18300, taxbc,
2014
2025
  # pylint: disable=too-many-statements,too-many-branches
2015
2026
  # Form 6251, Part I
2016
2027
  if standard == 0.0:
2017
- c62100 = (c00100 - e00700 - c04470 +
2028
+ c62100 = (c00100 - e00700 - qbided - c04470 +
2018
2029
  max(0., min(c17000, 0.025 * c00100)) +
2019
2030
  c18300 + c20800 - c21040)
2020
2031
  if standard > 0.0:
2021
- c62100 = c00100 - e00700
2032
+ c62100 = c00100 - e00700 - qbided
2022
2033
  c62100 += cmbtp # add income not in AGI but considered income for AMT
2023
2034
  if MARS == 3:
2024
2035
  amtsepadd = max(0.,
@@ -2136,7 +2147,8 @@ def NetInvIncTax(e00300, e00600, e02000, e26270, c01000,
2136
2147
  @iterate_jit(nopython=True)
2137
2148
  def F2441(MARS, earned_p, earned_s, f2441, CDCC_c, e32800,
2138
2149
  exact, c00100, CDCC_ps, CDCC_ps2, CDCC_crt, CDCC_frt,
2139
- CDCC_prt, CDCC_refundable, c05800, e07300, c07180, CDCC_refund):
2150
+ CDCC_po_step_size, CDCC_po_rate_per_step, CDCC_refundable,
2151
+ c05800, e07300, c07180, CDCC_refund):
2140
2152
  """
2141
2153
  Calculates Form 2441 child and dependent care expense credit, c07180.
2142
2154
 
@@ -2166,16 +2178,18 @@ def F2441(MARS, earned_p, earned_s, f2441, CDCC_c, e32800,
2166
2178
  Child/dependent care credit phaseout rate ceiling
2167
2179
  CDCC_frt: float
2168
2180
  Child/dependent care credit phaseout rate floor
2169
- CDCC_prt: float
2170
- Child/dependent care credit phaseout rate
2181
+ CDCC_po_step_size: float
2182
+ Child/dependent care credit phaseout AGI step size
2183
+ CDCC_po_rate_per_step: float
2184
+ Child/dependent care credit phaseout rate per step size
2185
+ CDCC_refund: bool
2186
+ Indicator for whether CDCC is refundable
2171
2187
  c05800: float
2172
2188
  Total (regular + AMT) income tax liability before credits
2173
2189
  e07300: float
2174
2190
  Foreign tax credit from Form 1116
2175
2191
  c07180: float
2176
2192
  Credit for child and dependent care expenses from Form 2441
2177
- CDCC_refund: bool
2178
- Indicator for whether CDCC is refundable
2179
2193
 
2180
2194
  Returns
2181
2195
  -------
@@ -2192,22 +2206,22 @@ def F2441(MARS, earned_p, earned_s, f2441, CDCC_c, e32800,
2192
2206
  else:
2193
2207
  c32890 = earned_p
2194
2208
  c33000 = max(0., min(c32800, min(c32880, c32890)))
2195
- # credit is limited by AGI-related fraction
2209
+ # credit rate is limited at high AGI
2210
+ # ... first phase-down from CDCC_crt to CDCC_frt
2211
+ steps_fractional = max(0., c00100 - CDCC_ps) / CDCC_po_step_size
2196
2212
  if exact == 1: # exact calculation as on tax forms
2197
- # first phase-down from 35 to 20 percent
2198
- tratio1 = math.ceil(max(((c00100 - CDCC_ps) * CDCC_prt), 0.))
2199
- crate = max(CDCC_frt, CDCC_crt - min(CDCC_crt - CDCC_frt, tratio1))
2200
- # second phase-down from 20 percent to zero
2201
- if c00100 > CDCC_ps2:
2202
- tratio2 = math.ceil(max(((c00100 - CDCC_ps2) * CDCC_prt), 0.))
2203
- crate = max(0., CDCC_frt - min(CDCC_frt, tratio2))
2213
+ steps = math.ceil(steps_fractional)
2204
2214
  else:
2205
- crate = max(CDCC_frt, CDCC_crt -
2206
- max(((c00100 - CDCC_ps) * CDCC_prt), 0.))
2207
- if c00100 > CDCC_ps2:
2208
- crate = max(0., CDCC_frt -
2209
- max(((c00100 - CDCC_ps2) * CDCC_prt), 0.))
2210
-
2215
+ steps = steps_fractional
2216
+ crate = max(CDCC_frt, CDCC_crt - steps * CDCC_po_rate_per_step)
2217
+ # ... second phase-down from CDCC_frt to zero
2218
+ if c00100 > CDCC_ps2:
2219
+ steps_fractional = (c00100 - CDCC_ps2) / CDCC_po_step_size
2220
+ if exact == 1: # exact calculation as on tax forms
2221
+ steps = math.ceil(steps_fractional)
2222
+ else:
2223
+ steps = steps_fractional
2224
+ crate = max(0., CDCC_frt - steps * CDCC_po_rate_per_step)
2211
2225
  c33200 = c33000 * crate
2212
2226
  # credit is limited by tax liability if not refundable
2213
2227
  if CDCC_refundable:
@@ -2441,7 +2455,7 @@ def ChildDepTaxCredit(age_head, age_spouse, nu18, n24, MARS, c00100, XTOT, num,
2441
2455
  c07200,
2442
2456
  CTC_c, CTC_ps, CTC_prt, exact, ODC_c,
2443
2457
  CTC_c_under6_bonus, nu06,
2444
- CTC_refundable, CTC_include17,
2458
+ CTC_is_refundable, CTC_include17,
2445
2459
  c07220, odc, codtc_limited):
2446
2460
  """
2447
2461
  Computes amounts on "Child Tax Credit and Credit for Other Dependents
@@ -2540,7 +2554,7 @@ def ChildDepTaxCredit(age_head, age_spouse, nu18, n24, MARS, c00100, XTOT, num,
2540
2554
  line13 = line11 - line12
2541
2555
  line14 = 0.
2542
2556
  line15 = max(0., line13 - line14)
2543
- if CTC_refundable:
2557
+ if CTC_is_refundable:
2544
2558
  c07220 = line10 * line1 / line3
2545
2559
  odc = max(0., line10 - c07220)
2546
2560
  codtc_limited = max(0., line10 - c07220 - odc)
@@ -2910,7 +2924,7 @@ def CharityCredit(e19800, e20100, c00100, CR_Charity_rt, CR_Charity_f,
2910
2924
  def NonrefundableCredits(c05800, e07240, e07260, e07300, e07400,
2911
2925
  e07600, p08000, odc,
2912
2926
  personal_nonrefundable_credit,
2913
- CTC_refundable,
2927
+ CTC_is_refundable,
2914
2928
  CR_RetirementSavings_hc, CR_ForeignTax_hc,
2915
2929
  CR_ResidentialEnergy_hc, CR_GeneralBusiness_hc,
2916
2930
  CR_MinimumTax_hc, CR_OtherCredits_hc, charity_credit,
@@ -2939,7 +2953,7 @@ def NonrefundableCredits(c05800, e07240, e07260, e07300, e07400,
2939
2953
  Other Dependent Credit
2940
2954
  personal_nonrefundable_credit: float
2941
2955
  Personal nonrefundable credit
2942
- CTC_refundable: bool
2956
+ CTC_is_refundable: bool
2943
2957
  Whether the child tax credit is fully refundable
2944
2958
  CR_RetirementSavings_hc: float
2945
2959
  Credit for retirement savings haircut
@@ -3019,7 +3033,7 @@ def NonrefundableCredits(c05800, e07240, e07260, e07300, e07400,
3019
3033
  c07240 = min(e07240 * (1. - CR_RetirementSavings_hc), avail)
3020
3034
  avail = avail - c07240
3021
3035
  # Child tax credit
3022
- if not CTC_refundable:
3036
+ if not CTC_is_refundable:
3023
3037
  c07220 = min(c07220, avail)
3024
3038
  avail = avail - c07220
3025
3039
  # Other dependent credit
@@ -3053,7 +3067,8 @@ def NonrefundableCredits(c05800, e07240, e07260, e07300, e07400,
3053
3067
  @iterate_jit(nopython=True)
3054
3068
  def AdditionalCTC(codtc_limited, ACTC_c, n24, earned, ACTC_Income_thd,
3055
3069
  ACTC_rt, nu06, ACTC_rt_bonus_under6family, ACTC_ChildNum,
3056
- CTC_refundable, CTC_include17, age_head, age_spouse, MARS, nu18,
3070
+ CTC_is_refundable, CTC_include17,
3071
+ age_head, age_spouse, MARS, nu18,
3057
3072
  ptax_was, c03260, e09800, c59660, e11200,
3058
3073
  c11070):
3059
3074
  """
@@ -3101,7 +3116,7 @@ def AdditionalCTC(codtc_limited, ACTC_c, n24, earned, ACTC_Income_thd,
3101
3116
  # Part I
3102
3117
  line3 = codtc_limited
3103
3118
 
3104
- if CTC_refundable:
3119
+ if CTC_is_refundable:
3105
3120
  line4 = 0.
3106
3121
  else:
3107
3122
  if CTC_include17:
@@ -3142,7 +3157,8 @@ def AdditionalCTC(codtc_limited, ACTC_c, n24, earned, ACTC_Income_thd,
3142
3157
  def C1040(c05800, c07180, c07200, c07220, c07230, c07240, c07260, c07300,
3143
3158
  c07400, c07600, c08000, e09700, e09800, e09900, niit, othertaxes,
3144
3159
  c07100, c09200, odc, charity_credit,
3145
- personal_nonrefundable_credit, CTC_refundable, ODC_refundable):
3160
+ personal_nonrefundable_credit,
3161
+ CTC_is_refundable, ODC_is_refundable):
3146
3162
  """
3147
3163
  Computes total used nonrefundable credits, c07100, othertaxes, and
3148
3164
  income tax before refundable credits, c09200.
@@ -3203,8 +3219,9 @@ def C1040(c05800, c07180, c07200, c07220, c07230, c07240, c07260, c07300,
3203
3219
  """
3204
3220
  # total used nonrefundable credits (as computed in NonrefundableCredits)
3205
3221
  c07100 = (c07180 + c07200 + c07600 + c07300 + c07400 +
3206
- c07220 * (1. - CTC_refundable) + c08000 +
3207
- c07230 + c07240 + c07260 + odc * (1. - ODC_refundable) + charity_credit +
3222
+ c07220 * (1. - CTC_is_refundable) + c08000 +
3223
+ c07230 + c07240 + c07260 +
3224
+ odc * (1. - ODC_is_refundable) + charity_credit +
3208
3225
  personal_nonrefundable_credit)
3209
3226
  # tax after credits (2016 Form 1040, line 56)
3210
3227
  tax_net_nonrefundable_credits = max(0., c05800 - c07100)
@@ -3305,8 +3322,8 @@ def CTC_new(CTC_new_c, CTC_new_rt, CTC_new_c_under6_bonus,
3305
3322
  @iterate_jit(nopython=True)
3306
3323
  def IITAX(c59660, c11070, c10960, personal_refundable_credit, ctc_new, rptc,
3307
3324
  c09200, payrolltax, CDCC_refund, recovery_rebate_credit,
3308
- eitc, c07220, odc, CTC_refundable, ODC_refundable, refund,
3309
- ctc_total, ctc_refundable, iitax, combined):
3325
+ eitc, c07220, odc, CTC_is_refundable, ODC_is_refundable, refund,
3326
+ ctc_total, ctc_refundable, ctc_nonrefundable, iitax, combined):
3310
3327
  """
3311
3328
  Computes final taxes.
3312
3329
 
@@ -3352,17 +3369,19 @@ def IITAX(c59660, c11070, c10960, personal_refundable_credit, ctc_new, rptc,
3352
3369
  Total CTC amount (c07220 + c11070 + odc + ctc_new)
3353
3370
  ctc_refundable: float
3354
3371
  Portion of total CTC amount that is refundable
3372
+ ctc_nonrefundable: float
3373
+ Portion of total CTC amount that is nonrefundable
3355
3374
  iitax: float
3356
3375
  Total federal individual income tax liability
3357
3376
  combined: float
3358
3377
  Sum of iitax and payrolltax and lumpsum_tax
3359
3378
  """
3360
3379
  eitc = c59660
3361
- if CTC_refundable:
3380
+ if CTC_is_refundable:
3362
3381
  ctc_refund = c07220
3363
3382
  else:
3364
3383
  ctc_refund = 0.
3365
- if ODC_refundable:
3384
+ if ODC_is_refundable:
3366
3385
  odc_refund = odc
3367
3386
  else:
3368
3387
  odc_refund = 0.
@@ -3371,9 +3390,11 @@ def IITAX(c59660, c11070, c10960, personal_refundable_credit, ctc_new, rptc,
3371
3390
  odc_refund)
3372
3391
  ctc_total = c07220 + c11070 + odc + ctc_new
3373
3392
  ctc_refundable = ctc_refund + c11070 + odc_refund + ctc_new
3393
+ ctc_nonrefundable = max(0., ctc_total - ctc_refundable)
3374
3394
  iitax = c09200 - refund
3375
3395
  combined = iitax + payrolltax
3376
- return (eitc, refund, ctc_total, ctc_refundable, iitax, combined)
3396
+ return (eitc, refund, ctc_total, ctc_refundable, ctc_nonrefundable,
3397
+ iitax, combined)
3377
3398
 
3378
3399
 
3379
3400
  @JIT(nopython=True)
@@ -2505,7 +2505,7 @@
2505
2505
  },
2506
2506
  "STD_allow_charity_ded_nonitemizers": {
2507
2507
  "title": "Allow standard deduction filers to take the charitable contributions deduction",
2508
- "description": "Extends the charitable contributions deduction to taxpayers who take the standard deduction. The same ceilings, floor, and haircuts applied to itemized deduction for charitable contributions also apply here as well as a max on the dollar amount for total charitable deductions for those taking the standard deduction.",
2508
+ "description": "Extends the charitable contributions deduction to taxpayers who take the standard deduction and make cash donations. The same percent-of-AGI cap applied to itemized deduction for charitable contributions also apply here, as well as a max on the dollar amount for cash charitable deductions for those taking the standard deduction.",
2509
2509
  "notes": "",
2510
2510
  "section_1": "",
2511
2511
  "section_2": "",
@@ -2517,13 +2517,13 @@
2517
2517
  "year": 2013,
2518
2518
  "value": false
2519
2519
  },
2520
- {
2521
- "year": 2021,
2522
- "value": false
2523
- },
2524
2520
  {
2525
2521
  "year": 2020,
2526
2522
  "value": true
2523
+ },
2524
+ {
2525
+ "year": 2022,
2526
+ "value": false
2527
2527
  }
2528
2528
  ],
2529
2529
  "validators": {
@@ -2538,8 +2538,8 @@
2538
2538
  }
2539
2539
  },
2540
2540
  "STD_charity_ded_nonitemizers_max": {
2541
- "title": "Ceiling amount (in dollars) for charitable deductions for non-itemizers",
2542
- "description": "Puts a ceiling on the dollar of amount of charitable contributions deductions for taxpayers who take the standard deduction.",
2541
+ "title": "Ceiling amount (in dollars) for cash charitable deductions for nonitemizers",
2542
+ "description": "Puts a ceiling on the dollar of amount of cash charitable contributions deductions for taxpayers who take the standard deduction.",
2543
2543
  "notes": "",
2544
2544
  "section_1": "",
2545
2545
  "section_2": "",
@@ -2549,15 +2549,78 @@
2549
2549
  "value": [
2550
2550
  {
2551
2551
  "year": 2013,
2552
+ "MARS": "single",
2552
2553
  "value": 0.0
2553
2554
  },
2554
2555
  {
2555
- "year": 2021,
2556
+ "year": 2013,
2557
+ "MARS": "mjoint",
2556
2558
  "value": 0.0
2557
2559
  },
2560
+ {
2561
+ "year": 2013,
2562
+ "MARS": "mseparate",
2563
+ "value": 0.0
2564
+ },
2565
+ {
2566
+ "year": 2013,
2567
+ "MARS": "headhh",
2568
+ "value": 0.0
2569
+ },
2570
+ {
2571
+ "year": 2013,
2572
+ "MARS": "widow",
2573
+ "value": 0.0
2574
+ },
2575
+ {
2576
+ "year": 2020,
2577
+ "MARS": "single",
2578
+ "value": 300.0
2579
+ },
2580
+ {
2581
+ "year": 2020,
2582
+ "MARS": "mjoint",
2583
+ "value": 600.0
2584
+ },
2585
+ {
2586
+ "year": 2020,
2587
+ "MARS": "mseparate",
2588
+ "value": 300.0
2589
+ },
2558
2590
  {
2559
2591
  "year": 2020,
2592
+ "MARS": "headhh",
2560
2593
  "value": 300.0
2594
+ },
2595
+ {
2596
+ "year": 2020,
2597
+ "MARS": "widow",
2598
+ "value": 300.0
2599
+ },
2600
+ {
2601
+ "year": 2022,
2602
+ "MARS": "single",
2603
+ "value": 0.0
2604
+ },
2605
+ {
2606
+ "year": 2022,
2607
+ "MARS": "mjoint",
2608
+ "value": 0.0
2609
+ },
2610
+ {
2611
+ "year": 2022,
2612
+ "MARS": "mseparate",
2613
+ "value": 0.0
2614
+ },
2615
+ {
2616
+ "year": 2022,
2617
+ "MARS": "headhh",
2618
+ "value": 0.0
2619
+ },
2620
+ {
2621
+ "year": 2022,
2622
+ "MARS": "widow",
2623
+ "value": 0.0
2561
2624
  }
2562
2625
  ],
2563
2626
  "validators": {
@@ -5168,9 +5231,9 @@
5168
5231
  "cps": true
5169
5232
  }
5170
5233
  },
5171
- "ID_Charity_crt_all": {
5172
- "title": "Ceiling (as a decimal fraction of AGI) for all charitable contribution deductions",
5173
- "description": "The total deduction for charity is capped at this fraction of AGI.",
5234
+ "ID_Charity_crt_cash": {
5235
+ "title": "Ceiling (as a decimal fraction of AGI) for cash charitable contribution deductions",
5236
+ "description": "The cash deduction for charity is capped at this fraction of AGI.",
5174
5237
  "notes": "When using PUF data, raising this parameter value may produce unexpected results because in PUF data the variables e19800 and e20100 are already capped.",
5175
5238
  "section_1": "Itemized Deductions",
5176
5239
  "section_2": "Charity",
@@ -5182,36 +5245,16 @@
5182
5245
  "year": 2013,
5183
5246
  "value": 0.5
5184
5247
  },
5185
- {
5186
- "year": 2014,
5187
- "value": 0.5
5188
- },
5189
- {
5190
- "year": 2015,
5191
- "value": 0.5
5192
- },
5193
- {
5194
- "year": 2016,
5195
- "value": 0.5
5196
- },
5197
- {
5198
- "year": 2017,
5199
- "value": 0.5
5200
- },
5201
5248
  {
5202
5249
  "year": 2018,
5203
5250
  "value": 0.6
5204
5251
  },
5205
- {
5206
- "year": 2019,
5207
- "value": 0.6
5208
- },
5209
5252
  {
5210
5253
  "year": 2020,
5211
5254
  "value": 1.0
5212
5255
  },
5213
5256
  {
5214
- "year": 2021,
5257
+ "year": 2022,
5215
5258
  "value": 0.6
5216
5259
  },
5217
5260
  {
@@ -12004,7 +12047,7 @@
12004
12047
  },
12005
12048
  {
12006
12049
  "year": 2020,
12007
- "value": 0.15
12050
+ "value": 0.12
12008
12051
  },
12009
12052
  {
12010
12053
  "year": 2021,
@@ -12367,7 +12410,7 @@
12367
12410
  },
12368
12411
  {
12369
12412
  "year": 2020,
12370
- "value": 0.25
12413
+ "value": 0.22
12371
12414
  },
12372
12415
  {
12373
12416
  "year": 2021,
@@ -12730,7 +12773,7 @@
12730
12773
  },
12731
12774
  {
12732
12775
  "year": 2020,
12733
- "value": 0.28
12776
+ "value": 0.24
12734
12777
  },
12735
12778
  {
12736
12779
  "year": 2021,
@@ -13819,7 +13862,7 @@
13819
13862
  },
13820
13863
  {
13821
13864
  "year": 2020,
13822
- "value": 0.396
13865
+ "value": 0.37
13823
13866
  },
13824
13867
  {
13825
13868
  "year": 2021,
@@ -14658,106 +14701,6 @@
14658
14701
  "MARS": "widow",
14659
14702
  "value": 1.0
14660
14703
  },
14661
- {
14662
- "year": 2014,
14663
- "MARS": "single",
14664
- "value": 1.0
14665
- },
14666
- {
14667
- "year": 2014,
14668
- "MARS": "mjoint",
14669
- "value": 1.0
14670
- },
14671
- {
14672
- "year": 2014,
14673
- "MARS": "mseparate",
14674
- "value": 1.0
14675
- },
14676
- {
14677
- "year": 2014,
14678
- "MARS": "headhh",
14679
- "value": 1.0
14680
- },
14681
- {
14682
- "year": 2014,
14683
- "MARS": "widow",
14684
- "value": 1.0
14685
- },
14686
- {
14687
- "year": 2015,
14688
- "MARS": "single",
14689
- "value": 1.0
14690
- },
14691
- {
14692
- "year": 2015,
14693
- "MARS": "mjoint",
14694
- "value": 1.0
14695
- },
14696
- {
14697
- "year": 2015,
14698
- "MARS": "mseparate",
14699
- "value": 1.0
14700
- },
14701
- {
14702
- "year": 2015,
14703
- "MARS": "headhh",
14704
- "value": 1.0
14705
- },
14706
- {
14707
- "year": 2015,
14708
- "MARS": "widow",
14709
- "value": 1.0
14710
- },
14711
- {
14712
- "year": 2016,
14713
- "MARS": "single",
14714
- "value": 1.0
14715
- },
14716
- {
14717
- "year": 2016,
14718
- "MARS": "mjoint",
14719
- "value": 1.0
14720
- },
14721
- {
14722
- "year": 2016,
14723
- "MARS": "mseparate",
14724
- "value": 1.0
14725
- },
14726
- {
14727
- "year": 2016,
14728
- "MARS": "headhh",
14729
- "value": 1.0
14730
- },
14731
- {
14732
- "year": 2016,
14733
- "MARS": "widow",
14734
- "value": 1.0
14735
- },
14736
- {
14737
- "year": 2017,
14738
- "MARS": "single",
14739
- "value": 1.0
14740
- },
14741
- {
14742
- "year": 2017,
14743
- "MARS": "mjoint",
14744
- "value": 1.0
14745
- },
14746
- {
14747
- "year": 2017,
14748
- "MARS": "mseparate",
14749
- "value": 1.0
14750
- },
14751
- {
14752
- "year": 2017,
14753
- "MARS": "headhh",
14754
- "value": 1.0
14755
- },
14756
- {
14757
- "year": 2017,
14758
- "MARS": "widow",
14759
- "value": 1.0
14760
- },
14761
14704
  {
14762
14705
  "year": 2018,
14763
14706
  "MARS": "single",
@@ -14783,31 +14726,6 @@
14783
14726
  "MARS": "widow",
14784
14727
  "value": 100000.0
14785
14728
  },
14786
- {
14787
- "year": 2019,
14788
- "MARS": "single",
14789
- "value": 50000.0
14790
- },
14791
- {
14792
- "year": 2019,
14793
- "MARS": "mjoint",
14794
- "value": 100000.0
14795
- },
14796
- {
14797
- "year": 2019,
14798
- "MARS": "mseparate",
14799
- "value": 50000.0
14800
- },
14801
- {
14802
- "year": 2019,
14803
- "MARS": "headhh",
14804
- "value": 50000.0
14805
- },
14806
- {
14807
- "year": 2019,
14808
- "MARS": "widow",
14809
- "value": 100000.0
14810
- },
14811
14729
  {
14812
14730
  "year": 2026,
14813
14731
  "MARS": "single",
@@ -16461,10 +16379,36 @@
16461
16379
  "cps": true
16462
16380
  }
16463
16381
  },
16464
- "CDCC_prt": {
16465
- "title": "Child & dependent care credit phaseout rate",
16466
- "description": "The CDCC credit rate is reduced by this many percentage points for each dollar of AGI over the phase-out thresholds.",
16467
- "notes": "In the law, the credit rate is reduced by 1 percentage point for every $2,000 of AGI over the limit. 0.01 / 2000 = 0.000005",
16382
+ "CDCC_po_step_size": {
16383
+ "title": "Child & dependent care credit phaseout step size",
16384
+ "description": "The CDCC credit rate is reduced by CDCC_po_rate_per_step for each step (including fractional steps) above the phase-out start thresholds.",
16385
+ "notes": "In the law, the credit rate is reduced by 1 percentage point for every $2,000 of AGI over the phase-out start thresholds",
16386
+ "section_1": "Nonrefundable Credits",
16387
+ "section_2": "Child And Dependent Care",
16388
+ "indexable": true,
16389
+ "indexed": false,
16390
+ "type": "float",
16391
+ "value": [
16392
+ {
16393
+ "year": 2013,
16394
+ "value": 2000
16395
+ }
16396
+ ],
16397
+ "validators": {
16398
+ "range": {
16399
+ "min": 0,
16400
+ "max": 9e99
16401
+ }
16402
+ },
16403
+ "compatible_data": {
16404
+ "puf": true,
16405
+ "cps": true
16406
+ }
16407
+ },
16408
+ "CDCC_po_rate_per_step": {
16409
+ "title": "Child & dependent care credit phaseout rate per step",
16410
+ "description": "The CDCC credit rate is reduced by this rate for for each step (including fractional steps) above the phase-out start thresholds.",
16411
+ "notes": "In the law, the credit rate is reduced by 1 percentage point for every $2,000 of AGI over the phase-out start thresholds",
16468
16412
  "section_1": "Nonrefundable Credits",
16469
16413
  "section_2": "Child And Dependent Care",
16470
16414
  "indexable": false,
@@ -16473,7 +16417,7 @@
16473
16417
  "value": [
16474
16418
  {
16475
16419
  "year": 2013,
16476
- "value": 5e-06
16420
+ "value": 0.01
16477
16421
  }
16478
16422
  ],
16479
16423
  "validators": {
@@ -16647,7 +16591,7 @@
16647
16591
  "cps": true
16648
16592
  }
16649
16593
  },
16650
- "CTC_refundable": {
16594
+ "CTC_is_refundable": {
16651
16595
  "title": "Whether the child tax credit is fully refundable",
16652
16596
  "description": "If true, the child tax credit is made fully refundable.",
16653
16597
  "notes": "If true, the Additional Child Tax Credit is not used.",
@@ -16681,7 +16625,7 @@
16681
16625
  "cps": true
16682
16626
  }
16683
16627
  },
16684
- "ODC_refundable": {
16628
+ "ODC_is_refundable": {
16685
16629
  "title": "Whether the other dependents tax credit is fully refundable",
16686
16630
  "description": "If true, the other dependents tax credit is made fully refundable.",
16687
16631
  "notes": "",
@@ -823,7 +823,7 @@
823
823
  },
824
824
  "c05200": {
825
825
  "type": "float",
826
- "desc": "Tax amount from Sch X,Y,X tables",
826
+ "desc": "Tax amount from Sch X,Y,Z tables",
827
827
  "form": {"2013-20??": "calculated variable"}
828
828
  },
829
829
  "c05700": {
@@ -1046,6 +1046,11 @@
1046
1046
  "desc": "Total CTC amount (c07220 + c11070 + odc + ctc_new)",
1047
1047
  "form": {"2013-20??": "calculated variable"}
1048
1048
  },
1049
+ "ctc_nonrefundable": {
1050
+ "type": "float",
1051
+ "desc": "Portion of total CTC amount that is nonrefundable",
1052
+ "form": {"2013-20??": "calculated variable"}
1053
+ },
1049
1054
  "ctc_refundable": {
1050
1055
  "type": "float",
1051
1056
  "desc": "Portion of total CTC amount that is refundable",
taxcalc/taxcalcio.py CHANGED
@@ -518,6 +518,10 @@ class TaxCalcIO():
518
518
  self.calc, dump_varset, mtr_inctax, mtr_paytax
519
519
  )
520
520
  column_order = sorted(outdf.columns)
521
+ # place RECID at start of column_order list
522
+ assert 'RECID' in column_order, 'RECID not in dump output list'
523
+ column_order.remove('RECID')
524
+ column_order.insert(0, 'RECID')
521
525
  else:
522
526
  outdf = self.minimal_output()
523
527
  column_order = outdf.columns
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: taxcalc
3
- Version: 4.1.0
3
+ Version: 4.2.1
4
4
  Summary: taxcalc
5
5
  Home-page: https://github.com/PSLmodels/Tax-Calculator
6
6
  Download-URL: https://github.com/PSLmodels/Tax-Calculator
@@ -1,5 +1,5 @@
1
- taxcalc/__init__.py,sha256=M1z5Tt3Ibgqv6nuN3zgoZwux626kBItmIIpEAZGybGw,478
2
- taxcalc/calcfunctions.py,sha256=GdOoAVxGGhunH7-P7BBRH4mK0GLGje0HwvjS1lCV8Po,146005
1
+ taxcalc/__init__.py,sha256=Vd8tla9vclz_CHAorbt6ka5PG5j9k-56xvaACG0rVnY,478
2
+ taxcalc/calcfunctions.py,sha256=4KRptTKFGCaKlAOYc5zSyhgW6gNwRvKN88h_JxKl8ME,146968
3
3
  taxcalc/calculator.py,sha256=Ybk497LXzg5RSJEiFCEQPsM0odA7MT_mutqcXWe5d8o,63694
4
4
  taxcalc/conftest.py,sha256=nO4J7qu1sTHgjqrzhpRMvfMJUrNm6GP_IsSuuDt_MeQ,141
5
5
  taxcalc/consumption.json,sha256=D4Iz625yka_LSlq313hoy01qGtNrpN5QYAHqd9QQfVA,8102
@@ -14,21 +14,21 @@ taxcalc/growfactors.csv,sha256=OQArKySPTSweIGV9v17WrenfcQa6ABrbTpIWZUqL2Uk,12281
14
14
  taxcalc/growfactors.py,sha256=IdxR6_ELJKJJHd82-gaGcQLVEYNxJpja0bYKNpVlG7A,6557
15
15
  taxcalc/parameters.py,sha256=57RVKpx0i4J0L6lqdgykakO9ASHx9JnkI2tK7yDmvto,31175
16
16
  taxcalc/policy.py,sha256=cOSgmvhUH3TMSqYoUbDfEu0qAWLcZk-w0cE5FjqKXMk,6341
17
- taxcalc/policy_current_law.json,sha256=-4nvjDQA-D5dfEVsqt0ylYaAz1OhIG-jWQdnu1d7MlU,552069
17
+ taxcalc/policy_current_law.json,sha256=p9EH4Crcc9wY8Vu3_FQMFyzTuJgyuz0-qQ6ICTMtmdY,551100
18
18
  taxcalc/puf_ratios.csv,sha256=FjEj41SyyW5Fp7JTVptQGKjnu43rfl3uOc9-019bE_s,3439
19
19
  taxcalc/puf_weights.csv.gz,sha256=LouhxTQJ0ow-Yn63PjMElB5ICXO9AybLXeEt3gP5AY4,12988069
20
20
  taxcalc/records.py,sha256=TbZA2owF-lvt6jxnP_Dp_SfnnpalHa4_L-KKMWhwPq0,17748
21
- taxcalc/records_variables.json,sha256=MoASET9PNC6yl8yWEjCadZIQ4TAGwJBqsCimnNc79vg,42728
22
- taxcalc/taxcalcio.py,sha256=8gNalHXsoKNtsTtsZ_7oY8aUWeCFoyNSjDISvymU7T0,32783
21
+ taxcalc/records_variables.json,sha256=os84mC_BjkdeJffkM1OXFxiJTWztxVgQS6d-GDBHpBk,42903
22
+ taxcalc/taxcalcio.py,sha256=r0JNgIe8iYvnVEVzUjZFA7ShyllDgqVdbeAdOCUBd4Y,33000
23
23
  taxcalc/tmd_growfactors.csv,sha256=ciDtbKgKWoY8a34oC4HIyZ3c7rtHGyq8RW_tIn0nbmM,10208
24
- taxcalc/tmd_weights.csv.gz,sha256=eeANf8bjsQ0kYPuXUjeF9f53Gybi2ITNR2pz_a6ClZI,19376906
24
+ taxcalc/tmd_weights.csv.gz,sha256=9VxT-ME_KR6CtprdIBJQ5Lag7vuB1EAr4MqLMU-yhmQ,28638647
25
25
  taxcalc/utils.py,sha256=aNIEYbm37pQoayt_rXrr9iKoodoE-DH8EFL2A0rSokk,62468
26
26
  taxcalc/utilsprvt.py,sha256=iIyWp9-N3_XWjQj2jV2CWnJy7vrNlKB2_vIMwYjgbWY,1323
27
27
  taxcalc/cli/__init__.py,sha256=cyZ0tdx41j_vV_B6GAkqJmNKKG-B0wUC0ThC75lJlk4,104
28
28
  taxcalc/cli/tc.py,sha256=fnuf-d9ZmkrWA5JhlvMGbZKPjIyuhg5r7bWT-FYxP8Q,11473
29
- taxcalc-4.1.0.dist-info/LICENSE,sha256=m5epLdB-_NXiY7NsEDgcHP4jDtJ4vOlRf5S3Jb-jraY,1299
30
- taxcalc-4.1.0.dist-info/METADATA,sha256=-9SuwRstSCASluHXkJiWg1tgWRUe_o-xXKL4czPia3o,3345
31
- taxcalc-4.1.0.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
32
- taxcalc-4.1.0.dist-info/entry_points.txt,sha256=a3ZE1piRv683p27fOLdWZvVJXESkoslTOp5iXV7uVco,50
33
- taxcalc-4.1.0.dist-info/top_level.txt,sha256=Wh8wTDHkA_cm4dn8IoUCviDyGgVQqwEQKPJnl8z6d4c,8
34
- taxcalc-4.1.0.dist-info/RECORD,,
29
+ taxcalc-4.2.1.dist-info/LICENSE,sha256=m5epLdB-_NXiY7NsEDgcHP4jDtJ4vOlRf5S3Jb-jraY,1299
30
+ taxcalc-4.2.1.dist-info/METADATA,sha256=h3-TjcM5NO0pw-Xpf57GDhaS1wFr9reil5nDosO7yb4,3345
31
+ taxcalc-4.2.1.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
32
+ taxcalc-4.2.1.dist-info/entry_points.txt,sha256=a3ZE1piRv683p27fOLdWZvVJXESkoslTOp5iXV7uVco,50
33
+ taxcalc-4.2.1.dist-info/top_level.txt,sha256=Wh8wTDHkA_cm4dn8IoUCviDyGgVQqwEQKPJnl8z6d4c,8
34
+ taxcalc-4.2.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (70.3.0)
2
+ Generator: setuptools (72.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5