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

Determine itemization choice by minimizing federal+state tax liability #1826

Closed martinholmer closed 1 year ago

martinholmer commented 1 year ago

PolicyEngineUS simulates a taxpayer's decision about whether or not to itemize deductions on the federal return by minimizing federal income tax. The states that offer taxpayers a choice between a standard deduction or itemized deductions typically require federal itemization if the taxpayer itemizes on the state form. This rule is mainly for administrative purposes: most states use the federal definition of itemized deductions, and therefore, require those who itemize for state taxes to attach an IRS Form 1040 Schedule A to their state return. Of course, taxpayers who itemize on the federal form are not required to itemize on the state form, but state itemization requires federal itemization.

Given this state of affairs, taxpayers living in states with generous itemized deduction rules might find it advantageous to itemize on the federal form, even though doing so increases their federal income tax liability, if itemization on the state form reduces state income tax liability by enough to offset the increase in federal income tax liability. Among the states whose income tax logic is now complete, MD and MO have generous itemized deduction rules relative to their standard deduction amounts.

It turns out that TAXSIM35 simulates a taxpayer's federal itemization decision so that the decision minimizes the sum of the taxpayer's federal and state income tax liabilities. And when it makes this kind a strategic decision on the federal form, it prints the following message:

This taxpayer reduced the sum of federal and
state income tax by itemizing, despite having
few deductions to claim. 

The phrase "despite having few deductions to claim" refers to the taxpayer's decision to itemize on the federal form even though federal income tax liability would be less if the taxpayer used the federal standard deduction.

There are two cases in the MD k21 sample described in issue #993 where the cause of the MD income tax difference between PolicyEngineUS and TAXSIM35 is the myopic federal itemization decision-making in PolicyEngineUS. Here is one of those two cases:

- name: Tax unit with taxsimid 2950 in k21.its.csv and k21.ots.csv
  absolute_error_margin: 0.01
  period: 2021
  input:
    people:
      person1:
        is_tax_unit_head: true
        age: 72
        employment_income: 1010
        qualified_dividend_income: 10010
        taxable_interest_income: 11010
        short_term_capital_gains: 2010
        long_term_capital_gains: 7010
        taxable_private_pension_income: 5000
        social_security: 1000
        real_estate_taxes: 8000
        interest_expense: 8000
        self_employment_income: 87010
        business_is_qualified: true
        business_is_sstb: true
        w2_wages_from_qualified_business: 100e6
        ssi: 0  # not in TAXSIM35
        state_supplement: 0  # not in TAXSIM35
        wic: 0  # not in TAXSIM35
      person2:
        age: 16
        ssi: 0  # not in TAXSIM35
        state_supplement: 0  # not in TAXSIM35
        wic: 0  # not in TAXSIM35
    spm_units:
      spm_unit:
        members: [person1, person2]
        snap: 0  # not in TAXSIM35
        tanf: 0  # not in TAXSIM35
    tax_units:
      tax_unit:
        members: [person1, person2]
        premium_tax_credit: 0  # not in TAXSIM35
    households:
      household:
        members: [person1, person2]
        state_code: MD
  output:  # expected results from patched TAXSIM35 2023-02-22 version
    md_income_tax: 4151.86

And here are the test results for that case:

================================= FAILURES ===================================
_______________________________ test session _________________________________
/Users/mrh/work/Policy-Engine-US/MD/k21-id2950.yaml:
  Test 'Tax unit with taxsimid 2950 in k21.its.csv and k21.ots.csv':
    md_income_tax@2021: [4688.6147] differs from 4151.85986328125 
                        with an absolute margin [536.7549] > 0.01
========================= short test summary info ============================
FAILED k21-id2950.yaml::
============================ 1 failed in 0.61s ===============================

So, the myopic decision-making in PolicyEngineUS causes this taxpayer to pay more than $536 extra in state taxes. The following TAXSIM35 output for this case shows the non-myopic decision making:

(policyengine-us) MD% taxsim < k21-id2950.csv 
 NBER TAXSIM Model v35 (12/30/22) With TCJA including
      TAXSIM patches by MRH as of 2023-02-22
 State law coded through        2021
 Later state laws extrapolated from that year.
 Marginal tax rate wrt taxpayer earnings.

 Input Data:                   
     1. Record ID:                     2950.
     2. Tax Year:                  2021.00
     3. State Code:                      21.Maryland        
     4. Marital Status:               1.00 HoH     
   5-6. Age (Txpyr/Spouse):          72.00       0.00
     7. Dependent Exemptions:         1.00
  8-10. #deps for CCC/CTC/EIC:        0.00       1.00       1.00
 11-12. Wages (Txpyr/Spouse):      1010.00       0.00
 11a12a Self-employment income:       0.00       0.00
    13. Dividend Income:          10010.00
    14. Interest Received:        11010.00
    15. Short Term Gains:          2010.00
    16. Long Term Gains:           7010.00
    17. Other Property:               0.00
    18. Other Non-Property:           0.00
    19. Taxable Pensions:          5000.00
    20. Gross Social Security:     1000.00
    21. Tot/Txpy/Spouse UI   :        0.00       0.00       0.00
    22. Non-taxable Transfers:        0.00
    23. Rent Paid:                    0.00
    24. Property Taxes Paid:       8000.00
    25. Other Itemized Deds:          0.00
    26. Child Care Expenses:          0.00
    27. Mortgage Interest:         8000.00
    28. S-Corp profits:               0.00
 29 31. Txpy/Spouse QBI w/o PO:       0.00       0.00
  30 32. Txpy/Spouse SSTB w PO:   87010.00       0.00
 39/40. opt1/value:                  56.00       1.00

 This taxpayer reduced the sum of federal and
 state income tax by itemizing, despite having
 few deductions to claim. 

 Basic Output:               
      1. Record ID:                2950.                         
      2. Year:                           2021
      3. State (SOI code):                 21        Maryland            
      4. Federal IIT Liability:       7959.31
      5. State IIT Liability:         4151.86
      6. SS Payroll Tax Liability:   12448.65
 Marginal Rates wrt  Earner
      7. Federal Marginal Rate:         59.33
      8. State Marginal Rate:            4.75
      9. Taxpayer SS Rate:              15.30

 Federal Tax Calculation:              Base        + $1
     10. Federal AGI                117762.94   117761.94
     11. UI in AGI 1979+                 0.00        0.00
     12. Social Security in AGI 84     850.00      850.00
     13. Zero Bracket Amount             0.00        0.00
     14. Personal Exemptions             0.00        0.00
     15. Exemption Phaseout 1991+        0.00        0.00
     16. Deduction Phaseout 1991+        0.00        0.00
     17. Deductions allowed          18000.00    18000.00
         QBI deduction               16172.59    16172.59
     18. Federal Taxable Income      83590.35    83589.35
     19. Federal Regular Tax         12685.88    12685.66
     20. Exemption Surtax 1988-96        0.00        0.00
     21. General Tax Credit 1975-8       0.00        0.00
     22. Child Tax Credit             2700.00     2700.00
     23  Refundable Part              2700.00     2700.00
     24. Child Care Credit 1076+         0.00        0.00
     25. Earned Income Credit 1975       0.00        0.00
     26. Alternative Min Income:     93590.35    93589.35
     27. AMT                             0.00        0.00
     28. Income Tax Before Credits   11494.48    11494.26
     29. FICA                        12448.65    12448.50
         Taxpayer share of FICA      12371.39    12371.31

 State Tax Calculation:      
     30. Household Income           124060.00   124059.00
     31. Imputed Rent                    0.00        0.00
     32. AGI                        111912.94   111911.94
     33. Exemptions                   7400.00     7400.00
     34. Standard Deduction           4700.00     4700.00
     35. Itemized Deductions         16000.00    16000.00
     36. Taxable Income              88512.94    88511.94
     37. Property Tax Credit             0.00        0.00
     38. Child Care Credit               0.00        0.00
     39. EIC                             0.00        0.00
     40. Total Credits                   0.00        0.00
     41. Bracket Rate                    4.75        4.75
         State Tax after Credits      4151.86     4151.82
 TCJA 2018+

     42. QBI Deduction               16172.59    16172.59
 Additional Medicare Taxes 2013+
     43. Net Investment Income Tax       0.00        0.00
     44. Medicare Tax on Earnings        0.00        0.00

 Decomposition of Federal Marginal Rate
    (taxpayer earned income)
 ---[snip]---

So, this taxpayer forgoes the federal standard deduction of $20,500 in favor of $18,000 in federal itemized deductions, in order to get MD itemized deductions of $16,000 instead of the $4,700 MD standard deduction.

And there are several thousand such cases in the MO k21 sample described in issue #993.

martinholmer commented 1 year ago

Issue #1826 is being closed because it has been resolved by the implementation of the PolicyEngine-US testing methods described in discussion topic #2389.