Repository navigation
Conversation
Form 8960 line 4a takes Schedule 1 line 5, which includes Schedule E line 40 (Form 4835 net farm rental income or loss). Form 4835 is only for a rental activity under the passive activity rules, so it is rent under 26 USC 1411(c)(1)(A)(i). Add farm_rent_income to the NII sources, with worked Form 8960 tests and the dependent invariants. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Its federal target was the policyengine-us 2.37.2 evidence value. The -2,446.59 Form 4835 loss now reduces net investment income as it already reduced AGI, so NIIT falls by 3.8% x 2,446.59. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 10, 2026
Section 1411(c)(1)(B) allows only deductions allowed by chapter 1, and section 461(l) disallows business losses beyond business income plus the threshold. NII added Schedule E rental, Form 4835, estate and passive pass-through losses in full while AGI capped them. Add excess_business_loss (Form 461 line 16) and net_investment_income_excess_business_loss, the part of it that falls on losses NII counts (all of it when they are the only business losses, a proportional share otherwise), and add it back in NII. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The NII-follows-estate-income property now subtracts the estate losses that section 461(l) disallows, computed independently from the leaf inputs; the two edge rows with a 400,000 estate loss exercise it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Schedule K-1 (Form 1041) box 14 code H adjustment is positive only for section 1291 fund, CFC and QEF distributions that are NII but not taxable income (2025 Form 1041 instructions, Beneficiary reporting), so it is separate line 7 income and never takes a Part III loss out of NII. Count the whole Part III loss as an NII loss, add the review's counterexample (NIIT 29,906), and label the mixed-loss split provisional. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #10075.
What was wrong
net_investment_income, the base of the net investment income tax (NIIT) and of Minnesota's NIIT, left outfarm_rent_income. That variable holds Form 4835 net farm rental income or loss, which is reported on Schedule E line 40. The same amount was already in AGI and NIIT MAGI. So a farm landlord's crop-share rent raised MAGI but never counted as net investment income, and a Form 4835 loss never reduced it.The law (verbatim; full extracts with headings are in #10075)
So Form 4835 income is rent in NII. Form 8960 line 4b takes it back out only when the rental is nonpassive and rises to a section 162 trade or business: a real estate professional's rental, a rental grouped with a nonpassive business, or property rented to the owner's own nonpassive business.
Changes
gov.irs.investment.income.sources: addsfarm_rent_incomeafterrental_income, with a comment giving the Form 4835 → Schedule E line 40 → line 41 → Schedule 1 line 5 → Form 8960 line 4a path. Adds references to the 2025 Form 8960 instructions, Form 4835, Schedule E and §1411(c)(2).net_investment_incomealready sums sources over the head and spouse only (tax_unit_non_dep_add), so a dependent's Form 4835 income stays on the dependent's own Form 8960.excess_business_loss(Form 461 line 16) andnet_investment_income_excess_business_loss, adds the latter to the NII sources, and moveslimited_business_loss's item list into a shared helper. See "Decisions".farm_rent_income: gains documentation stating that it is the Form 4835 / Schedule E line 40 amount, not subject to self-employment tax, plus a Form 4835 reference.net_investment_income_tax.yamlandmn_niit.yaml;net_investment_income_tax.yaml: the review's counterexample, the same case with a Schedule E rental loss, and a mixed case;excess_business_loss.yaml(5 cases) andnet_investment_income_excess_business_loss.yaml(6 cases);farm_rent_incomeadded to the signed inputs and the reference sum oftest_dependent_net_investment_income_invariants.py;Decisions
rental_income. The model has no Form 8960 line 4b input for nonpassive rentals, for Schedule E Part I rents or for Form 4835. So it counts all of both. A line 4b rental input would serve both, and the EITC passive basket needs the same split (EITC investment-income test after #9572: dependents' amounts, passive income that is also earned income, and farm rental #9635, draft Count farm rent and leave out passive income that is also earned in the EITC investment income test (26 U.S.C. 32(i)(2)(E)) #9889). That is a separate change.passive_partnership_s_corp_incomegives the same line 4c.loss_ald, and NII now uses the same amount, as Form 8960 line 4a does with the Schedule 1 line 5 figure.limited_business_loss. NII added Schedule E rental, Form 4835, estate and passive pass-through losses in full. Onmain, a single filer with $500,000 of interest and a $600,000 rental loss had NII of −$100,000 and no NIIT; the law gives NII $187,000 and NIIT $7,106.excess_business_lossis Form 461 line 16.net_investment_income_excess_business_lossis the part of it that falls on losses NII counts. NII adds that part back (a new entry ingov.irs.investment.income.sources).limited_business_lossnow shares its list of items throughsection_461l_business_income_and_loss; its inputs and summation order are unchanged.Worked examples (hand-computed from the Form 8960 lines, not PolicyEngine output)
mainMinnesota: Minn. Stat. 290.033(a) gives "net investment income" "the meaning given in section 1411(c) of the Internal Revenue Code, excluding the net gain attributable to the disposition of property classified as class 2a". That exclusion covers gain, not rent.
Before the fix. I ran the new cases against
mainfirst. Four failed:net_investment_income0 vs 30,000The dependent case passed on both, as expected.
Snapshot update: PolicyBench scenario 120
policybench_ira.yamlscenario 120 (single, TY2026, Connecticut) hasfarm_rent_income−2,446.59. Its federal target is the policyengine-us 2.37.2 evidence value (#10032), not an outside oracle.income_tax_before_refundable_creditsfrom 40,423.18 to 40,330.21. The difference is 3.8% × 2,446.59, which is 92.97 in float32.The YAML carries a comment with the old value and the reason.
Invariants
These hold for every input. Tests:
farm_rent_income, of either sign. When the limit binds, NII takes only the allowed part of the loss, through the add-back in invariant 5. Covered bytest_net_investment_income_matches_reference, an independent numpy sum over the head and spouse that includes farm rent and the §461(l) add-back. Also covered bytest_estate_income_invariants.pyproperty 2, which now expects the add-back on its cap-binding rows.test_dependents_income_stays_off_filer_form_8960.test_units_without_dependents_match_all_member_formula.test_niit_within_statutory_bounds.net_investment_income_excess_business_loss≤ min(excess_business_loss, NII losses). It equals the excess when NII losses are the only business losses. Covered bytest_section_461l_addback_bounds, which also checks both new variables against an independent numpy computation from leaf inputs. Invariants 1 and 3 include the add-back in their reference.These are the file's existing property tests: a seeded random population of 300 tax units × 2 years plus edge rows, one vectorized simulation per scenario. Farm rent is now drawn signed for every member, dependents included. Three edge rows make §461(l) bind:
The population size and number of simulations are unchanged. CI cost rises only by one input column, two output variables and one test function over the same simulations.
Population impact
Two full microsimulation runs, base and PR, compared record by record:
populace_us_2024.h5@populace-us-2024-spm-20260909(79,729 tax-unit records).mainat the merge-base 12ea587.net_investment_incomenet_investment_income_taxincome_taxhousehold_net_incomestate_income_taxmn_niitNIIT. 79 records change, representing 119,000 weighted tax units:
The estimate rests on those 79 records, so it is noisy.
Farm rent (an earlier pair at 32b77d3). Filers' Form 4835 income adds $8.32bn to NII and their losses subtract $4.06bn. NIIT rises by $145,092,554 on its own.
The §461(l) limit adds very little:
excess_business_lossis $26.9bn on 144 records (286,000 weighted tax units);States. One record moves, by $12.37.
Minnesota. No Minnesota record crosses $1,000,000 either way.
Later commits. 251b87f and 215bfa5 change only tests and the code H rule. The dataset's 318 person columns include no
estate_income_net_investment_income_adjustment, so it is 0 for every record and these figures hold at the current head.Run outputs:
~/reviews/niit-farm-rent-2026-10/impact/(compare.2026.json, andcompare.2026.r1.jsonfor the farm-rent-only pair).Verification (local, macOS, Python 3.13, policyengine-core 3.32.20; head 251b87f, rerun at 215bfa5 below)
excess_business_loss.yaml,net_investment_income_excess_business_loss.yamlandnet_investment_income_tax.yaml. 42 passed.loss_ald.yaml,dependent_losses.yaml,loss_thresholds.yaml,dependent_net_investment_income.yaml,estate_net_investment_income.yaml,mn_niit.yaml,policybench_ira.yamlandniit_magi.yaml. 86 passed.farm_rent_income, in batches of 8: 418 passed.test_dependent_net_investment_income_invariants.py,test_loss_ald_extraction_parity.py,test_dependent_losses_agi_invariants.pyandtest_az_property_tax_credit_income.py: 36 passed.test_estate_income_invariants.py: 22 passed. Its two cap-binding edge rows now expect the §461(l) add-back; CI caught this at 1def0db.excess_business_loss.yaml,net_investment_income_excess_business_loss.yaml,net_investment_income_tax.yaml,estate_net_investment_income.yaml,niit_magi.yaml): 58 passed.test_estate_income_invariants.pyandtest_dependent_net_investment_income_invariants.py: 36 passed.test_no_group_variables_in_person_adds.py::test_known_violations_only_shrinkon the Illinois AABD entry. That failure comes frommain(Count only a person's own withholding in the Illinois AABD expense exemption #9902 fixed the edge after Guard against person variables that add group variables (every member gets the whole group amount) #9897 listed it), and Drop the fixed Illinois AABD entry from the person-adds ratchet #10092 removes the entry.axiom: TheAxiomFoundation/rulespec-us#1643 queued
🤖 Generated with Claude Code