PolicyEngine / policyengine-us

The PolicyEngine US Python package contains a rules engine of the US tax-benefit system, and microdata generation for microsimulation analysis.
https://policyengine.org/us
GNU Affero General Public License v3.0
103 stars 176 forks source link

Incorrect above-the-line-deduction for qualified tuition expenses before 2021 #1318

Open martinholmer opened 2 years ago

martinholmer commented 2 years ago

Before 2021, qualified tuition expenses could be taken as an above-the-line-deduction lowering AGI. Turbo Tax believes the amount of tuition expenses that can be used to reduce AGI is limited to $4000 per person with tuition expenses as shown in this screenshot:

Screen Shot 2022-09-01 at 1 02 01 PM

The following simple YAML test file shows that OpenFisca-US 0.129.2 version does not cap the above-the-line-deduction, and therefore, reduces AGI by too much. Here is test case:

- name: Tax unit created by hand for AGI test
  absolute_error_margin: 0.01
  period: 2020
  input:
    people:
      person1:
        is_tax_unit_head: 1
        is_tax_unit_spouse: 0
        is_tax_unit_dependent: 0
        age: 25
        ssi: 0
        state_supplement: 0
        wic: 0
        employment_income: 74000
        qualified_tuition_expenses: 14000
        is_eligible_for_american_opportunity_credit: 1
    spm_units:
      spm_unit:
        members: [person1]
        snap: 0
        tanf: 0
    tax_units:
      tax_unit:
        members: [person1]
        premium_tax_credit: 0
    households:
      household:
        members: [person1]
        state_code: TX
  output:
    adjusted_gross_income: 70000

Here are the test results for the above case:

================================= FAILURES ===================================
_______________________________ test session _________________________________
/Users/mrh/work/m20-id0.test.yaml:
  Test 'Tax unit created by hand for AGI test':
    adjusted_gross_income@2020: [60000.] differs from 70000.0 
      with an absolute margin [10000.] > 0.01
========================= short test summary info ============================
FAILED m20-id0.test.yaml::
============================ 1 failed in 0.49s ===============================

And here are some excerpts from the test trace output:

irs_gross_income<2020> >> [74000.]
qualified_tuition_expenses<2020> >> [14000.]
above_the_line_deductions<2020> >> [14000.]
adjusted_gross_income<2020> >> [60000.]

The USI-Tax-Analyzer generates an AGI amount of $70,000 for this case. This case cannot be simulated by TAXSIM35 because that model does not have qualified tuition expenses as an input variable.

martinholmer commented 2 years ago

PolicyEngineUS logic allows an above-the-line deduction before 2021 of all qualified_tuition_expenses. But IRS Form 8917 for 2020 makes it clear that this ALD is capped at $2000 for tax units with modified AGI above a threshold and is capped at $4000 for tax units with modified AGI below that threshold. So, the current PolicyEngineUS logic (for years before 2021) is incomplete.

Given that this ALD for tuition expenses was eliminated beginning in 2021 and given that few datasets include information on qualified tuition expenses, it seems like the cost of correcting this bug is larger than the benefit of correcting the bug. Given those considerations, I'm closing this issue.

martinholmer commented 2 years ago

@MaxGhenis said in issue #1324:

I agree this is low-priority, though I'd prefer we keep uncompleted issues open and as we identify a project management system we'll push prioritization there.

Given this strategy, issue #1318 is being reopened.