CCB: shared custody halves the base before the income reduction, not after
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
Research direction
Read child_benefit_base_person.py and child_benefit.py to trace where the shared-custody divisor is applied relative to the reduction. Add a regression test using the one-child, age-4, income-50,000 example, then run the relevant child benefit tests. Done means the shared-custody amount is 3,560.545 per year and the no-reduction controls still match.
Written by the indexing model from the issue text.
Description
Summary
For a shared-custody parent, child_benefit takes half of the base amount and then subtracts the full income reduction. ITA 122.61(1.1) works the other way: it calculates the full benefit (base minus reduction) and then takes half of it. Above the first income threshold, the model pays shared-custody parents too little.
Where in the code
child_benefit_base_person.pydivides the base byp.divisorwhenfull_custodyis false.child_benefit.pythen returnsmax_(0, base - reduction), with the fullchild_benefit_reduction.
So the model computes B/2 − R. The Act gives (B − R)/2.
Example (benefit year July 2025 – June 2026, base tax year 2024)
One child aged 4, shared custody, adjusted family net income 50,000 CAD.
- Base B = 7,997
- Reduction R = (50,000 − 37,487) × 7% = 875.91
- Expected (ITA 122.61(1.1)): (7,997 − 875.91) / 2 = 3,560.545 per year
- PolicyEngine Canada 0.99.1: 3,122.59 per year
- Difference: −437.95 per year (about −36.50 per month)
The CRA Child and Family Benefits Calculator, run on 21 October 2026 with the same facts, shows 296.71 CAD per month for the CCB. PolicyEngine annual / 12 is 260.22.
Controls
- Full custody, same income: PolicyEngine 7,121.09 — matches the Act.
- Shared custody at income 30,000 and 37,487 (no reduction): 3,998.50 — matches.
- Shared custody at 37,488: 3,998.465 expected, 3,998.43 from the model — the gap starts as soon as the reduction starts.
- Property check: for one child, shared custody should give exactly half of full custody. At 50,000 the model gives 3,122.59, while half of its own full-custody result is 3,560.54.
Suggested fix
Apply the custody share after the reduction. For example, compute the base and reduction per child at the full rate, take max_(0, base − reduction), and only then apply the shared-custody divisor. A test with the example above (expected 3,560.545) would catch a regression.
How this was checked
We ran the unmodified PolicyEngine Canada 0.99.1 wheel from PyPI (SHA-256 2941641ef6e1c7e428f4717d194ac7e27332dc6e3423ce1936f9c379d0fcb79d, same code as master 029687260d) in a clean environment and compared it with an independent model of ITA 122.6 and 122.61. The CRA calculator run is saved with its request and response. We are happy to share the inputs and the scripts.
This is separate from #557: that issue is about updating parameters to 2026–27. This bug is in the formula and shows up with the current 2025–26 parameters.
Found with Arxo (arxo.io) during a review of open benefit models against the statute.
- Dominant language
- Python
- Stars
- 18
- Forks
- 35
- Avg merge
- 5h 36m
- Merged PRs (30d)
- 1
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-canada
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 3/5 1-2 days Newbie friendliness 61/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 45/100
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 42/100
All issues in PolicyEngine/policyengine-canada
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
[oblt-aw][autodoc] Document obs-aw-automerge contract and fix automerge doc inconsistenciesPossibly taken @github-actions claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
admission-deferred priority: medium status: ready work-class: scoped
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
melodic-software/claude-code-plugins#10887 · 4 comments ·
Maintainers usually reply within 1 day
-
backend bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
PoCInnovation/Distribox#255 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
google/langextract#598 ·
Maintainers usually reply within 1 day