Closed martinholmer closed 1 year ago
Hi @martinholmer -
taking a look right now and pulled out the relevant part of the computation tree here:
mo_itemized_deductions<2021, (default)> = [48202.49]
MO<2021, (default)> = [ True]
itemized_taxable_income_deductions<2021, (default)> = [26000.]
charitable_deduction<2021, (default)> = [0.]
interest_deduction<2021, (default)> = [26000.]
salt_deduction<2021, (default)> = [0.]
medical_expense_deduction<2021, (default)> = [0.]
casualty_loss_deduction<2021, (default)> = [0.]
misc_deduction<2021, (default)> = [0.]
employee_social_security_tax<2021, (default)> = [8853.6 8853.6] ***
taxable_earnings_for_social_security<2021, (default)> = [142800. 142800.]
employee_medicare_tax<2021, (default)> = [2305.645 2189.645] ***
payroll_tax_gross_wages<2021, (default)> = [159010. 151010.]
self_employment_tax<2021, (default)> = [0. 0.]
these numbers will be slightly different from what you are seeing because I have not pulled all the way up-to-date, but it seems that social security and medicare would be the culprits (marked with ***). There may be an error with how social security taxes are computed, as both individuals have social security tax liability, but only one is receiving it.
@nmrodelo, Thanks for the trace output. But I'm confused about why you are not getting the same amount for MO deductions as I am getting. What version of PolicyEngineUS are you using?
After the merge of PR #1609, I have found many 2021 MO income tax differences between PolicyEngineUS and TAXSIM35 in the $1000 to $1100 range. Below I present a test case that is an example of these differences. Then, after some explanation, I pose a question about how the PolicyEngineUS deductions are computed. It appears as if @nmrodelo and @MaxGhenis developed the original MO income tax code, so I'm hoping they can answer my question.
Here is the test case:
Here is a side-by-side comparison of TAXSIM35 and PolicyEngineUS output for this case:
Notice that the two models are in exact agreement on US income taxes (and all subtotals).
Also, note that the two models are in exact agreement on MO adjusted gross income.
The difference between the two models is in the MO deductions with TAXSIM35 generating $37,990.96 and PolicyEngineUS generating $58,202.49, a difference of $20,211.54.
After reviewing the PolicyEngineUS code, I have not been able to figure out where the $58,202.49 is coming from. My question is this: can someone walk me through the calculations for this test case showing how the test case inputs produce the MO deduction amount of $58,202.49?
Thanks in advance for your explanation.