// Builds the tables for dataset `state-top-income-tax-rates-2028`. // Inputs are typed in from the Tax Foundation 2026 table (rates as of Feb. 11, 2026), state revenue // departments and ESSB 6346; see the dataset's sources. Usage: node build_rates.js // Outputs: data/rates/*.csv and data/rates/results.json const fs = require("fs"), path = require("path"); const out = path.join(__dirname, "data", "rates"); fs.mkdirSync(out, { recursive: true }); const csv = rows => { const h = Object.keys(rows[0]); const esc = v => (v === null || v === undefined) ? "" : (/[",\n]/.test(String(v)) ? '"' + String(v).replace(/"/g, '""') + '"' : String(v)); return [h.join(","), ...rows.map(r => h.map(k => esc(r[k])).join(","))].join("\n") + "\n"; }; // --- Table 1: top statutory state individual income tax rates --- // rate2026: Tax Foundation 2026 table. rate2028: law as of Oct. 21, 2026 (scheduled changes noted). const rates = [ { jurisdiction: "California", isState: true, rate2026Pct: 13.3, rate2028Pct: 13.3, topBracketStartsMfj: 1485906, status: "Tax Foundation table", note: "12.3% plus 1% Mental Health Services tax on taxable income over $1 million; wages also bear 1.3% SDI payroll tax (not counted)." }, { jurisdiction: "Hawaii", isState: true, rate2026Pct: 11, rate2028Pct: 13, topBracketStartsMfj: 650000, status: "2026 rate: Tax Foundation table; 2027 increase: news reports only", note: "Reported increase to 13% from 2027 not checked against the statute; Hawaii ranks above Washington either way." }, { jurisdiction: "New York", isState: true, rate2026Pct: 10.9, rate2028Pct: 10.9, topBracketStartsMfj: 25000000, status: "Tax Foundation table", note: "10.9% applies above $25 million; 9.65% from about $2.16 million (MFJ)." }, { jurisdiction: "New Jersey", isState: true, rate2026Pct: 10.75, rate2028Pct: 10.75, topBracketStartsMfj: 1000000, status: "Tax Foundation table", note: "" }, { jurisdiction: "District of Columbia", isState: false, rate2026Pct: 10.75, rate2028Pct: 10.75, topBracketStartsMfj: 1000000, status: "Tax Foundation table", note: "Not a state." }, { jurisdiction: "Oregon", isState: true, rate2026Pct: 9.9, rate2028Pct: 9.9, topBracketStartsMfj: 250000, status: "Tax Foundation table", note: "" }, { jurisdiction: "Washington", isState: true, rate2026Pct: 0, rate2028Pct: 9.9, topBracketStartsMfj: 1000000, status: "ESSB 6346 (2026 c 238)", note: "No income tax in 2026; 9.9% on Washington taxable income above a $1 million household deduction from tax year 2028. Long-term capital gains are taxed separately at 7% plus 2.9% over $1 million." }, { jurisdiction: "Minnesota", isState: true, rate2026Pct: 9.85, rate2028Pct: 9.85, topBracketStartsMfj: 337930, status: "Tax Foundation table", note: "Plus a 1% surtax on net investment income over $1 million (not counted)." }, { jurisdiction: "Massachusetts", isState: true, rate2026Pct: 9, rate2028Pct: 9, topBracketStartsMfj: 1107750, status: "Massachusetts DOR", note: "5% plus 4% surtax; threshold indexed, $1,107,750 for 2026, same for all filing statuses." }, { jurisdiction: "Vermont", isState: true, rate2026Pct: 8.75, rate2028Pct: 8.75, topBracketStartsMfj: 304000, status: "Tax Foundation table", note: "" }, ]; fs.writeFileSync(path.join(out, "top_rates.csv"), csv(rates)); const states2028 = rates.filter(r => r.isState).sort((a, b) => b.rate2028Pct - a.rate2028Pct); const rankOf = j => 1 + states2028.filter(r => r.rate2028Pct > states2028.find(x => x.jurisdiction === j).rate2028Pct).length; const ranking = states2028.map(r => ({ jurisdiction: r.jurisdiction, rate2028Pct: r.rate2028Pct, rankAmongStates: rankOf(r.jurisdiction) })); const waRankIfHawaii11 = 1 + states2028.filter(r => (r.jurisdiction === "Hawaii" ? 11 : r.rate2028Pct) > 9.9).length; // --- Table 2: effective (average) state income tax, married filing jointly, wages only --- function bracketTax(taxable, brackets) { // brackets: [[lowerBound, rate], ...] ascending let tax = 0; for (let i = 0; i < brackets.length; i++) { const [lo, r] = brackets[i], hi = i + 1 < brackets.length ? brackets[i + 1][0] : Infinity; if (taxable > lo) tax += (Math.min(taxable, hi) - lo) * r; } return tax; } const CA = [[0, .01], [22158, .02], [52528, .04], [82904, .06], [115084, .08], [145448, .093], [742958, .103], [891542, .113], [1485906, .123]]; const OR = [[0, .0475], [9100, .0675], [22800, .0875], [250000, .099]]; const tax = { Washington: inc => 0.099 * Math.max(0, inc - 1e6), Oregon: inc => bracketTax(inc - 5820, OR), California: inc => { const ti = inc - 11080; return bracketTax(ti, CA) + 0.01 * Math.max(0, ti - 1e6); }, Massachusetts: inc => { const ti = inc - 8800; return 0.05 * ti + 0.04 * Math.max(0, ti - 1107750); }, }; const eff = []; for (const inc of [1500000, 2000000, 5000000]) for (const [st, f] of Object.entries(tax)) { const t = Math.round(f(inc)); eff.push({ householdIncome: inc, incomeLabel: "$" + (inc / 1e6) + " million", jurisdiction: st, stateIncomeTax: t, effectiveRatePct: +(100 * t / inc).toFixed(2) }); } fs.writeFileSync(path.join(out, "effective_rates.csv"), csv(eff)); // --- Table 3: Tax Foundation's Seattle combined top marginal rate on wages --- const seattle = [ { component: "Washington millionaires tax (ESSB 6346)", ratePct: 9.9, paidBy: "Employee (income tax)", isIncomeTax: true }, { component: "WA Cares long-term care payroll tax", ratePct: 0.58, paidBy: "Employee (payroll tax)", isIncomeTax: false }, { component: "Seattle Social Housing Tax", ratePct: 5.0, paidBy: "Employer (payroll tax)", isIncomeTax: false }, { component: "Seattle JumpStart payroll expense tax, top tier", ratePct: 2.557, paidBy: "Employer (payroll tax)", isIncomeTax: false }, ]; const seattleTotal = +seattle.reduce((s, r) => s + r.ratePct, 0).toFixed(3); fs.writeFileSync(path.join(out, "seattle_combined.csv"), csv(seattle)); fs.writeFileSync(path.join(out, "results.json"), JSON.stringify({ ranking, waRankIfHawaii11, eff, seattle, seattleTotal }, null, 2)); console.log(JSON.stringify({ ranking, waRankIfHawaii11, seattleTotal })); console.table(eff);