Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/section-461l.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Implement Section 461(l) excess business loss limitation for modeled business-loss sources, including partnership/S-corp, farm, rental, estate, and Form 4797 items.
3 changes: 2 additions & 1 deletion policyengine_us/parameters/gov/irs/gross_income/sources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ values:
- irs_employment_income
- self_employment_income
- partnership_s_corp_income
- farm_income
- farm_operations_income
- farm_rent_income
- other_net_gain_gross_income
- capital_gains
- taxable_interest_income
- rental_income
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,313 @@
# Tests for Section 461(l) excess business loss limitation
# Reference: https://www.law.cornell.edu/uscode/text/26/461#l

- name: S-corp loss with Section 461(l) limitation (from issue #7015)
period: 2024
absolute_error_margin: 1
input:
people:
person1:
age: 26
partnership_s_corp_income: -419_487
short_term_capital_gains: -111_233
long_term_capital_gains: -1_187
taxable_interest_income: 10
is_tax_unit_head: true
person2:
age: 27
employment_income: 82_813
partnership_s_corp_income: -419_487
short_term_capital_gains: -111_233
long_term_capital_gains: -1_187
taxable_interest_income: 10
is_tax_unit_spouse: true
tax_units:
tax_unit:
members: [person1, person2]
spm_units:
spm_unit:
members: [person1, person2]
households:
household:
members: [person1, person2]
state_code: RI
output:
# Total S-corp loss: -838,974
# Section 461(l) threshold for MFJ 2024: $610,000
# Limited business loss: $610,000
# Capital losses: 224,840 (111,233 + 1,187) * 2 = 224,840
# Limited capital loss: $3,000 (Section 1211 limit)
# Total loss_ald: 610,000 + 3,000 = 613,000
# Gross income: 82,813 + 20 (interest) = 82,833
# AGI: 82,833 - 613,000 = -530,167
loss_ald: 613_000
adjusted_gross_income: -530_167

- name: Self-employment loss under Section 461(l) threshold - single filer
period: 2024
absolute_error_margin: 1
input:
people:
person1:
age: 40
self_employment_income: -100_000
is_tax_unit_head: true
tax_units:
tax_unit:
members: [person1]
spm_units:
spm_unit:
members: [person1]
households:
household:
members: [person1]
state_code: TX
output:
# Business loss: $100,000
# 461(l) threshold for single 2024: $305,000
# Loss is under threshold, so full deduction
loss_ald: 100_000

- name: Combined SE and S-corp loss exceeding Section 461(l) threshold
period: 2024
absolute_error_margin: 1
input:
people:
person1:
age: 40
self_employment_income: -200_000
partnership_s_corp_income: -200_000
is_tax_unit_head: true
tax_units:
tax_unit:
members: [person1]
spm_units:
spm_unit:
members: [person1]
households:
household:
members: [person1]
state_code: TX
output:
# Total business loss: $400,000
# 461(l) threshold for single 2024: $305,000
# Limited to threshold
loss_ald: 305_000

- name: Business income offsets business losses before Section 461(l) cap
period: 2024
absolute_error_margin: 1
input:
people:
person1:
age: 40
self_employment_income: -500_000
partnership_s_corp_income: 300_000
is_tax_unit_head: true
tax_units:
tax_unit:
members: [person1]
spm_units:
spm_unit:
members: [person1]
households:
household:
members: [person1]
state_code: TX
output:
# Business income: $300,000
# Business loss: $500,000
# 461(l) threshold for single 2024: $305,000
# Max deductible business loss: 300,000 + 305,000 = 605,000
# Full $500,000 loss is deductible
loss_ald: 500_000
adjusted_gross_income: -200_000

- name: Business losses plus capital losses - limits apply separately
period: 2024
absolute_error_margin: 1
input:
people:
person1:
age: 40
self_employment_income: -400_000
short_term_capital_gains: -50_000
is_tax_unit_head: true
tax_units:
tax_unit:
members: [person1]
spm_units:
spm_unit:
members: [person1]
households:
household:
members: [person1]
state_code: TX
output:
# Business loss: $400,000
# 461(l) threshold for single 2024: $305,000
# Limited business loss: $305,000
# Capital loss: $50,000
# Limited capital loss: $3,000 (Section 1211)
# Total: $305,000 + $3,000 = $308,000
loss_ald: 308_000
limited_capital_loss: 3_000

- name: Farm loss is subject to Section 461(l) limitation
period: 2024
absolute_error_margin: 1
input:
people:
person1:
age: 40
farm_operations_income: -500_000
is_tax_unit_head: true
tax_units:
tax_unit:
members: [person1]
spm_units:
spm_unit:
members: [person1]
households:
household:
members: [person1]
state_code: TX
output:
# Farm loss: $500,000
# 461(l) threshold for single 2024: $305,000
# Limited to threshold
loss_ald: 305_000
adjusted_gross_income: -305_000

- name: Qualified rental loss is subject to Section 461(l) limitation
# Schedule E rental losses are included in the Section 461(l) bucket.
period: 2024
absolute_error_margin: 1
input:
people:
person1:
age: 40
rental_income: -500_000
is_tax_unit_head: true
tax_units:
tax_unit:
members: [person1]
spm_units:
spm_unit:
members: [person1]
households:
household:
members: [person1]
state_code: TX
output:
# Qualified rental loss: $500,000
# 461(l) threshold for single 2024: $305,000
# Limited to threshold
loss_ald: 305_000
adjusted_gross_income: -305_000

- name: Estate loss is subject to Section 461(l) limitation
period: 2024
absolute_error_margin: 1
input:
people:
person1:
age: 40
estate_income: -500_000
is_tax_unit_head: true
tax_units:
tax_unit:
members: [person1]
spm_units:
spm_unit:
members: [person1]
households:
household:
members: [person1]
state_code: TX
output:
# Estate/trust loss: $500,000
# 461(l) threshold for single 2024: $305,000
# Limited to threshold
loss_ald: 305_000
adjusted_gross_income: -305_000

- name: Other net gain offsets business losses before Section 461(l) cap
period: 2024
absolute_error_margin: 1
input:
people:
person1:
age: 40
self_employment_income: -500_000
is_tax_unit_head: true
tax_units:
tax_unit:
members: [person1]
other_net_gain: 300_000
spm_units:
spm_unit:
members: [person1]
households:
household:
members: [person1]
state_code: TX
output:
# Business loss: $500,000
# Other net gain: $300,000
# 461(l) threshold for single 2024: $305,000
# Max deductible business loss: 300,000 + 305,000 = 605,000
# Full loss is deductible, and the gain is included in gross income.
loss_ald: 500_000
adjusted_gross_income: -200_000

- name: MFJ gets higher Section 461(l) threshold
period: 2024
absolute_error_margin: 1
input:
people:
person1:
age: 40
partnership_s_corp_income: -500_000
is_tax_unit_head: true
person2:
age: 38
is_tax_unit_spouse: true
tax_units:
tax_unit:
members: [person1, person2]
spm_units:
spm_unit:
members: [person1, person2]
households:
household:
members: [person1, person2]
state_code: TX
output:
# Business loss: $500,000
# 461(l) threshold for MFJ 2024: $610,000
# Under threshold, so full deduction
loss_ald: 500_000

- name: Section 461(l) sunsets after 2026 (infinite threshold)
period: 2027
absolute_error_margin: 1
input:
people:
person1:
age: 40
partnership_s_corp_income: -1_000_000
is_tax_unit_head: true
tax_units:
tax_unit:
members: [person1]
spm_units:
spm_unit:
members: [person1]
households:
household:
members: [person1]
state_code: TX
output:
# No 461(l) limitation after 2026
loss_ald: 1_000_000
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,26 @@
output:
irs_gross_income: 1 + 2 + 3 + 4

- name: IRS gross income includes farm operations income.
period: 2022
input:
farm_operations_income: 100
output:
irs_gross_income: 100

- name: IRS gross income includes positive other net gain.
period: 2022
input:
people:
person1:
is_tax_unit_head: true
tax_units:
tax_unit:
members: [person1]
other_net_gain: 100
output:
irs_gross_income: 100

- name: Tax unit with tax-exempt pension income as sole income source.
absolute_error_margin: 0.01
period: 2021
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,12 @@
state_code: DC
output:
# limited_capital_loss = min(3_000, 5_000) = 3_000
# loss_ald = min(305_000, 25_000_000 + 3_000) = 305_000
# SE portion of loss_ald: 305_000 - 3_000 = 302_000
# DC addition: max(0, 302_000 - 12_000) = 290_000
dc_self_employment_loss_addition: 290_000
# Section 461(l) caps the business-loss portion at 305,000.
# Capital losses are capped separately under Section 1211 and added on top.
# loss_ald = 305_000 + 3_000 = 308_000
# SE portion of loss_ald: 308_000 - 3_000 = 305_000
# DC addition: max(0, 305_000 - 12_000) = 293_000
dc_self_employment_loss_addition: 293_000

- name: Case 7, SE loss exactly at DC threshold.
absolute_error_margin: 0.01
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@
state_code: MI
output:
# Per MI-1040CR-7 Line 22: "If negative, enter 0"
# Rental income floored at 0, so only employment income counts
mi_household_resources: 50_000
# Rental income floored at 0 for the MI source line,
# but federal above_the_line_deductions includes loss_ald of 30,000.
# Total: 50,000 - 30,000 = 20,000
mi_household_resources: 20_000

- name: Large capital gains loss limited to 3000
period: 2024
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,13 @@
members: [person1, person2]
state_fips: 54
output:
adjusted_gross_income: -3_000
# AGI calculation with Section 461(l):
# - Partnership/S-corp loss: 2 * 727,887.75 = 1,455,775.50
# - Limited by Section 461(l) for MFJ: $610,000
# - Capital loss: 2 * 896,056.95 = 1,792,113.90
# - Limited by Section 1211: $3,000
# - Gross income: ~$0.02 (interest only)
# - loss_ald = 610,000 + 3,000 = 613,000
# - AGI = 0 - 613,000 = -613,000
adjusted_gross_income: -613_000
wv_homestead_excess_property_tax_credit: 0
Loading
Loading