NM Child Income Tax Credit: $75,001 bracket start gives $212 instead of $106
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
The bug is in the bracket table in policyengine_us/parameters/gov/states/nm/tax/income/credits/ctc/amount.yaml, where the fourth bracket starts at 75_001 while the others start at round numbers. The reproduction script in the issue shows nm_ctc returning 212 at AGI 75,001, where the official table gives 106. Change the start to 75_000 and confirm the three $75,001 cases in the issue's table, then run the nm_ctc YAML tests to check the other brackets still hold. Done when the official values match at every bracket endpoint.
Written by the indexing model from the issue text.
Description
Problem
For AGI exactly $75,001, nm_ctc returns the $50,000–$75,000 amount instead of the next bracket.
The 2025 New Mexico Child Income Tax Credit table (https://www.tax.newmexico.gov/new-mexico-child-tax-credit/, and PIT-RC Table 4 in the 2025 PIT packet already cited in the parameter) gives $212 per child for AGI over $50,000 through $75,000 and $106 per child over $75,000 through $100,000.
PolicyEngine-US 2.38.9, 2025:
| Case | Official | nm_ctc |
|---|---|---|
| Single, AGI $75,000, one child | $212 | $212 |
| Single, AGI $75,001, one child | $106 | $212 |
| Joint, AGI $75,001, one child | $106 | $212 |
| Single, AGI $75,001, two children | $212 | $424 |
| Single, AGI $75,002, one child | $106 | $106 |
A 45-case panel (every bracket endpoint and adjacent value, single and joint, two children, age, dependency, TIN, no-child and negative-AGI controls) fails only at these three $75,001 cases, on 2.2.1 and 2.30.3 as well.
Cause and possible fix
nm_ctc uses p.amount.calc(agi, right=True) (upper-inclusive), which is right for the table. But in policyengine_us/parameters/gov/states/nm/tax/income/credits/ctc/amount.yaml the fourth bracket starts at 75_001 while the others start at the round number (25_000, 50_000, 100_000, ...). Changing 75_001 to 75_000 makes all 45 cases in that panel match.
Reproduce
from policyengine_us import Simulation
Y = 2025
sim = Simulation(situation={
"people": {"p": {"age": {Y: 35}}, "c": {"age": {Y: 5}, "is_tax_unit_dependent": {Y: True}}},
"tax_units": {"t": {"members": ["p", "c"], "filing_status": {Y: "SINGLE"}, "adjusted_gross_income": {Y: 75_001}}},
"households": {"h": {"members": ["p", "c"], "state_code": {Y: "NM"}}},
"families": {"f": {"members": ["p", "c"]}}, "spm_units": {"s": {"members": ["p", "c"]}},
"marital_units": {"m": {"members": ["p"]}},
})
print(sim.calculate("nm_ctc", Y)) # 212, official table gives 106
- Dominant language
- Python
- Stars
- 166
- Forks
- 214
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 273
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PolicyEngine/policyengine-us
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PolicyEngine/policyengine-us#10072 ·
Maintainers usually reply within 2 days
-
bug state-income-tax states/vt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PolicyEngine/policyengine-us#9996 ·
Maintainers usually reply within 2 days
-
bug hhs/tanf states/nh
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PolicyEngine/policyengine-us#9984 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PolicyEngine/policyengine-us#9952 ·
Maintainers usually reply within 2 days
-
State EITC helper floors each spouse's earnings at zero instead of netting self-employment losses (IL, CO, DC, IN)Possibly taken @PavelMakarchuk claimed this 6 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
PolicyEngine/policyengine-us#9819 ·
Maintainers usually reply within 2 days
All issues in PolicyEngine/policyengine-us
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
GAM-team/got-your-back#547 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
UKGovernmentBEIS/inspect_ai#5821 ·
Maintainers usually reply within 1 day
-
docs help wanted
Difficulty 1/5 1-3 hours Newbie friendliness 75/100
-
evidence wanted good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-coder-ai/agentseam#195 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day