diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29bb2d..2e74a198911 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: minor + changes: + added: + - South Carolina tuition tax credit. diff --git a/policyengine_us/parameters/gov/states/sc/tax/income/credits/college_tuition/cap.yaml b/policyengine_us/parameters/gov/states/sc/tax/income/credits/college_tuition/cap.yaml new file mode 100644 index 00000000000..96c31387611 --- /dev/null +++ b/policyengine_us/parameters/gov/states/sc/tax/income/credits/college_tuition/cap.yaml @@ -0,0 +1,15 @@ +description: South Carolina limits the tuition tax credit to this amount. +values: + 2021-01-01: 1_500 + +metadata: + unit: currency-USD + period: year + label: South Carolina tuition tax credit max credit amount + reference: + - title: SC I-319 2021 + href: https://dor.sc.gov/forms-site/Forms/I319_2021.pdf#page=3 + - title: South Carolina Legal Code | Section 12-6-3385 (A)(1)(a) + href: https://www.scstatehouse.gov/code/t12c006.php + - title: SC I-319 2022 + href: https://dor.sc.gov/forms-site/Forms/I319_2022.pdf#page=3 diff --git a/policyengine_us/parameters/gov/states/sc/tax/income/credits/college_tuition/rate.yaml b/policyengine_us/parameters/gov/states/sc/tax/income/credits/college_tuition/rate.yaml new file mode 100644 index 00000000000..1543ab7b96b --- /dev/null +++ b/policyengine_us/parameters/gov/states/sc/tax/income/credits/college_tuition/rate.yaml @@ -0,0 +1,26 @@ +description: South Carolina tuition credit thresholds and rates. + +brackets: + - threshold: + 2021-01-01: 0 + rate: + 2021-01-01: 0.5 + - threshold: + 2006-01-01: 12_268 + rate: + 2006-01-01: 0 + +metadata: + type: marginal_rate + threshold_unit: currency-USD + rate_unit: /1 + period: year + label: South Carolina tuition credit rate match + reference: + - title: South Carolina Legal Code | Section 12-6-3385 (A)(1)(a) + href: https://www.scstatehouse.gov/code/t12c006.php + - title: SC I-319 2021 + href: https://dor.sc.gov/forms-site/Forms/I319_2021.pdf#page=3 + - title: SC I-319 2022 + href: https://dor.sc.gov/forms-site/Forms/I319_2022.pdf#page=3 + # The value 12,268 is not in Legal code but in tax forms. diff --git a/policyengine_us/parameters/gov/states/sc/tax/income/credits/college_tuition/semester_hour_requirement.yaml b/policyengine_us/parameters/gov/states/sc/tax/income/credits/college_tuition/semester_hour_requirement.yaml new file mode 100644 index 00000000000..4924014f7fb --- /dev/null +++ b/policyengine_us/parameters/gov/states/sc/tax/income/credits/college_tuition/semester_hour_requirement.yaml @@ -0,0 +1,25 @@ +description: South Carolina requires these semester credit hours to qualify for the tuition tax credit. + +brackets: + - threshold: + 2021-01-01: 1 + amount: + 2021-01-01: 15 + - threshold: + 2021-01-01: 2 + amount: + 2021-01-01: 30 + +metadata: + threshold_unit: year + type: single_amount + label: South Carolina tuition tax credit semester credit hour requirement + reference: + - title: SC I-319 2021 + href: https://dor.sc.gov/forms-site/Forms/I319_2021.pdf#page=3 + - title: South Carolina Legal Code | SECTION 12-6-3385 (B)(3)(b) + href: https://www.scstatehouse.gov/code/t12c006.php + # Legal code requires 30 annual credit hours, tax form indicates that if a student only attends one semester and completes 15 credit hours, + # then the student is also eligible. + - title: SC I-319 2022 + href: https://dor.sc.gov/forms-site/Forms/I319_2022.pdf#page=2 diff --git a/policyengine_us/tests/policy/baseline/gov/states/sc/tax/income/credits/college_tuition/sc_tuition_credit.yaml b/policyengine_us/tests/policy/baseline/gov/states/sc/tax/income/credits/college_tuition/sc_tuition_credit.yaml new file mode 100644 index 00000000000..2cf1b3463b4 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/sc/tax/income/credits/college_tuition/sc_tuition_credit.yaml @@ -0,0 +1,68 @@ +- name: $6k tuition, 15 semester hours + period: 2022 + input: + state_code: SC + sc_total_college_hours: 15 + total_college_hours: 15 + qualified_tuition_expenses: 6_000 + college_semesters_attended: 1 + output: + sc_tuition_credit: 1_500 + #12,268*15/30 = 6134, 6,000* 0.5 = 3,000 + +- name: $2k tuition, 12 semester hours + period: 2022 + input: + state_code: SC + total_college_hours: 12 + qualified_tuition_expenses: 2_000 + college_semesters_attended: 1 + output: + sc_tuition_credit: 0 + # not eligible + +- name: $15k tuition, 30 semester hours + period: 2022 + input: + state_code: SC + sc_total_college_hours: 30 + total_college_hours: 30 + qualified_tuition_expenses: 15_000 + college_semesters_attended: 1 + output: + sc_tuition_credit: 1_500 + # 12,268*30/30 = 12,268 12,268*0.5 = 6,134 + +- name: $2.5k tuition, 15 semester hours + period: 2022 + input: + state_code: SC + sc_total_college_hours: 15 + total_college_hours: 15 + qualified_tuition_expenses: 2_500 + college_semesters_attended: 1 + output: + sc_tuition_credit: 1_250 + +- name: $0, 0 semester. + period: 2022 + input: + state_code: SC + sc_total_college_hours: 0 + total_college_hours: 0 + qualified_tuition_expenses: 0 + college_semesters_attended: 0 + output: + sc_tuition_credit: 0 + +- name: $15k tuition, 29 semester hours + period: 2022 + input: + state_code: SC + sc_total_college_hours: 29 + total_college_hours: 29 + qualified_tuition_expenses: 15_000 + college_semesters_attended: 2 + output: + sc_tuition_credit: 0 + # not eligible diff --git a/policyengine_us/tests/policy/baseline/gov/states/sc/tax/income/credits/college_tuition/sc_tuition_credit_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/sc/tax/income/credits/college_tuition/sc_tuition_credit_eligible.yaml new file mode 100644 index 00000000000..d4b28393795 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/sc/tax/income/credits/college_tuition/sc_tuition_credit_eligible.yaml @@ -0,0 +1,44 @@ +- name: Case 1, 1 semester, 15 credits. + period: 2022 + input: + state_code: SC + sc_total_college_hours: 15 + college_semesters_attended: 1 + output: + sc_tuition_credit_eligible: true + +- name: Case 2, 2 semesters, 30 credits. + period: 2022 + input: + state_code: SC + sc_total_college_hours: 30 + college_semesters_attended: 2 + output: + sc_tuition_credit_eligible: true + +- name: Case 3, 1 semester, 14 credits. + period: 2022 + input: + state_code: SC + sc_total_college_hours: 14 + college_semesters_attended: 1 + output: + sc_tuition_credit_eligible: false + +- name: Case 4, 2 semesters, 29 credits. + period: 2022 + input: + state_code: SC + sc_total_college_hours: 29 + college_semesters_attended: 2 + output: + sc_tuition_credit_eligible: 0 + +- name: Case 5, 0 semester, 0 credits. + period: 2022 + input: + state_code: SC + sc_total_college_hours: 0 + college_semesters_attended: 0 + output: + sc_tuition_credit_eligible: false diff --git a/policyengine_us/variables/gov/states/sc/tax/income/credits/college_tuition/sc_total_college_hours.py b/policyengine_us/variables/gov/states/sc/tax/income/credits/college_tuition/sc_total_college_hours.py new file mode 100644 index 00000000000..6f099092ff6 --- /dev/null +++ b/policyengine_us/variables/gov/states/sc/tax/income/credits/college_tuition/sc_total_college_hours.py @@ -0,0 +1,9 @@ +from policyengine_us.model_api import * + + +class sc_total_college_hours(Variable): + value_type = float + entity = Person + label = "South Carolina's total annual hours of college attended" # excluding summer and interim + unit = "hour" + definition_period = YEAR diff --git a/policyengine_us/variables/gov/states/sc/tax/income/credits/college_tuition/sc_tuition_credit.py b/policyengine_us/variables/gov/states/sc/tax/income/credits/college_tuition/sc_tuition_credit.py index d43d33a7f12..4755a6e2da3 100644 --- a/policyengine_us/variables/gov/states/sc/tax/income/credits/college_tuition/sc_tuition_credit.py +++ b/policyengine_us/variables/gov/states/sc/tax/income/credits/college_tuition/sc_tuition_credit.py @@ -13,3 +13,29 @@ class sc_tuition_credit(Variable): "https://www.scstatehouse.gov/code/t12c006.php", # South Carolina Legal Code | SECTION 12-6-3385 (A) ) + + def formula(person, period, parameters): + p = parameters(period).gov.states.sc.tax.income.credits.college_tuition + + # line 1 + total_college_hours = person("total_college_hours", period) + # line 2 + qualified_tuition_expenses = person( + "qualified_tuition_expenses", period + ) + # line 3,4,7 + tuition_max_amount = p.rate.thresholds[1] + qualified_tuition_expenses_credit = p.rate.calc( + qualified_tuition_expenses + ) + max_hour = p.semester_hour_requirement.calc(total_college_hours) + tuition_limit_credit = p.rate.calc( + tuition_max_amount * total_college_hours / (max_hour) + ) + + uncapped_credit = min_( + qualified_tuition_expenses_credit, tuition_limit_credit + ) + + # compare line 7 with credit max amount, take lesser amount + return min_(uncapped_credit, p.cap) diff --git a/policyengine_us/variables/gov/states/sc/tax/income/credits/college_tuition/sc_tuition_credit_eligible.py b/policyengine_us/variables/gov/states/sc/tax/income/credits/college_tuition/sc_tuition_credit_eligible.py index 3f025b0ef71..d7f829536ef 100644 --- a/policyengine_us/variables/gov/states/sc/tax/income/credits/college_tuition/sc_tuition_credit_eligible.py +++ b/policyengine_us/variables/gov/states/sc/tax/income/credits/college_tuition/sc_tuition_credit_eligible.py @@ -11,3 +11,11 @@ class sc_tuition_credit_eligible(Variable): "https://www.scstatehouse.gov/code/t12c006.php", # South Carolina Legal Code | SECTION 12-6-3385 (B)(3)(b) ) + + def formula(person, period, parameters): + p = parameters(period).gov.states.sc.tax.income.credits.college_tuition + sc_total_college_hours = person("sc_total_college_hours", period) + semesters_attended = person("college_semesters_attended", period) + required_hours = p.semester_hour_requirement.calc(semesters_attended) + meets_hours_requirement = sc_total_college_hours >= required_hours + return (semesters_attended > 0) & meets_hours_requirement diff --git a/policyengine_us/variables/household/demographic/person/college_semesters_attended.py b/policyengine_us/variables/household/demographic/person/college_semesters_attended.py new file mode 100644 index 00000000000..ddb99889d02 --- /dev/null +++ b/policyengine_us/variables/household/demographic/person/college_semesters_attended.py @@ -0,0 +1,9 @@ +from policyengine_us.model_api import * + + +class college_semesters_attended(Variable): + value_type = int + entity = Person + label = "College semesters attended" + unit = "semesters attended" + definition_period = YEAR diff --git a/policyengine_us/variables/household/demographic/person/total_college_hours.py b/policyengine_us/variables/household/demographic/person/total_college_hours.py new file mode 100644 index 00000000000..fde8176f424 --- /dev/null +++ b/policyengine_us/variables/household/demographic/person/total_college_hours.py @@ -0,0 +1,9 @@ +from policyengine_us.model_api import * + + +class total_college_hours(Variable): + value_type = float + entity = Person + label = "Total annual hours of college attended" + unit = "hour" + definition_period = YEAR