Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Brunswick Tuition and Education Amount #445

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
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:
- New Brunswick tuition and education amount.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: New Brunswick qualifies filers for the tuition credit above this age.
values:
2022-01-01: 16
metadata:
unit: year
label: New Brunswick tuition credit age eligibility
reference:
# The credit is not mentioned in the New Brunswick income tax act
- title: Students and income tax
YiweiJ marked this conversation as resolved.
Show resolved Hide resolved
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pub/p105/p105-22e.pdf#page=11
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
description: New Brunswick phases taxable income out for tuition amount at this rate, based on taxable income.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PavelMakarchuk Hi Pavel, I got a question here. I double checked the form, the following brackets is used to calculate the tax on taxable income, shall we use "phase out" here? Since "phase out" is about with income increases and then credits decrease, this part doesn't directly relate to the credit, it's one step of the calculation.

brackets:
- threshold:
2022-01-01: 0
rate:
2022-01-01: 0.094
- threshold:
2022-01-01: 44_887
rate:
2022-01-01: 0.1482
- threshold:
2022-01-01: 89_775
rate:
2022-01-01: 0.1652
- threshold:
2022-01-01: 145_955
rate:
2022-01-01: 0.1784
- threshold:
2022-01-01: 166_280
rate:
2022-01-01: 0.203

metadata:
type: marginal_rate
threshold_unit: currency-CAD
rate_unit: /1
label: New Brunswick tuition credit phase out rate
reference:
# The credit is not mentioned in the New Brunswick income tax act
- title: New Brunswick tuition and education amounts
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5004-s11/5004-s11-22e.pdf#page=1
- title: New Brunswick tax and credits
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5004-c/5004-c-22e.pdf#page=1
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: New Brunswick divides the phased out taxable income by this rate to calculate the tuition credit.
values:
2022-01-01: 0.094
metadata:
unit: currency-CAD
label: New Brunswick phased out taxable income rate
reference:
# The tuition credit amount is not mentioned in the NB income tax act
- title: New Brunswick tuition and education amounts
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5004-s11/5004-s11-22e.pdf#page=1
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: New Brunswick qualifies filers for the tuition tax credit with income above this rate.
values:
2022-01-01: 100
metadata:
unit: currency-CAD
period: year
label: New Brunswick tuition credit tuition threshold
reference:
# The tuition credit amount is not mentioned in the NB income tax act
- title: 2023 New Brunswick Personal Tax Credits Return
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1nb/td1nb-23e.pdf#page=1
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
- name: Lowest tax on taxable income threshold
period: 2023
absolute_error_margin: 0.01
input:
nb_taxable_income: 44_887
nb_tuition_credit_amount_income: 20_000
tuition_expenses: 10_000
output:
nb_tuition_credit: 10_000

- name: Second tax on taxable income threshold
period: 2023
absolute_error_margin: 0.01
input:
nb_taxable_income: 54_887
nb_tuition_credit_amount_income: 20_000
tuition_expenses: 10_000
output:
nb_tuition_credit: 10_000

- name: Third tax on taxable income threshold
period: 2023
absolute_error_margin: 0.01
input:
nb_taxable_income: 139_775
nb_tuition_credit_amount_income: 20_000
tuition_expenses: 50_000
output:
nb_tuition_credit: 50_000

- name: Fourth tax on taxable income threshold
period: 2023
absolute_error_margin: 0.01
input:
nb_taxable_income: 145_965
nb_tuition_credit_amount_income: 100_000
tuition_expenses: 150_000
output:
nb_tuition_credit: 114_409.57

- name: Highest tax on taxable income threshold
period: 2023
absolute_error_margin: 0.01
input:
nb_taxable_income: 167_280
nb_tuition_credit_amount_income: 100_000
tuition_expenses: 160_000
output:
nb_tuition_credit: 155_124.42
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
- name: Age eligible and tuition ineligible
period: 2023
input:
province_code: NB
age: 17
tuition_expenses: 50
output:
nb_tuition_credit_eligibility: false

- name: Age eligible and tuition eligible
period: 2023
input:
province_code: NB
age: 16
tuition_expenses: 101
output:
nb_tuition_credit_eligibility: true

- name: Age ineligible and tuition eligible
period: 2023
input:
province_code: NB
age: 10
tuition_expenses: 200
output:
nb_tuition_credit_eligibility: false

- name: Age ineligible and tuition ineligible
period: 2023
input:
province_code: NB
age: 10
tuition_expenses: 30
output:
nb_tuition_credit_eligibility: false
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can use nb_income_tax_before_credits for the line 8 amount which then is divided by 9.4%

Need to include the case that if under 44,... we include the total taxable income

Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
from policyengine_canada.model_api import *


class nb_tuition_credit(Variable):
value_type = float
entity = Person
label = "New Brunswick tuition credit"
definition_period = YEAR
defined_for: "nb_tuition_credit_eligibility"
reference = (
"https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5004-s11/5004-s11-22e.pdf#page=1", # Line 10
"https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5004-c/5004-c-22e.pdf#page=1", # Line 8
)

def formula(person, period, parameters):
age = person("age", period)
tuition = person("tuition_expenses", period) # line 2
taxable_income = person("nb_taxable_income", period) # line 4
tuition_income = person(
"nb_tuition_credit_amount_income", period
) # line 5
p = parameters(
period
).gov.provinces.nb.tax.income.credits.tuition_amount
reduced_taxable_income = max_(taxable_income - tuition_income, 0)
phased_out_income = p.phase_out_rate.calc(taxable_income)
reduced_tax_on_taxable_income = max_(
(phased_out_income / p.rate) - tuition_income,
0,
)
return select(
[
taxable_income <= p.phase_out_rate.thresholds[1],
taxable_income > p.phase_out_rate.thresholds[1],
],
[
min_(reduced_taxable_income, tuition),
min_(reduced_tax_on_taxable_income, tuition),
],
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from policyengine_canada.model_api import *


class nb_tuition_credit_amount_income(Variable):
value_type = float
entity = Person
label = "New Brunswick income pre tax income for tuition credit amount"
unit = CAD
definition_period = YEAR
reference = (
"https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5004-c/5004-c-22e.pdf#page=2", # Line 31
"https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5004-s11/5004-s11-22e.pdf#page=1", # Line 5
)
defined_for = ProvinceCode.NB
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from policyengine_canada.model_api import *


class nb_tuition_credit_eligibility(Variable):
value_type = bool
entity = Person
label = "Eligible for the New Brunswick tuition credit"
definition_period = YEAR
reference = (
"https://www.canada.ca/content/dam/cra-arc/formspubs/pub/p105/p105-22e.pdf#page=11", # Tuition Amount
"https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1nb/td1nb-23e.pdf#page=1", # Line 4
)
defined_for = ProvinceCode.NB

def formula(person, period, parameters):
p = parameters(
period
).gov.provinces.nb.tax.income.credits.tuition_amount
age = person("age", period)
tuition = person("tuition_expenses", period)
return (age >= p.eligible_age) & (tuition >= p.tuition_threshold)