Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

NM Child Income Tax Credit: $75,001 bracket start gives $212 instead of $106

Open Beginner friendly
#10,073 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend

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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PolicyEngine/policyengine-us

All issues in PolicyEngine/policyengine-us

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.