102 lines
3.1 KiB
Python
102 lines
3.1 KiB
Python
from __future__ import annotations
|
|
|
|
from typing import Any
|
|
|
|
|
|
TAX_YEAR_DATA: dict[int, dict[str, Any]] = {
|
|
2024: {
|
|
"standardDeduction": {
|
|
"single": 14600.0,
|
|
"married_filing_jointly": 29200.0,
|
|
"head_of_household": 21900.0,
|
|
},
|
|
"ordinaryIncomeBrackets": {
|
|
"single": [
|
|
(11600.0, 0.10),
|
|
(47150.0, 0.12),
|
|
(100525.0, 0.22),
|
|
(191950.0, 0.24),
|
|
(243725.0, 0.32),
|
|
(609350.0, 0.35),
|
|
(float("inf"), 0.37),
|
|
],
|
|
"married_filing_jointly": [
|
|
(23200.0, 0.10),
|
|
(94300.0, 0.12),
|
|
(201050.0, 0.22),
|
|
(383900.0, 0.24),
|
|
(487450.0, 0.32),
|
|
(731200.0, 0.35),
|
|
(float("inf"), 0.37),
|
|
],
|
|
"head_of_household": [
|
|
(16550.0, 0.10),
|
|
(63100.0, 0.12),
|
|
(100500.0, 0.22),
|
|
(191950.0, 0.24),
|
|
(243700.0, 0.32),
|
|
(609350.0, 0.35),
|
|
(float("inf"), 0.37),
|
|
],
|
|
},
|
|
"sourceCitations": {
|
|
"standardDeduction": "IRS Rev. Proc. 2023-34, section 3.01; 2024 Form 1040 instructions.",
|
|
"ordinaryIncomeBrackets": "IRS Rev. Proc. 2023-34, section 3.01; 2024 Form 1040 instructions.",
|
|
},
|
|
},
|
|
2025: {
|
|
"standardDeduction": {
|
|
"single": 15750.0,
|
|
"married_filing_jointly": 31500.0,
|
|
"head_of_household": 23625.0,
|
|
},
|
|
"ordinaryIncomeBrackets": {
|
|
"single": [
|
|
(11925.0, 0.10),
|
|
(48475.0, 0.12),
|
|
(103350.0, 0.22),
|
|
(197300.0, 0.24),
|
|
(250525.0, 0.32),
|
|
(626350.0, 0.35),
|
|
(float("inf"), 0.37),
|
|
],
|
|
"married_filing_jointly": [
|
|
(23850.0, 0.10),
|
|
(96950.0, 0.12),
|
|
(206700.0, 0.22),
|
|
(394600.0, 0.24),
|
|
(501050.0, 0.32),
|
|
(751600.0, 0.35),
|
|
(float("inf"), 0.37),
|
|
],
|
|
"head_of_household": [
|
|
(17000.0, 0.10),
|
|
(64850.0, 0.12),
|
|
(103350.0, 0.22),
|
|
(197300.0, 0.24),
|
|
(250500.0, 0.32),
|
|
(626350.0, 0.35),
|
|
(float("inf"), 0.37),
|
|
],
|
|
},
|
|
"sourceCitations": {
|
|
"standardDeduction": "IRS Rev. Proc. 2024-40, section 3.01; 2025 Form 1040 instructions.",
|
|
"ordinaryIncomeBrackets": "IRS Rev. Proc. 2024-40, section 3.01; 2025 Form 1040 instructions.",
|
|
},
|
|
},
|
|
}
|
|
|
|
|
|
def supported_tax_years() -> list[int]:
|
|
return sorted(TAX_YEAR_DATA)
|
|
|
|
|
|
def tax_year_rules(tax_year: int) -> dict[str, Any]:
|
|
try:
|
|
return TAX_YEAR_DATA[tax_year]
|
|
except KeyError as exc:
|
|
years = ", ".join(str(year) for year in supported_tax_years())
|
|
raise ValueError(
|
|
f"Unsupported tax year {tax_year}. Supported tax years: {years}."
|
|
) from exc
|