Skip to content

Commit

Permalink
Merge pull request #289 from zqw5219/zqw5219/issue288
Browse files Browse the repository at this point in the history
Northwest Territories Age Credit
  • Loading branch information
PavelMakarchuk authored Aug 24, 2023
2 parents 43c099a + 1fa2fb5 commit bbd43c6
Show file tree
Hide file tree
Showing 8 changed files with 169 additions and 0 deletions.
4 changes: 4 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- bump: minor
changes:
added:
- Northwest Territories Age Credit.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
description: Northwest Territories provides the age credit to filers at or above this age threshold.

values:
2022-01-01: 65
metadata:
unit: year
label: Northwest Territories age credit age eligibility
reference:
- title: Income Tax Act - Section 2.2 Age Credit
href: https://www.justice.gov.nt.ca/en/files/legislation/income-tax/income-tax.a.pdf#page=31
- title: 2022 Worksheet NT428 - line 58080
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5012-d/5012-d-22e.pdf#page=1
- title: 2023 Personal Tax Credits Return - line 2 Age amount
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1nt-ws/td1nt-ws-23e.pdf#page=1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
description: Northwest Territories provides this maximum amount under the age credit.
values:
# Amount increases with inflation every year
2022-01-01: 7_635
2023-01-01: 8_116
metadata:
unit: currency-CAD
label: Northwest Territories age credit maximum amount
reference:
- title: Income Tax Act - Section 2.2 Age Credit
href: https://www.justice.gov.nt.ca/en/files/legislation/income-tax/income-tax.a.pdf#page=31
- title: 2022 Worksheet NT428 - line 58080
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5012-d/5012-d-22e.pdf#page=1
- title: 2023 Personal Tax Credits Return - line 2 Age amount
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1nt-ws/td1nt-ws-23e.pdf#page=1
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
description: Northwest Territories phases the age credit out at this rate based on the filer's income.
brackets:
- threshold:
2022-01-01: 0
rate:
2022-01-01: 0
- threshold:
2022-01-01: 39_826
2023-01-01: 42_335
rate:
2022-01-01: 0.15
metadata:
type: marginal_rate
threshold_unit: currency-CAD
rate_unit: /1
label: Northwest Territories Age Credit phase out rate
reference:
- title: Income Tax Act - Section 2.2 Age Credit
href: https://www.justice.gov.nt.ca/en/files/legislation/income-tax/income-tax.a.pdf#page=31
- title: 2022 Worksheet NT428 - line 58080
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5012-d/5012-d-22e.pdf#page=1
- title: 2023 Personal Tax Credits Return - line 2 Age amount
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1nt-ws/td1nt-ws-23e.pdf#page=1
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
- name: Under taxable income 2022
period: 2022
input:
province_code: NT
nt_age_credit_eligible: true
nt_taxable_income: 39_825
output:
nt_age_credit: 7_635

- name: Calculation 2022 # 7,635 - ((40,100 - 39,826) * 0.15)
period: 2022
input:
province_code: NT
nt_age_credit_eligible: true
nt_taxable_income: 40_100
output:
nt_age_credit: 7_593.9

- name: Under taxable income 2023
period: 2023
input:
province_code: NT
nt_age_credit_eligible: true
nt_taxable_income: 42_334
output:
nt_age_credit: 8_116

- name: Calculation 2023 # 8_116 - ((45_000 - 42_335) * 0.15)
period: 2023
input:
province_code: NT
nt_age_credit_eligible: true
nt_taxable_income: 45_000
output:
nt_age_credit: 7_716.25
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
- name: Under age amount 2022
period: 2022
input:
province_code: NT
age: 64
output:
nt_age_credit_eligible: false

- name: 65 years old 2022
period: 2022
input:
province_code: NT
age: 65
output:
nt_age_credit_eligible: true

- name: Above age amount 2022
period: 2022
input:
province_code: NT
age: 66
output:
nt_age_credit_eligible: true

- name: Under age amount 2023
period: 2023
input:
province_code: NT
age: 64
output:
nt_age_credit_eligible: false

- name: 65 years old 2022
period: 2022
input:
province_code: NT
age: 65
output:
nt_age_credit_eligible: true

- name: Above age amount 2023
period: 2023
input:
province_code: NT
age: 66
output:
nt_age_credit_eligible: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from policyengine_canada.model_api import *


class nt_age_credit(Variable):
value_type = float
entity = Person
label = "Northwest Territories age credit"
unit = CAD
definition_period = YEAR
defined_for = "nt_age_credit_eligible"
reference = "https://www.justice.gov.nt.ca/en/files/legislation/income-tax/income-tax.a.pdf#page=31"

def formula(person, period, parameters):
p = parameters(period).gov.provinces.nt.tax.income.credits.age_credit
income = person("nt_taxable_income", period)
return max_(p.max_amount - p.reduction.calc(income), 0)
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from policyengine_canada.model_api import *


class nt_age_credit_eligible(Variable):
value_type = bool
entity = Person
label = "Northwest Territories age credit eligibility"
definition_period = YEAR
defined_for = ProvinceCode.NT
reference = "https://www.justice.gov.nt.ca/en/files/legislation/income-tax/income-tax.a.pdf#page=31"

def formula(person, period, parameters):
p = parameters(period).gov.provinces.nt.tax.income.credits.age_credit
age = person("age", period)
return age >= p.age_eligibility

0 comments on commit bbd43c6

Please sign in to comment.