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
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,9 @@
description: New Brunswick provides tuition credit amount for filers above this age.
YiweiJ marked this conversation as resolved.
Show resolved Hide resolved
values:
2022-01-01: 16
metadata:
unit: year
label: New Brunswick tuition credit age eligibility
reference:
- 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
YiweiJ marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
description: New Brunswick phases taxable income out for tuition amount at this rate, based on taxable income.
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 taxable income phase out rate
YiweiJ marked this conversation as resolved.
Show resolved Hide resolved
reference:
- 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 phases tuition credit amount for tax on taxable income at this rate.
YiweiJ marked this conversation as resolved.
Show resolved Hide resolved
values:
2022-01-01: 0.094
metadata:
unit: currency-CAD
label: New Brunswick tax on taxable income rate
YiweiJ marked this conversation as resolved.
Show resolved Hide resolved
reference:
- 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
# The tuition credit amount is not mentioned in the NB income tax act
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: New Brunswick provides tuition credit amount for tuition expense above this amount.
YiweiJ marked this conversation as resolved.
Show resolved Hide resolved
values:
2022-01-01: 100
metadata:
unit: currency-CAD
period: year
label: New Brunswick tuition threshold
YiweiJ marked this conversation as resolved.
Show resolved Hide resolved
reference:
- 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)
tax_on_taxable_income = p.income_threshold.calc(taxable_income)
YiweiJ marked this conversation as resolved.
Show resolved Hide resolved
reduced_tax_on_taxable_income = max_(
(tax_on_taxable_income / p.rate) - tuition_income,
0,
)
return select(
[
taxable_income <= p.income_threshold.thresholds[1],
taxable_income > p.income_threshold.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)