Skip to content
Merged
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/fix-dwks-28-1250-netting.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Net collectibles loss, the net short-term capital loss and the long-term capital loss carryover against 28 percent rate gain, and the rest against unrecaptured section 1250 gain, per 26 U.S.C. 1(h)(4) and 1(h)(6), through new inputs for those amounts before netting; amounts entered as reported on Schedule D lines 18 and 19 pass through unchanged.
4 changes: 4 additions & 0 deletions policyengine_us/tests/core/test_uprating_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
"self_employed_pension_contributions_desired": SELF_EMPLOYMENT,
# Components of capital gains.
"long_term_capital_gains_on_collectibles": CAPITAL_GAINS,
"long_term_capital_loss_carryover": CAPITAL_GAINS,
"collectibles_gain_or_loss": CAPITAL_GAINS,
"section_1202_gain": CAPITAL_GAINS,
"unrecaptured_section_1250_gain_before_losses": CAPITAL_GAINS,
"unrecaptured_section_1250_gain": CAPITAL_GAINS,
"non_sch_d_capital_gains": CAPITAL_GAINS,
"schedule_d_capital_gain_distributions": CAPITAL_GAINS,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
# 26 U.S.C. 1(h)(4): collectibles gain and section 1202 gain less collectibles
# loss, the net short-term capital loss and the long-term capital loss carried
# to the year, if more than zero. Line references are to the 2025 28% Rate
# Gain Worksheet (Instructions for Schedule D, page 11); line 7 is Schedule D
# line 18. Amounts before netting are collectibles_gain_or_loss and
# section_1202_gain; amounts already netted, as the microdata carry Schedule D
# line 18, are long_term_capital_gains_on_collectibles and
# long_term_capital_gains_on_small_business_stock and pass through.
- name: Without losses the 28 percent rate gain is the collectibles gain
period: 2025
input:
long_term_capital_gains: 50_000
collectibles_gain_or_loss: 10_000
output:
capital_gains_28_percent_rate_gain: 10_000

- name: A short-term loss reduces the 28 percent rate gain
period: 2025
input:
long_term_capital_gains: 50_000
collectibles_gain_or_loss: 10_000
short_term_capital_gains: -8_000
output:
# Line 1 = 10,000, line 6 = (8,000), line 7 = 2,000.
capital_gains_28_percent_rate_gain: 2_000

- name: A short-term loss larger than the gain leaves none
period: 2025
input:
long_term_capital_gains: 50_000
collectibles_gain_or_loss: 10_000
short_term_capital_gains: -15_000
output:
# Line 7 = 10,000 - 15,000, zero or less, so 0.
capital_gains_28_percent_rate_gain: 0

- name: A short-term gain does not reduce it
period: 2025
input:
long_term_capital_gains: 50_000
collectibles_gain_or_loss: 10_000
short_term_capital_gains: 5_000
output:
# Line 6 is zero when Schedule D line 7 is a gain.
capital_gains_28_percent_rate_gain: 10_000

- name: A long-term capital loss carryover reduces it
period: 2025
input:
long_term_capital_gains: 47_000
collectibles_gain_or_loss: 10_000
long_term_capital_loss_carryover: 3_000
output:
# Line 5 = (3,000), line 7 = 7,000. long_term_capital_gains is net of the
# carryover, as Schedule D line 15 is.
capital_gains_28_percent_rate_gain: 7_000

- name: Section 1202 gain, a short-term loss and a carryover together
period: 2025
input:
long_term_capital_gains: 47_000
collectibles_gain_or_loss: 10_000
section_1202_gain: 4_000
long_term_capital_loss_carryover: 3_000
short_term_capital_gains: -5_000
output:
# Lines 1 + 2 = 14,000, line 5 = (3,000), line 6 = (5,000), line 7 =
# 6,000.
capital_gains_28_percent_rate_gain: 6_000

- name: A collectibles loss offsets section 1202 gain
period: 2025
input:
long_term_capital_gains: 20_000
collectibles_gain_or_loss: -2_000
section_1202_gain: 5_000
output:
# Line 1 = (2,000), line 2 = 5,000, line 7 = 3,000.
capital_gains_28_percent_rate_gain: 3_000

- name: A net collectibles loss leaves no 28 percent rate gain
period: 2025
input:
long_term_capital_gains: 20_000
collectibles_gain_or_loss: -4_000
output:
capital_gains_28_percent_rate_gain: 0

- name: Spouses' gains and losses are netted on the joint return
period: 2025
input:
people:
head:
age: 50
long_term_capital_gains: 30_000
collectibles_gain_or_loss: 6_000
spouse:
age: 50
short_term_capital_gains: -2_000
long_term_capital_gains: -1_000
long_term_capital_loss_carryover: 1_000
tax_units:
tax_unit:
members: [head, spouse]
marital_units:
marital_unit:
members: [head, spouse]
households:
household:
members: [head, spouse]
state_code: TX
output:
# Line 1 = 6,000, line 5 = (1,000), line 6 = (2,000), line 7 = 3,000.
capital_gains_28_percent_rate_gain: 3_000

- name: Section 1202 gain and collectibles gain net together against a short-term loss
period: 2025
input:
long_term_capital_gains: 60_000
collectibles_gain_or_loss: 10_000
section_1202_gain: 15_000
short_term_capital_gains: -8_000
output:
# Line 1 = 10,000, line 2 = 15,000, line 6 = (8,000), line 7 = 17,000.
capital_gains_28_percent_rate_gain: 17_000

- name: A spouse's short-term gain offsets the other's short-term loss first
period: 2025
input:
people:
head:
age: 50
long_term_capital_gains: 30_000
short_term_capital_gains: -3_000
spouse:
age: 50
long_term_capital_gains: 10_000
collectibles_gain_or_loss: 10_000
short_term_capital_gains: 1_000
tax_units:
tax_unit:
members: [head, spouse]
marital_units:
marital_unit:
members: [head, spouse]
households:
household:
members: [head, spouse]
state_code: TX
output:
# Schedule D line 7 = -3,000 + 1,000 = (2,000); line 7 = 10,000 - 2,000.
capital_gains_28_percent_rate_gain: 8_000

- name: A negative section 1202 gain or carryover entry counts as zero
period: 2025
input:
long_term_capital_gains: 50_000
collectibles_gain_or_loss: 10_000
section_1202_gain: -1_000
long_term_capital_loss_carryover: -2_000
output:
# Section 1202 gain is an excess of gain over excluded gain, and the
# carryover is a positive amount (Schedule D line 14).
capital_gains_28_percent_rate_gain: 10_000

- name: Default dataset unit 1053056 (2025) is unchanged without losses
absolute_error_margin: 0.01
period: 2025
input:
filing_status: JOINT
taxable_income: 1_215_443.5
net_capital_gain: 1_110_012.88
long_term_capital_gains_on_collectibles: 610_988.38
unrecaptured_section_1250_gain: 208_514.11
foreign_earned_income_exclusion: 0
output:
# The dataset carries Schedule D lines 18 and 19 (PUF E24518 and E24515)
# and no capital losses, so netting leaves them as they are.
capital_gains_28_percent_rate_gain: 610_988.38
schedule_d_unrecaptured_section_1250_gain: 208_514.11
adjusted_net_capital_gain: 290_510.39
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,121 @@
foreign_earned_income_exclusion: 130_000
output:
capital_gains_tax: 0

# 26 U.S.C. 1(h)(4) and 1(h)(6): losses net against 28 percent rate gain, then
# unrecaptured section 1250 gain, before the 2025 Schedule D Tax Worksheet
# uses them (lines 11 to 13). 2025 single rates: 22 percent to 103,350, 24
# percent to 197,300, 32 percent to 250,525, 35 percent to 626,350; the 15
# percent capital gains rate starts at 48,350.
- name: A short-term loss moves collectibles gain to the 15 percent rate
absolute_error_margin: 0.01
period: 2025
input:
filing_status: SINGLE
state_code: TX
employment_income: 100_000
long_term_capital_gains: 50_000
collectibles_gain_or_loss: 10_000
short_term_capital_gains: -8_000
output:
# Taxable income 142,000 - 15,750 = 126,250; line 10 = 42,000; Schedule
# D line 18 = 2,000 (not 10,000); line 13 = 40,000; line 14 = 86,250;
# line 18 = 84,250; line 20 = 86,250 = line 21. Tax on 86,250 at the
# rate schedule is 1,192.50 + 4,386 + 8,310.50 = 13,889 (the model uses
# the schedule; line 44's Tax Table row gives 13,895); 40,000 at 15% =
# 6,000. Without the netting line 21 is 94,250 and the tax 15,649 +
# 4,800.
capital_gains_28_percent_rate_gain: 2_000
adjusted_net_capital_gain: 40_000
dwks13: 40_000
income_tax_main_rates: 13_889
capital_gains_tax: 6_000

- name: A short-term loss reduces unrecaptured section 1250 gain
absolute_error_margin: 0.01
period: 2025
input:
filing_status: SINGLE
state_code: TX
employment_income: 100_000
long_term_capital_gains: 50_000
unrecaptured_section_1250_gain_before_losses: 20_000
short_term_capital_gains: -6_000
output:
# Taxable income 128,250; line 10 = 44,000; Schedule D line 19 = 14,000;
# line 13 = 30,000; line 21 = line 14 = 98,250, which takes the 1250
# gain at the regular rates (below the top of the 24% bracket). Tax on
# 98,250 at the rate schedule = 13,889 + 2,640 = 16,529 (Tax Table row:
# 16,535); 30,000 at 15% = 4,500.
schedule_d_unrecaptured_section_1250_gain: 14_000
adjusted_net_capital_gain: 30_000
income_tax_main_rates: 16_529
capital_gains_tax: 4_500

- name: A short-term loss halves the gain taxed at 28 percent
absolute_error_margin: 0.01
period: 2025
input:
filing_status: SINGLE
state_code: TX
employment_income: 300_000
long_term_capital_gains: 50_000
collectibles_gain_or_loss: 20_000
short_term_capital_gains: -10_000
output:
# Taxable income 340,000 - 15,750 = 324,250; net capital gain 40,000;
# Schedule D line 18 = 10,000 (not 20,000); line 13 = 30,000. Line 21 =
# 284,250, above the top of the 24% bracket. 30,000 at 15% = 4,500 and
# 10,000 at 28% = 2,800. Without the netting: 20,000 at 15% and 20,000
# at 28%, 8,600.
capital_gains_28_percent_rate_gain: 10_000
adjusted_net_capital_gain: 30_000
dwks13: 30_000
capital_gains_tax: 7_300

- name: Above the 24 percent bracket losses move gain from 28 and 25 percent
absolute_error_margin: 0.01
period: 2025
input:
filing_status: SINGLE
state_code: TX
employment_income: 300_000
long_term_capital_gains: 100_000
collectibles_gain_or_loss: 30_000
unrecaptured_section_1250_gain_before_losses: 40_000
short_term_capital_gains: -35_000
output:
# Taxable income 349,250; line 10 = 65,000. Schedule D line 18 = 0 and
# line 19 = 40,000 - 5,000 = 35,000; line 13 = 30,000; line 21 =
# 284,250. 30,000 at 15% = 4,500; 35,000 at 25% = 8,750; nothing at
# 28%. Tax on 284,250 = 57,231 + 11,803.75 = 69,034.75. Without the
# netting the gains tax is 10,000 at 25% and 7,000 at 28%, 17,000.
capital_gains_28_percent_rate_gain: 0
schedule_d_unrecaptured_section_1250_gain: 35_000
adjusted_net_capital_gain: 30_000
income_tax_main_rates: 69_034.75
capital_gains_tax: 13_250

- name: 2026, losses move gain from 28 and 25 percent (Axiom companion N10)
absolute_error_margin: 0.01
period: 2026
input:
filing_status: SINGLE
state_code: TX
taxable_income: 349_250
long_term_capital_gains: 100_000
collectibles_gain_or_loss: 30_000
unrecaptured_section_1250_gain_before_losses: 40_000
short_term_capital_gains: -35_000
output:
# Net capital gain 65,000; 28 percent rate gain 0; unrecaptured section
# 1250 gain 35,000; adjusted net capital gain 30,000. Section 1(h)(1):
# (A) = max(284,250, min(201,775, 319,250)) = 284,250 (Rev. Proc.
# 2025-32 section 4.01, single); (C) 15% x 30,000 = 4,500 (below the
# 545,500 maximum 15-percent rate amount, section 4.03); (E) 25% x 35,000
# = 8,750; (F) 0.
capital_gains_28_percent_rate_gain: 0
schedule_d_unrecaptured_section_1250_gain: 35_000
adjusted_net_capital_gain: 30_000
capital_gains_excluded_from_taxable_income: 65_000
capital_gains_tax: 13_250
Loading
Loading