Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions changelog.d/ks-itemized-deductions-closed-list.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Limit Kansas itemized deductions to charitable contributions, medical care, qualified residence interest and property taxes at the K.S.A. 79-32,120(a) shares for each year, and require federal itemizing before 2021.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
description: Kansas allows the Kansas itemized deduction only to filers who itemize on their federal return, if this is true.
values:
2015-01-01: true
2021-01-01: false
metadata:
unit: bool
period: year
label: Kansas itemized deduction requires federal itemization
reference:
- title: K.S.A. 79-32,120(a)(1)
href: https://www.ksrevisor.gov/statutes/chapters/ch79/079_032_0120.html
- title: 2018 Form K-40 instructions, itemized deductions
href: https://www.ksrevenue.gov/pdf/ip18.pdf#page=2
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
description: Kansas allows this share of charitable contributions deductible under section 170 of the Internal Revenue Code as an itemized deduction.
values:
2015-01-01: 1
metadata:
unit: /1
period: year
label: Kansas itemized deduction share of charitable contributions
reference:
- title: K.S.A. 79-32,120(a)
href: https://www.ksrevisor.gov/statutes/chapters/ch79/079_032_0120.html
- title: 2017 Form K-40 instructions, Schedule S Part C, line C4
href: https://www.ksrevenue.gov/pdf/ip17.pdf#page=14
- title: 2025 Form K-40 instructions, Kansas Schedule A, lines 10 to 13
href: https://www.ksrevenue.gov/pdf/ip25.pdf#page=15
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
description: Kansas allows this share of medical expenses deductible under section 213 of the Internal Revenue Code as an itemized deduction.
values:
2015-01-01: 0
2018-01-01: 0.5
2019-01-01: 0.75
2020-01-01: 1
metadata:
unit: /1
period: year
label: Kansas itemized deduction share of medical expenses
reference:
- title: K.S.A. 79-32,120(a)
href: https://www.ksrevisor.gov/statutes/chapters/ch79/079_032_0120.html
- title: 2018 Form K-40 instructions, itemized deductions
href: https://www.ksrevenue.gov/pdf/ip18.pdf#page=2
- title: 2019 Form K-40 instructions, itemized deductions
href: https://www.ksrevenue.gov/pdf/ip19.pdf#page=2
- title: 2025 Form K-40 instructions, Kansas Schedule A, lines 1 to 4
href: https://www.ksrevenue.gov/pdf/ip25.pdf#page=14
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
description: Kansas allows this share of taxes on real and personal property under section 164(a) of the Internal Revenue Code as an itemized deduction.
values:
2015-01-01: 0.5
2019-01-01: 0.75
2020-01-01: 1
metadata:
unit: /1
period: year
label: Kansas itemized deduction share of real and personal property taxes
reference:
- title: K.S.A. 79-32,120(a)
href: https://www.ksrevisor.gov/statutes/chapters/ch79/079_032_0120.html
- title: 2017 Form K-40 instructions, Schedule S Part C, lines C1 and C2
href: https://www.ksrevenue.gov/pdf/ip17.pdf#page=14
- title: 2018 Form K-40 instructions, itemized deductions
href: https://www.ksrevenue.gov/pdf/ip18.pdf#page=2
- title: 2019 Form K-40 instructions, itemized deductions
href: https://www.ksrevenue.gov/pdf/ip19.pdf#page=2
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
description: Kansas allows this share of qualified residence interest under section 163(h) of the Internal Revenue Code as an itemized deduction.
values:
2015-01-01: 0.5
2019-01-01: 0.75
2020-01-01: 1
metadata:
unit: /1
period: year
label: Kansas itemized deduction share of qualified residence interest
reference:
- title: K.S.A. 79-32,120(a)
href: https://www.ksrevisor.gov/statutes/chapters/ch79/079_032_0120.html
- title: 2017 Form K-40 instructions, Schedule S Part C, line C3
href: https://www.ksrevenue.gov/pdf/ip17.pdf#page=14
- title: 2018 Form K-40 instructions, itemized deductions
href: https://www.ksrevenue.gov/pdf/ip18.pdf#page=2
- title: 2019 Form K-40 instructions, itemized deductions
href: https://www.ksrevenue.gov/pdf/ip19.pdf#page=2
1 change: 0 additions & 1 deletion policyengine_us/tests/code_health/test_source_conflicts.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@
"policyengine_us/variables/gov/states/fl/commerce/liheap/fl_liheap.py": 1,
"policyengine_us/variables/gov/states/hi/tax/income/credits/cdcc/hi_cdcc_qualifying_individuals.py": 1,
"policyengine_us/variables/gov/states/hi/tax/income/subtractions/hi_student_loan_interest_adjustment.py": 1,
"policyengine_us/variables/gov/states/ks/tax/income/deductions/ks_itemized_deductions.py": 1,
"policyengine_us/variables/gov/states/ky/dcbs/liheap/ky_liheap.py": 1,
"policyengine_us/variables/gov/states/md/tax/income/capital_gains/md_net_capital_gain.py": 1,
"policyengine_us/variables/gov/states/mn/dcyf/mfip/income/earned/mn_mfip_dependent_care_deduction.py": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
input:
real_estate_taxes: 8
salt_deduction: 10
interest_deduction: 9
deductible_mortgage_interest_tax_unit: 9
medical_expense_deduction: 2
state_code: KS
output:
Expand All @@ -14,21 +14,170 @@
input:
real_estate_taxes: 12
salt_deduction: 10
interest_deduction: 9
deductible_mortgage_interest_tax_unit: 9
medical_expense_deduction: 2
state_code: KS
output:
ks_itemized_deductions: 12 + 9 + 2

# K.S.A. 79-32,120(a)(5): from 2020, 100% of charitable contributions, medical
# care, qualified residence interest and real and personal property taxes.
# Investment interest and casualty losses are not Kansas itemized deductions.
- name: Case 3, 2025 only the four Kansas categories count.
period: 2025
input:
state_code: KS
charitable_deduction: 3_000
medical_expense_deduction: 2_000
deductible_mortgage_interest_tax_unit: 9_000
interest_deduction: 13_000
casualty_loss_deduction: 1_000
real_estate_taxes: 5_000
output:
# 3,000 + 2,000 + 9,000 + 5,000; not the 4,000 of investment interest in
# interest_deduction or the 1,000 casualty loss.
ks_itemized_deductions: 19_000

# K.S.A. 79-32,120(a)(4): 2019 allows 100% of charity and 75% of the other
# three categories.
- name: Case 4, 2019 shares.
period: 2019
input:
state_code: KS
charitable_deduction: 1_000
medical_expense_deduction: 2_000
deductible_mortgage_interest_tax_unit: 8_000
real_estate_taxes: 4_000
output:
# 1,000 + 0.75 * (2,000 + 8,000 + 4,000)
ks_itemized_deductions: 11_500

# K.S.A. 79-32,120(a)(3): 2018 allows 100% of charity and 50% of the other
# three categories.
- name: Case 5, 2018 shares.
period: 2018
input:
state_code: KS
charitable_deduction: 1_000
medical_expense_deduction: 2_000
deductible_mortgage_interest_tax_unit: 8_000
real_estate_taxes: 4_000
output:
# 1,000 + 0.5 * (2,000 + 8,000 + 4,000)
ks_itemized_deductions: 8_000

# K.S.A. 79-32,120(a)(2): 2015 to 2017 allow 100% of charity, 50% of qualified
# residence interest and property taxes, and no medical care (2017 Schedule S,
# Part C).
- name: Case 6, 2017 shares, no medical expenses.
period: 2017
input:
state_code: KS
charitable_deduction: 1_000
medical_expense_deduction: 2_000
deductible_mortgage_interest_tax_unit: 8_000
real_estate_taxes: 4_000
output:
# 1,000 + 0.5 * (8,000 + 4,000)
ks_itemized_deductions: 7_000

- name: Case 7, 2021 federal deduction for non-itemizers' charitable gifts is not a Kansas itemized deduction.
period: 2021
input:
state_code: KS
charitable_deduction: 2_000
charitable_deduction_for_non_itemizers: 300
real_estate_taxes: 4_000
output:
# 2,000 + 4,000; the 300 non-itemizer deduction does not count.
ks_itemized_deductions: 6_000

# K.S.A. 79-32,120(a)(4) counts qualified residence interest under section
# 163(h), and 163(h)(3)(E) treats mortgage insurance premiums as such interest
# (2019 Schedule S, line C4).
- name: Case 8, 2019 mortgage insurance premiums count at the 75% share.
period: 2019
input:
state_code: KS
employment_income: 40_000
home_mortgage_interest: 8_000
mortgage_insurance_premiums: 1_000
output:
# AGI of 40,000 is below the 100,000 premium phase-out start.
# 0.75 * (8,000 + 1,000)
ks_itemized_deductions: 6_750

- name: Case 9, 2025 a direct deductible mortgage interest input counts.
period: 2025
input:
state_code: KS
deductible_mortgage_interest: 9_000
output:
# 1 * 9,000
ks_itemized_deductions: 9_000

# K.S.A. 79-32,120(a)(5) and 163(h)(3)(E): P.L. 119-21 sec. 70108 restores the
# federal premium deduction from 2026, and Kansas counts it at 100%.
- name: Case 10, 2026 mortgage insurance premiums count at 100%.
period: 2026
input:
state_code: KS
home_mortgage_interest: 8_000
mortgage_insurance_premiums: 1_000
output:
# AGI of 0 is below the premium phase-out start.
# 1 * (8,000 + 1,000)
ks_itemized_deductions: 9_000

# 163(h)(3)(E)(iv) allows premiums through 2021, so premiums alone count.
- name: Case 11, 2021 mortgage insurance premiums alone count.
period: 2021
input:
state_code: KS
mortgage_insurance_premiums: 1_000
output:
# AGI of 0 is below the premium phase-out start.
# 1 * 1,000
ks_itemized_deductions: 1_000

# 163(h)(3)(E)(iv) ends the premium deduction after 2021, and P.L. 119-21
# sec. 70108 restores it only from 2026 (2025 Kansas Schedule A line 8d is
# reserved).
- name: Case 12, 2025 mortgage insurance premiums do not count.
period: 2025
input:
state_code: KS
home_mortgage_interest: 8_000
mortgage_insurance_premiums: 1_000
output:
# 1 * 8,000
ks_itemized_deductions: 8_000

# 163(h)(3)(E)(ii) cuts premiums by 10% for each $1,000, or fraction of one,
# of AGI above $100,000.
- name: Case 13, 2019 premiums after the AGI phase-out count at the 75% share.
period: 2019
input:
state_code: KS
employment_income: 104_500
home_mortgage_interest: 8_000
mortgage_insurance_premiums: 1_000
output:
# AGI exceeds 100,000 by 4,500: 5 steps, so premiums fall 50% to 500.
deductible_mortgage_insurance_premiums: 500
# 0.75 * (8,000 + 500)
ks_itemized_deductions: 6_375

- name: KS itemized deductions leave out the federal claim of right repayment deduction
# K.S.A. 79-32,120(a) lists charitable contributions, medical care,
# qualified residence interest and property taxes only.
period: 2025
input:
real_estate_taxes: 3_000
interest_deduction: 9_000
home_mortgage_interest: 9_000
claim_of_right_deduction: 5_000
state_code: KS
output:
itemized_deductions_less_salt: 14_000
# 9,000 + 3,000; the 5,000 claim of right deduction is not one of the four.
ks_itemized_deductions: 12_000
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,41 @@
state_code: KS
output:
ks_taxable_income: 0

# K.S.A. 79-32,120(a)(1)(A): before 2021, only federal itemizers may take the
# Kansas itemized deduction; (a)(1)(B) removes that condition from 2021.
- name: Case 4, 2019 non-itemizer federally takes the Kansas standard deduction.
period: 2019
input:
ks_agi: 50_000
ks_standard_deduction: 3_000
ks_itemized_deductions: 9_000
ks_exemptions: 2_250
tax_unit_itemizes: false
state_code: KS
output:
ks_taxable_income: 50_000 - 3_000 - 2_250

- name: Case 5, 2019 federal itemizer takes the larger Kansas itemized deduction.
period: 2019
input:
ks_agi: 50_000
ks_standard_deduction: 3_000
ks_itemized_deductions: 9_000
ks_exemptions: 2_250
tax_unit_itemizes: true
state_code: KS
output:
ks_taxable_income: 50_000 - 9_000 - 2_250

- name: Case 6, 2021 Kansas itemizing no longer requires federal itemizing.
period: 2021
input:
ks_agi: 50_000
ks_standard_deduction: 3_500
ks_itemized_deductions: 9_000
ks_exemptions: 2_250
tax_unit_itemizes: false
state_code: KS
output:
ks_taxable_income: 50_000 - 9_000 - 2_250
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,33 @@ class ks_itemized_deductions(Variable):
unit = USD
definition_period = YEAR
reference = (
"https://www.ksrevenue.gov/pdf/ip21.pdf",
"https://www.ksrevenue.gov/pdf/ip22.pdf",
"https://www.ksrevisor.gov/statutes/chapters/ch79/079_032_0120.html",
"https://www.ksrevenue.gov/pdf/ip17.pdf#page=14",
# PDF pages 14-15
"https://www.ksrevenue.gov/pdf/ip25.pdf#page=14",
)
defined_for = StateCode.KS

def formula(tax_unit, period, parameters):
# 2021 Form K-40 instructions say this:
# LINE 4 (Standard deduction or itemized deductions):
# If you did not itemize your deductions on your federal return,
# you may choose to itemize your deductions or claim the
# standard deduction on your Kansas return whichever is to your
# advantage. If you itemized on your federal return, you may
# either itemize or take the standard deduction on your Kansas
# return, whichever is to your advantage.
# compute itemized deduction maximum
itm_deds_less_salt = tax_unit("itemized_deductions_less_salt", period)
uncapped_property_taxes = add(tax_unit, period, ["real_estate_taxes"])
# K.S.A. 79-32,120(a) limits Kansas itemized deductions to charitable
# contributions, medical care, qualified residence interest and
# property taxes, so the federal claim of right repayment deduction
# is not one of them.
claim_of_right_deduction = tax_unit("claim_of_right_deduction", period)
return itm_deds_less_salt - claim_of_right_deduction + uncapped_property_taxes
# K.S.A. 79-32,120(a) limits the Kansas itemized deduction to four
# federal categories, each at a year-specific share. Other federal
# itemized deductions (investment interest, casualty and theft losses,
# miscellaneous deductions) do not count. Property taxes are not limited
# by the federal cap on state and local taxes.
p = parameters(period).gov.states.ks.tax.income.deductions.itemized.rate
charitable = tax_unit("charitable_deduction", period)
medical = tax_unit("medical_expense_deduction", period)
# 26 U.S.C. 163(h)(3)(E) treats deductible mortgage insurance premiums
# as qualified residence interest.
qualified_residence_interest = add(
tax_unit,
period,
["deductible_mortgage_interest", "deductible_mortgage_insurance_premiums"],
)
property_taxes = add(tax_unit, period, ["real_estate_taxes"])
return (
p.charitable_contributions * charitable
+ p.medical_expenses * medical
+ p.qualified_residence_interest * qualified_residence_interest
+ p.property_taxes * property_taxes
)
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,19 @@ class ks_taxable_income(Variable):
reference = (
"https://www.ksrevenue.gov/pdf/ip21.pdf",
"https://www.ksrevenue.gov/pdf/ip22.pdf",
"https://www.ksrevisor.gov/statutes/chapters/ch79/079_032_0120.html",
)
defined_for = StateCode.KS

def formula(tax_unit, period, parameters):
p = parameters(period).gov.states.ks.tax.income.deductions.itemized
std_ded = tax_unit("ks_standard_deduction", period)
itm_ded = tax_unit("ks_itemized_deductions", period)
deductions = where(itm_ded > std_ded, itm_ded, std_ded)
# K.S.A. 79-32,120(a)(1): before 2021, only federal itemizers may
# itemize on the Kansas return.
may_itemize = True
if p.federal_itemization_required:
may_itemize = tax_unit("tax_unit_itemizes", period)
deductions = where(may_itemize & (itm_ded > std_ded), itm_ded, std_ded)
exemptions = tax_unit("ks_exemptions", period)
return max_(0, tax_unit("ks_agi", period) - deductions - exemptions)
Loading