Skip to content

AZ income tax incorrectly allows unlimited capital losses to offset income #7289

@MaxGhenis

Description

@MaxGhenis

Summary

Arizona income tax calculation allows unlimited capital losses to offset ordinary income, instead of using the federal $3,000 capital loss limit. The taxpayer has short-term capital losses of ~$9.7M and long-term capital gains of ~$4.9M, resulting in a net capital loss of ~$4.8M that should be limited to $3,000 for state tax purposes.

Root Cause

Arizona starts from federal AGI, so the capital loss limitation should already be applied. However, PE is likely using raw capital_gains somewhere in the AZ income calculation that bypasses the federal $3,000 limit.

AZ Form 140 starts from "Federal adjusted gross income" (Line 12), which already has the $3,000 capital loss limitation built in from Schedule D Line 21.

Test Case

  • Filing: AZ joint 2024
  • 1 dependent child
  • Short-term capital gains: -$9,670,468
  • Long-term capital gains: +$4,900,962
  • Net capital loss: -$4,769,506 (limited to -$3,000 federally)

Expected:

  • AZ should use federal AGI with capital loss limited to $3,000
  • Capital losses should NOT offset other income beyond $3,000

Actual (PE):

  • PE allows the excess losses to be deducted against other income

Files to Review

  1. policyengine_us/parameters/gov/states/az/tax/income/ - Check if any income source uses capital_gains instead of loss-limited version
  2. policyengine_us/variables/gov/states/az/tax/income/ - Check AGI calculation

Suggested Fix

If AZ is using capital_gains in its income sources:

  1. Replace with loss_limited_capital_gains (see issue MS income tax incorrectly allows unlimited capital losses to offset income #6964 for implementation)
  2. Or ensure AZ properly flows from federal AGI which already has the limitation

Integration Test

- name: AZ joint with capital losses should use federal $3,000 limit
  absolute_error_margin: 100
  period: 2024
  input:
    people:
      person1:
        age: 40
        short_term_capital_gains: -4835234
        long_term_capital_gains: 2450481
        is_tax_unit_head: true
      person2:
        age: 40
        short_term_capital_gains: -4835234
        long_term_capital_gains: 2450481
        is_tax_unit_spouse: true
      child1:
        age: 10
        is_tax_unit_dependent: true
    tax_units:
      tax_unit:
        members: [person1, person2, child1]
    spm_units:
      spm_unit:
        members: [person1, person2, child1]
    households:
      household:
        members: [person1, person2, child1]
        state_fips: 4  # Arizona
  output:
    az_income_tax: ???  # Need TaxAct comparison

References

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions