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/mn-charitable-floor-property-tax-cap.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Apply Minnesota's 1% charitable contribution floor from 2026. Cap Minnesota's deduction for combined real estate and personal property taxes at $10,000 ($5,000 for married filing separately) from 2019, in place of the federal SALT cap. Keep the federal charitable deduction in Minnesota AMT.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
description: Minnesota limits charitable deductions to contributions exceeding this fraction of the contribution base.
values:
2013-01-01: 0
2026-01-01: 0.01
metadata:
unit: /1
label: Minnesota charitable deduction floor
reference:
- title: Minnesota Statutes 290.0122, subdivision 4(a)
href: https://www.revisor.mn.gov/statutes/cite/290.0122#stat.290.0122.4
- title: Laws 2026, chapter 128, article 1, section 4
href: https://www.revisor.mn.gov/laws/2026/0/Session+Law/Chapter/128/
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
description: Minnesota caps combined real estate and personal property tax deductions at this amount, by filing status.
SINGLE:
2019-01-01: 10_000
SEPARATE:
2019-01-01: 5_000
JOINT:
2019-01-01: 10_000
HEAD_OF_HOUSEHOLD:
2019-01-01: 10_000
SURVIVING_SPOUSE:
2019-01-01: 10_000
metadata:
unit: currency-USD
label: Minnesota property tax deduction cap
breakdown:
- filing_status
reference:
- title: Minnesota Statutes 290.0122, subdivision 3(a)(1)
href: https://www.revisor.mn.gov/statutes/cite/290.0122#stat.290.0122.3
- title: Minnesota 2019 First Special Session Laws, chapter 6, article 1, section 16
href: https://www.revisor.mn.gov/laws/2019/1/Session+Law/Chapter/6/
12 changes: 10 additions & 2 deletions policyengine_us/reforms/states/mn/walz/mn_walz_hf1938.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,14 @@ def formula(tax_unit, period, parameters):
# itemized or standard deduction.
# ... calculate pre-limitation itemized deductions
itm_deds_less_salt = tax_unit("itemized_deductions_less_salt", period)
capped_property_taxes = tax_unit("capped_property_taxes", period)
# The Legislature amended only subdivision 2 of section 290.0122
# in House File 1938 (Laws 2023, chapter 64). Keep Minnesota's
# property tax cap (subd. 3) and charitable amount (subd. 4)
# under the repeal.
property_taxes = tax_unit("mn_property_tax_deduction", period)
charity_adjustment = tax_unit("mn_charitable_deduction", period) - tax_unit(
"charitable_deduction", period
)
# Schedule M1SA line 19 takes Minnesota's own casualty and theft
# loss (Schedule M1CAT) in place of the federal one.
federal_casualty_loss = tax_unit("casualty_loss_deduction", period)
Expand All @@ -120,7 +127,8 @@ def formula(tax_unit, period, parameters):
itm_deds_less_salt
- federal_casualty_loss
+ mn_casualty_loss
+ capped_property_taxes
+ property_taxes
+ charity_adjustment
)
# ... calculate itemized deductions offset
p = parameters(period).gov.states.mn.tax.income.deductions.itemized
Expand Down
1 change: 1 addition & 0 deletions policyengine_us/tests/code_health/test_source_conflicts.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@
"policyengine_us/variables/gov/states/hi/tax/income/subtractions/hi_student_loan_interest_adjustment.py": 1,
"policyengine_us/variables/gov/states/ky/dcbs/liheap/ky_liheap.py": 1,
"policyengine_us/variables/gov/states/mn/dcyf/mfip/income/earned/mn_mfip_dependent_care_deduction.py": 1,
"policyengine_us/variables/gov/states/mn/tax/income/amt/mn_amt_taxable_income.py": 1,
"policyengine_us/variables/gov/states/mn/tax/income/deductions/mn_itemized_deductions.py": 1,
"policyengine_us/variables/gov/states/mo/dese/ccs/eligibility/mo_ccs_income_eligible.py": 1,
"policyengine_us/variables/gov/states/nm/tax/income/exemptions/nm_medical_expense_exemption.py": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,21 @@
Every tax unit in a grid of states, filing statuses, incomes and deductions
shares one simulation per year. Each unit has twins that differ only in their
investment interest, and one that differs only in having no income. With the
deduction inputs set directly, income changes only the reduction, so the
no-income twin carries the pre-limitation total. For every unit:

1. The deduction lies between 0 and its pre-limitation total.
2. The reduction (pre-limitation total less the deduction) does not change
with investment interest, since investment interest is never reduced.
deduction inputs set directly, income changes only the reduction and, in
Minnesota from 2026, the charitable deduction: the Legislature allows
contributions over 1% of the contribution base (Minn. Stat. 290.0122, subd.
4(a)). The no-income twin therefore carries the total before the reduction
and before that floor. For every unit:

1. The deduction lies between 0 and its no-income total.
2. The no-income total less the deduction does not change with investment
interest, since investment interest is never reduced. With no income, a
Minnesota unit deducts T. With income, it deducts T - F - R, where F is
the part of its gifts under the 1% floor and R is the reduction. The twin
without investment interest has the same gifts and income, so the same F,
and a difference of F + R'. F cancels, and the check compares R with R'.
3. With no income, a gift raises the deduction by its full amount, so the
gift units differ from the others in both states and years.
"""

from itertools import product
Expand Down Expand Up @@ -53,6 +62,8 @@ def _simulation(year):
"filing_status": {period: status},
"adjusted_gross_income": {period: agi},
"charitable_deduction": {period: charity},
# From 2026, Minnesota applies its floor to this amount.
"charitable_deduction_before_floor": {period: charity},
"ca_charitable_deduction": {period: charity},
"medical_expense_deduction": {period: medical},
}
Expand Down Expand Up @@ -92,3 +103,9 @@ def test_itemized_limitation_invariants(year):
k = _index(state, status, 0, charity, medical, (0, 0))
reduction_without = deduction[state][k] - deduction[state][j]
assert pre - value == pytest.approx(reduction_without, abs=0.01), label

# 3. With no income, a gift raises the deduction by its full amount.
no_gift = _index(state, status, 0, 0, medical, investment)
assert pre - deduction[state][no_gift] == pytest.approx(charity, abs=0.01), (
label
)
250 changes: 250 additions & 0 deletions policyengine_us/tests/core/test_mn_deduction_invariants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
"""Invariants of Minnesota's property tax and charitable deductions.

The Minnesota Legislature caps the deduction for real estate and personal
property taxes at $10,000 for both together, or $5,000 for a married person
filing separately, from tax year 2019 (Minn. Stat. 290.0122, subd. 3(a)(1)).
From tax year 2026 it allows charitable contributions over 1% of the
contribution base (subd. 4(a)), where Congress allows those over 0.5% (26
U.S.C. 170(b)(1)(I)). It gives a non-itemizer half of the allowable
contributions over $500 (section 290.0132, subd. 7), and it keeps the federal
section 170 deduction in alternative minimum taxable income (section 290.091,
subd. 2(a)(2)(i)).

The YAML files for these variables pin the amounts at each threshold. The
checks below take their caps, floors and years from those statutes, and hold
for every tax unit in a grid of filing statuses, incomes, taxes and gifts.
Each year's units share one simulation.

Property taxes, in 2019, 2024 and 2026:

1. The deduction lies between 0 and the lesser of the taxes paid and the cap.
2. Swapping the real estate and personal property amounts leaves it unchanged.
3. Paying more of either tax never lowers it.
4. Itemized deductions rise by the deduction.

Charitable contributions, in 2025 and 2026:

5. The Minnesota amount lies between 0 and the amount before any floor, and
giving more never lowers it.
6. Before 2026, it equals the federal deduction. From 2026, a filer deducts
gifts in Minnesota only when they exceed 1% of income, and the Minnesota
amount trails the federal one by at most 0.5% of income.
7. The federal deduction equals the amount before any floor, less 0.5% of
income from 2026. The grid includes gifts over the percentage ceilings,
where the two variables would differ if only one of them applied a
ceiling.
8. Itemized deductions rise by the Minnesota amount, and an itemizer's
alternative minimum taxable income falls by the federal amount.
9. An itemizer takes no charity subtraction. A non-itemizer takes one only
when the Minnesota amount exceeds $500.
"""

from itertools import product

import numpy as np
import pytest

from policyengine_us import Simulation

TOLERANCE = 0.01 # dollars

STATUSES = (
"SINGLE",
"SEPARATE",
"JOINT",
"HEAD_OF_HOUSEHOLD",
"SURVIVING_SPOUSE",
)

# Minn. Stat. 290.0122, subd. 3(a)(1).
PROPERTY_TAX_CAP = 10_000
PROPERTY_TAX_CAP_SEPARATE = 5_000
PROPERTY_YEARS = (2019, 2024, 2026)
TAXES = (0, 3_000, 7_000, 18_000)
PROPERTY_UNITS = list(product(STATUSES, TAXES, TAXES))
# Below every reduction threshold in subd. 2, so itemized deductions equal
# the sum of their parts.
PROPERTY_AGI = 50_000

# Minn. Stat. 290.0122, subd. 4(a), and 26 U.S.C. 170(b)(1)(I), both for
# taxable years beginning after December 31, 2025.
FLOOR_YEAR = 2026
MINNESOTA_FLOOR = 0.01
FEDERAL_FLOOR = 0.005
# Minn. Stat. 290.0132, subd. 7.
SUBTRACTION_THRESHOLD = 500
CHARITY_YEARS = (2025, 2026)
# Both incomes lie below every reduction threshold in subd. 2.
AGIS = (50_000, 100_000)
# With 40,000 of mortgage interest every unit itemizes.
MORTGAGE_INTEREST = (0, 40_000)
# (cash, other property). Gifts of 400 and 600 fall on either side of 1% of
# 50,000, and 600 falls between the two floors at 100,000. Gifts of 80,000
# exceed the 60% and 50% ceilings at both incomes.
GIFTS = (
(0, 0),
(400, 0),
(600, 0),
(1_500, 0),
(80_000, 0),
(0, 80_000),
(20_000, 20_000),
)
CHARITY_UNITS = list(product(STATUSES, AGIS, MORTGAGE_INTEREST, GIFTS))


def _simulation(year, units):
"""One Minnesota tax unit per (filing status, income, person inputs)."""
period = str(year)
people, tax_units, households = {}, {}, {}
for i, (status, agi, inputs) in enumerate(units):
person = f"p{i}"
people[person] = {
"age": {period: 40},
**{name: {period: amount} for name, amount in inputs.items()},
}
tax_units[f"t{i}"] = {
"members": [person],
"filing_status": {period: status},
"adjusted_gross_income": {period: agi},
}
households[f"h{i}"] = {"members": [person], "state_code": {period: "MN"}}
return Simulation(
situation={"people": people, "tax_units": tax_units, "households": households}
)


@pytest.mark.parametrize("year", PROPERTY_YEARS)
def test_property_tax_deduction_invariants(year):
period = str(year)
simulation = _simulation(
year,
[
(
status,
PROPERTY_AGI,
{"real_estate_taxes": real, "mn_personal_property_taxes": personal},
)
for status, real, personal in PROPERTY_UNITS
],
)
deduction = simulation.calculate("mn_property_tax_deduction", period)
itemized = simulation.calculate("mn_itemized_deductions", period)
index = {unit: i for i, unit in enumerate(PROPERTY_UNITS)}

for (status, real, personal), i in index.items():
label = f"{year} {status} real {real} personal {personal}"
cap = PROPERTY_TAX_CAP_SEPARATE if status == "SEPARATE" else PROPERTY_TAX_CAP

# 1. Between 0 and the lesser of the taxes paid and the cap.
assert deduction[i] >= 0, label
assert deduction[i] <= min(real + personal, cap) + TOLERANCE, label

# 2. Swapping the two taxes leaves the deduction unchanged.
swapped = index[status, personal, real]
assert deduction[i] == pytest.approx(deduction[swapped], abs=TOLERANCE), label

# 3. Paying more of either tax never lowers it.
for more_real, more_personal in product(TAXES, TAXES):
if more_real >= real and more_personal >= personal:
more = index[status, more_real, more_personal]
assert deduction[more] >= deduction[i] - TOLERANCE, label

# 4. Itemized deductions rise by the deduction.
no_taxes = index[status, 0, 0]
assert itemized[i] - itemized[no_taxes] == pytest.approx(
deduction[i], abs=TOLERANCE
), label

# The grid has filers who pay no tax and filers at the cap.
assert deduction.min() == 0
assert deduction.max() == pytest.approx(PROPERTY_TAX_CAP, abs=TOLERANCE)


@pytest.mark.parametrize("year", CHARITY_YEARS)
def test_charitable_deduction_invariants(year):
period = str(year)
simulation = _simulation(
year,
[
(
status,
agi,
{
"deductible_mortgage_interest": mortgage,
"charitable_cash_donations": cash,
"charitable_non_cash_donations": other,
},
)
for status, agi, mortgage, (cash, other) in CHARITY_UNITS
],
)
before_floor = simulation.calculate("charitable_deduction_before_floor", period)
federal = simulation.calculate("charitable_deduction", period)
minnesota = simulation.calculate("mn_charitable_deduction", period)
itemized = simulation.calculate("mn_itemized_deductions", period)
itemizing = simulation.calculate("mn_itemizing", period)
subtraction = simulation.calculate("mn_charity_subtraction", period)
amt_income = simulation.calculate("mn_amt_taxable_income", period)
index = {unit: i for i, unit in enumerate(CHARITY_UNITS)}

for (status, agi, mortgage, (cash, other)), i in index.items():
label = f"{year} {status} AGI {agi} mortgage {mortgage} gifts {(cash, other)}"

# 5. Between 0 and the amount before any floor; more gifts never
# lower it.
assert minnesota[i] >= 0, label
assert minnesota[i] <= before_floor[i] + TOLERANCE, label
for more_cash, more_other in GIFTS:
if more_cash >= cash and more_other >= other:
more = index[status, agi, mortgage, (more_cash, more_other)]
assert minnesota[more] >= minnesota[i] - TOLERANCE, label

if year < FLOOR_YEAR:
# 6. Minnesota follows the federal deduction.
assert minnesota[i] == pytest.approx(federal[i], abs=TOLERANCE), label
# 7. No floor applies.
assert federal[i] == pytest.approx(before_floor[i], abs=TOLERANCE), label
else:
# 6. A deduction only for gifts over 1% of income, at most 0.5%
# of income below the federal one.
over_floor = before_floor[i] > MINNESOTA_FLOOR * agi + TOLERANCE
assert (minnesota[i] > TOLERANCE) == over_floor, label
gap = federal[i] - minnesota[i]
assert gap >= -TOLERANCE, label
assert gap <= (MINNESOTA_FLOOR - FEDERAL_FLOOR) * agi + TOLERANCE, label
# 7. The federal floor applies to the same amount.
assert federal[i] == pytest.approx(
max(0, before_floor[i] - FEDERAL_FLOOR * agi), abs=TOLERANCE
), label

# 8. Itemized deductions rise by the Minnesota amount. An itemizer's
# AMT income falls by the federal amount.
no_gifts = index[status, agi, mortgage, (0, 0)]
assert itemized[i] - itemized[no_gifts] == pytest.approx(
minnesota[i], abs=TOLERANCE
), label
if itemizing[i] and itemizing[no_gifts]:
assert amt_income[no_gifts] - amt_income[i] == pytest.approx(
federal[i], abs=TOLERANCE
), label

# 9. No subtraction for an itemizer; one for a non-itemizer only
# when the Minnesota amount exceeds $500.
if itemizing[i]:
assert subtraction[i] == 0, label
else:
over_threshold = minnesota[i] > SUBTRACTION_THRESHOLD + TOLERANCE
assert (subtraction[i] > TOLERANCE) == over_threshold, label

# The grid has itemizers and non-itemizers, a subtraction, gifts over
# and under the percentage ceilings and, from 2026, gifts between the
# two floors.
gifts = np.array([cash + other for *_, (cash, other) in CHARITY_UNITS])
assert itemizing.any() and not itemizing.all()
assert (subtraction > 0).any()
assert (before_floor < gifts - TOLERANCE).any()
assert ((before_floor > 0) & (before_floor > gifts - TOLERANCE)).any()
if year >= FLOOR_YEAR:
assert ((federal > 0) & (minnesota == 0)).any()
assert (minnesota > 0).any()
Loading
Loading