Skip to content

Commit

Permalink
Merge branch 'master' into CBO_June_24
Browse files Browse the repository at this point in the history
  • Loading branch information
bodiyang authored Dec 3, 2024
2 parents 6009200 + 23b3b5e commit 49b715a
Show file tree
Hide file tree
Showing 26 changed files with 228 additions and 213 deletions.
20 changes: 20 additions & 0 deletions docs/about/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,26 @@ Go [here](https://github.com/PSLmodels/Tax-Calculator/pulls?q=is%3Apr+is%3Aclose
for a complete commit history.


2024-11-30 Release 4.3.4
------------------------
(last merged pull request is
[#2844](https://github.com/PSLmodels/Tax-Calculator/pull/2844))

**This is a bug-fix release.**

**API Changes**

**New Features**

**Bug Fixes**
- Fix deprecation warning when using pip to install an editable package
[[#2840](https://github.com/PSLmodels/Tax-Calculator/pull/2840) by Jason DeBacker]
- Fix weights precision in output file when using CLI tool with TMD input data
[[#2841](https://github.com/PSLmodels/Tax-Calculator/pull/2841) by Martin Holmer]
- Fix categorization of self-employment tax and additional Medicare tax
[[#2844](https://github.com/PSLmodels/Tax-Calculator/pull/2844) by Martin Holmer]


2024-11-14 Release 4.3.3
------------------------
(last merged pull request is
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The cross-model validation work with NBER's TAXSIM-27 model is described

## Latest release

{doc}`4.3.3 (2024-11-14) <about/releases>`
{doc}`4.3.4 (2024-11-30) <about/releases>`

If you are already using Tax-Calculator, upgrade using the following command:

Expand All @@ -68,7 +68,7 @@ conda update conda-forge::taxcalc
or

```
pip install -U taxcalc
pip install --upgrade taxcalc
```

If you're a new user, read {doc}`usage/starting`.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
with open("README.md") as f:
longdesc = f.read()

version = "4.3.3"
version = "4.3.4"

config = {
"description": "Tax Calculator",
Expand Down
2 changes: 1 addition & 1 deletion taxcalc.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: taxcalc
Version: 4.3.3
Version: 4.3.4
Summary: taxcalc
Home-page: https://github.com/PSLmodels/Tax-Calculator
Download-URL: https://github.com/PSLmodels/Tax-Calculator
Expand Down
2 changes: 1 addition & 1 deletion taxcalc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
from taxcalc.utils import *
from taxcalc.cli import *

__version__ = '4.3.3'
__version__ = '4.3.4'
__min_python3_version__ = 10
__max_python3_version__ = 12
39 changes: 18 additions & 21 deletions taxcalc/calcfunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,11 @@ def EI_PayrollTax(SS_Earnings_c, e00200p, e00200s, pencon_p, pencon_s,
Partner self-employment earnings/loss for spouse (included in e26270 total)
payrolltax: float
Total (employee and employer) payroll tax liability
payrolltax = ptax_was + setax + ptax_amc
payrolltax = ptax_was
ptax_was: float
Employee and employer OASDI plus HI FICA tax
setax: float
Self-employment tax
Self-employment tax (included in othertaxes and iitax)
c03260: float
Deductible part of self-employment tax
c03260 = (1 - ALD_SelfEmploymentTax_hc) * 0.5 * setax
Expand All @@ -187,11 +187,11 @@ def EI_PayrollTax(SS_Earnings_c, e00200p, e00200s, pencon_p, pencon_s,
Total self-employment income for filing unit
payrolltax: float
Total (employee and employer) payroll tax liability
payrolltax = ptax_was + setax + ptax_amc
payrolltax = ptax_was
ptax_was: float
Employee and employer OASDI plus HI FICA tax
setax: float
Self-employment tax
Self-employment tax (included in othertaxes and iitax)
c03260: float
Deductible part of self-employment tax
c03260 = (1 - ALD_SelfEmploymentTax_hc) * 0.5 * setax
Expand Down Expand Up @@ -260,9 +260,7 @@ def EI_PayrollTax(SS_Earnings_c, e00200p, e00200s, pencon_p, pencon_s,
extra_ss_income_s * (FICA_ss_trt_employer + FICA_ss_trt_employee))

# compute part of total payroll taxes for filing unit
# (the ptax_amc part of total payroll taxes for the filing unit is
# computed in the AdditionalMedicareTax function below)
payrolltax = ptax_was + setax + extra_payrolltax
payrolltax = ptax_was + extra_payrolltax

# compute OASDI part of payroll taxes
ptax_oasdi = (ptax_ss_was_p + ptax_ss_was_s +
Expand Down Expand Up @@ -1088,9 +1086,9 @@ def AdditionalMedicareTax(e00200, MARS,
AMEDT_ec, sey, AMEDT_rt,
FICA_mc_trt_employer, FICA_mc_trt_employee,
FICA_ss_trt_employer, FICA_ss_trt_employee,
ptax_amc, payrolltax):
ptax_amc):
"""
Computes Additional Medicare Tax (Form 8959) included in payroll taxes.
Computes Additional Medicare Tax (Form 8959) included in othertaxes.
Parameters
-----
Expand All @@ -1113,23 +1111,18 @@ def AdditionalMedicareTax(e00200, MARS,
sey: float
Self-employment income
ptax_amc: float
Additional Medicare Tax
payrolltax: float
payroll tax augmented by Additional Medicare Tax
Additional Medicare Tax (included in othertaxes and iitax)
Returns
-------
ptax_amc: float
Additional Medicare Tax
payrolltax: float
payroll tax augmented by Additional Medicare Tax
Additional Medicare Tax (included in othertaxes and iitax)
"""
line8 = max(0., sey) * (1. - 0.5 * (FICA_mc_trt_employer + FICA_mc_trt_employee + FICA_ss_trt_employer + FICA_ss_trt_employee))
line11 = max(0., AMEDT_ec[MARS - 1] - e00200)
ptax_amc = AMEDT_rt * (max(0., e00200 - AMEDT_ec[MARS - 1]) +
max(0., line8 - line11))
payrolltax += ptax_amc
return (ptax_amc, payrolltax)
return ptax_amc


@iterate_jit(nopython=True)
Expand Down Expand Up @@ -3150,8 +3143,8 @@ def AdditionalCTC(codtc_limited, ACTC_c, n24, earned, ACTC_Income_thd,

@iterate_jit(nopython=True)
def C1040(c05800, c07180, c07200, c07220, c07230, c07240, c07260, c07300,
c07400, c07600, c08000, e09700, e09800, e09900, niit, othertaxes,
c07100, c09200, odc, charity_credit,
c07400, c07600, c08000, e09700, e09800, e09900, niit, setax,
ptax_amc, othertaxes, c07100, c09200, odc, charity_credit,
personal_nonrefundable_credit,
CTC_is_refundable, ODC_is_refundable):
"""
Expand Down Expand Up @@ -3190,8 +3183,12 @@ def C1040(c05800, c07180, c07200, c07220, c07230, c07240, c07260, c07300,
Penalty tax on qualified retirement plans
niit: float
Net Investment Income Tax from Form 8960
setax: float
Self-employment tax
ptax_amc: float
Additional Medicare tax
othertaxes: float
Sum of niit, e09700, e09800, and e09900
Sum of niit, setax, ptax_amc, e09700, e09800, and e09900
c07100: float
Total non-refundable credits used to reduce positive tax liability
c09200: float
Expand Down Expand Up @@ -3221,7 +3218,7 @@ def C1040(c05800, c07180, c07200, c07220, c07230, c07240, c07260, c07300,
# tax after credits (2016 Form 1040, line 56)
tax_net_nonrefundable_credits = max(0., c05800 - c07100)
# tax (including othertaxes) before refundable credits
othertaxes = e09700 + e09800 + e09900 + niit
othertaxes = e09700 + e09800 + e09900 + niit + setax + ptax_amc
c09200 = othertaxes + tax_net_nonrefundable_credits
return (c07100, othertaxes, c09200)

Expand Down
11 changes: 5 additions & 6 deletions taxcalc/records_variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -736,9 +736,8 @@
},
"payrolltax": {
"type": "float",
"desc": "Total (employee + employer) payroll tax liability; appears as PAYTAX variable in tc CLI minimal output (payrolltax = ptax_was + setax + ptax_amc)",
"form": {"2013-2013": "OASDI+HI FICA plus 1040 lines 56 and 60a",
"2014-2016": "OASDI+HI FICA plus 1040 lines 57 and 62a"}
"desc": "Total (employee + employer) payroll tax liability; appears as PAYTAX variable in tc CLI minimal output (payrolltax = ptax_was)",
"form": {"2013-20??": "OASDI+HI FICA"}
},
"refund": {
"type": "float",
Expand Down Expand Up @@ -1133,13 +1132,13 @@
},
"ptax_amc": {
"type": "float",
"desc": "Additional Medicare Tax from Form 8959 (included in payrolltax)",
"desc": "Additional Medicare Tax from Form 8959 (included in othertaxes and iitax)",
"form": {"2013-2013": "1040 line 60a",
"2014-2016": "1040 line 62a"}
},
"ptax_oasdi": {
"type": "float",
"desc": "Employee + employer OASDI FICA tax plus self-employment tax (excludes HI FICA so positive ptax_oasdi is less than ptax_was plus setax)",
"desc": "Employee + employer OASDI FICA tax plus self-employment tax",
"form": {"2013-2013": "OASDI FICA plus 1040 line 56",
"2014-2016": "OASDI FICA plus 1040 line 57"}
},
Expand All @@ -1151,7 +1150,7 @@
},
"setax": {
"type": "float",
"desc": "Self-employment tax",
"desc": "Self-employment tax (included in othertaxes and iitax)",
"form": {"2013-2013": "1040 line 56",
"2014-2016": "1040 line 57"}
},
Expand Down
20 changes: 10 additions & 10 deletions taxcalc/reforms/ARPA.out.csv
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000,12400,17600,114.5,4590
12,60000,12400,47600,4462,9180
13,460000,12400,447600,131455,32754.8
21,60000,24800,35200,-3771,9180
22,120000,24800,95200,4924,18360
23,240000,24800,215200,35807,36720
31,30000,18650,11350,-4543.93,4590
32,60000,18650,41350,880,9180
33,120000,18650,101350,13537,18360
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000.00,12400.00,17600.00,114.50,4590.00
12,60000.00,12400.00,47600.00,4462.00,9180.00
13,460000.00,12400.00,447600.00,133795.00,30414.80
21,60000.00,24800.00,35200.00,-3771.00,9180.00
22,120000.00,24800.00,95200.00,4924.00,18360.00
23,240000.00,24800.00,215200.00,35807.00,36720.00
31,30000.00,18650.00,11350.00,-4543.93,4590.00
32,60000.00,18650.00,41350.00,880.00,9180.00
33,120000.00,18650.00,101350.00,13537.00,18360.00
20 changes: 10 additions & 10 deletions taxcalc/reforms/CARES.out.csv
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000,12400,17600,714.5,4590
12,60000,12400,47600,5062,9180
13,460000,12400,447600,131455,32754.8
21,60000,24800,35200,-2571,9180
22,120000,24800,95200,6124,18360
23,240000,24800,215200,35807,36720
31,30000,18650,11350,-3943.93,4590
32,60000,18650,41350,1480,9180
33,120000,18650,101350,14137,18360
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000.00,12400.00,17600.00,714.50,4590.00
12,60000.00,12400.00,47600.00,5062.00,9180.00
13,460000.00,12400.00,447600.00,133795.00,30414.80
21,60000.00,24800.00,35200.00,-2571.00,9180.00
22,120000.00,24800.00,95200.00,6124.00,18360.00
23,240000.00,24800.00,215200.00,35807.00,36720.00
31,30000.00,18650.00,11350.00,-3943.93,4590.00
32,60000.00,18650.00,41350.00,1480.00,9180.00
33,120000.00,18650.00,101350.00,14137.00,18360.00
2 changes: 1 addition & 1 deletion taxcalc/reforms/ConsolidatedAppropriationsAct2021.out.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000.00,12400.00,17600.00,114.50,4590.00
12,60000.00,12400.00,47600.00,4462.00,9180.00
13,460000.00,12400.00,447600.00,131455.00,32754.80
13,460000.00,12400.00,447600.00,133795.00,30414.80
21,60000.00,24800.00,35200.00,-3771.00,9180.00
22,120000.00,24800.00,95200.00,4924.00,18360.00
23,240000.00,24800.00,215200.00,35807.00,36720.00
Expand Down
20 changes: 10 additions & 10 deletions taxcalc/reforms/Larson2019.out.csv
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000,12400,17600,114.5,4620
12,60000,12400,47600,4462,9240
13,460000,12400,447600,131455,40392.5
21,60000,24800,35200,-3771,9240
22,120000,24800,95200,4924,18480
23,240000,24800,215200,35807,36960
31,30000,18650,11350,-4543.93,4620
32,60000,18650,41350,880,9240
33,120000,18650,101350,13537,18480
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000.00,12400.00,17600.00,114.50,4620.00
12,60000.00,12400.00,47600.00,4462.00,9240.00
13,460000.00,12400.00,447600.00,133795.00,38052.50
21,60000.00,24800.00,35200.00,-3771.00,9240.00
22,120000.00,24800.00,95200.00,4924.00,18480.00
23,240000.00,24800.00,215200.00,35807.00,36960.00
31,30000.00,18650.00,11350.00,-4543.93,4620.00
32,60000.00,18650.00,41350.00,880.00,9240.00
33,120000.00,18650.00,101350.00,13537.00,18480.00
2 changes: 1 addition & 1 deletion taxcalc/reforms/Renacci.out.csv
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ RECID,c00100,standard,c04800,iitax,payrolltax
23,240000.00,32186.76,186355.40,30495.47,36720.00
31,30000.00,16093.38,3177.70,-5939.56,4590.00
32,60000.00,16093.38,33177.70,517.77,9180.00
33,120000.00,16093.38,93177.70,13822.74,18360.00
33,120000.00,16093.38,93177.70,13822.74,18360.00
20 changes: 10 additions & 10 deletions taxcalc/reforms/SandersDeFazio.out.csv
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000,12400,17600,114.5,4590
12,60000,12400,47600,4462,9180
13,460000,12400,447600,131455,58794.8
21,60000,24800,35200,-3771,9180
22,120000,24800,95200,4924,18360
23,240000,24800,215200,35807,36720
31,30000,18650,11350,-4543.93,4590
32,60000,18650,41350,880,9180
33,120000,18650,101350,13537,18360
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000.00,12400.00,17600.00,114.50,4590.00
12,60000.00,12400.00,47600.00,4462.00,9180.00
13,460000.00,12400.00,447600.00,133795.00,56454.80
21,60000.00,24800.00,35200.00,-3771.00,9180.00
22,120000.00,24800.00,95200.00,4924.00,18360.00
23,240000.00,24800.00,215200.00,35807.00,36720.00
31,30000.00,18650.00,11350.00,-4543.93,4590.00
32,60000.00,18650.00,41350.00,880.00,9180.00
33,120000.00,18650.00,101350.00,13537.00,18360.00
2 changes: 1 addition & 1 deletion taxcalc/reforms/Trump2016.out.csv
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ RECID,c00100,standard,c04800,iitax,payrolltax
23,240000.00,32186.76,207813.24,41492.61,36720.00
31,30000.00,16093.38,13906.62,-3129.39,4590.00
32,60000.00,16093.38,43906.62,2946.31,9180.00
33,120000.00,16093.38,103906.62,19321.31,18360.00
33,120000.00,16093.38,103906.62,19321.31,18360.00
2 changes: 1 addition & 1 deletion taxcalc/reforms/Trump2017.out.csv
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ RECID,c00100,standard,c04800,iitax,payrolltax
23,240000.00,27251.46,195367.70,36627.05,36720.00
31,30000.00,20063.08,1246.50,-4673.54,4590.00
32,60000.00,20063.08,31246.50,324.65,9180.00
33,120000.00,20063.08,91246.50,13211.19,18360.00
33,120000.00,20063.08,91246.50,13211.19,18360.00
20 changes: 10 additions & 10 deletions taxcalc/reforms/clp.out.csv
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000,12400,17600,114.5,4590
12,60000,12400,47600,4462,9180
13,460000,12400,447600,131455,32754.8
21,60000,24800,35200,-3771,9180
22,120000,24800,95200,4924,18360
23,240000,24800,215200,35807,36720
31,30000,18650,11350,-4543.93,4590
32,60000,18650,41350,880,9180
33,120000,18650,101350,13537,18360
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000.00,12400.00,17600.00,114.50,4590.00
12,60000.00,12400.00,47600.00,4462.00,9180.00
13,460000.00,12400.00,447600.00,133795.00,30414.80
21,60000.00,24800.00,35200.00,-3771.00,9180.00
22,120000.00,24800.00,95200.00,4924.00,18360.00
23,240000.00,24800.00,215200.00,35807.00,36720.00
31,30000.00,18650.00,11350.00,-4543.93,4590.00
32,60000.00,18650.00,41350.00,880.00,9180.00
33,120000.00,18650.00,101350.00,13537.00,18360.00
2 changes: 1 addition & 1 deletion taxcalc/reforms/ext.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// REFORM TO EXTEND TEMPORARY TCJA PROVISIONS BEYOND 2025
// USING TAX-CALCULATOR 4.3.3
// USING TAX-CALCULATOR 4.3.4
// WITH 2025-to-2026 INDEXING FACTOR = 1.022000
// AND 2028-to-2029 INDEXING FACTOR = 1.019400
{
Expand Down
2 changes: 1 addition & 1 deletion taxcalc/reforms/ptaxes1.out.csv
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ RECID,c00100,standard,c04800,iitax,payrolltax
23,240000.00,13625.73,208993.43,44446.65,36720.00
31,30000.00,10031.54,11278.04,-3670.39,4590.00
32,60000.00,10031.54,41278.04,2675.55,9180.00
33,120000.00,10031.54,101278.04,17728.06,18360.00
33,120000.00,10031.54,101278.04,17728.06,18360.00
2 changes: 1 addition & 1 deletion taxcalc/reforms/rounding.out.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RECID,c00100,standard,c04800,iitax,payrolltax
11,30000.00,12400.00,17600.00,114.50,4590.00
12,60000.00,12400.00,47600.00,4462.00,9180.00
13,460000.00,12400.00,447600.00,131455.00,32754.80
13,460000.00,12400.00,447600.00,133795.00,30414.80
21,60000.00,24800.00,35200.00,-3771.00,9180.00
22,120000.00,24800.00,95200.00,4924.00,18360.00
23,240000.00,24800.00,215200.00,35807.00,36720.00
Expand Down
Loading

0 comments on commit 49b715a

Please sign in to comment.