A single mom in Lexington makes $16 an hour and gets offered a shift lead job at $19. Once her SNAP shrinks and her Medicaid ends, she’s actually $84 a month worse off. This tool shows any Kentucky parent what a raise really does to their monthly budget, when each benefit change hits, the wage that clears the cliff, and what to say and do next. Every number is sourced to Kentucky and federal rules and listed on the page.
<!-- Copyright (c) 2026 Ryder Kettering. Released under the MIT License. -->
<!DOCTYPE html>
<!--
The Raise Test
Will a raise leave a Kentucky family with more money, or less, once benefits adjust?
HOW THIS FILE WORKS (for anyone checking the math)
1. Every tax and benefit number lives in one place: the RULES block, between
CALC-START and CALC-END below. Each rule lists its source and whether it is
"verified" or still an "estimate".
2. monthly(wage, inputs) builds the full picture at one wage: take-home pay,
tax credits, SNAP, child care copay, health coverage, and what is left.
3. timeline() shows the 12 months after a raise, when benefits change on a delay.
clearingWage() finds the lowest wage that leaves the family as well off as today.
4. Everything after CALC-END only draws the page, saves and opens files.
Nothing is sent anywhere. No outside code, fonts or services are used.
Figures are current as of November 2026. To update them, or to adapt this tool
for another state, change the RULES block and its sources.
MIT License
Copyright (c) 2026 Ryder Kettering
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-->
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The Raise Test</title>
<style>
:root {
--paper: #fcfcfa;
--ink: #17242b;
--muted: #59656b;
--rule: #dde1db;
--sheet: #f1f3ee;
--mark: #f6e26a;
--gain: #11865b;
--loss: #c8412b;
--gain-text: #0b6b48;
--loss-text: #a8321f;
--serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
--sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
margin: 0;
font-family: var(--sans);
font-size: 16px;
line-height: 1.5;
color: var(--ink);
background: var(--paper);
font-variant-numeric: tabular-nums;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* Top bar */
.topbar {
display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between;
padding: 18px 0 10px;
}
.wordmark { font-family: var(--serif); font-weight: 700; font-size: 20px; margin: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
button {
font: inherit; font-size: 14px; color: var(--ink);
background: transparent; border: 1px solid var(--ink); border-radius: 4px;
padding: 6px 12px; cursor: pointer;
}
button.primary { background: var(--ink); color: var(--paper); }
button:hover { background: var(--sheet); }
button.primary:hover { background: #2c3c44; }
.status { font-size: 13px; color: var(--muted); }
.error {
display: none; margin: 8px 0 0; padding: 10px 12px;
border-left: 3px solid var(--loss); background: #fbeeeb; color: var(--loss-text); font-size: 14px;
}
/* Hero: the sentence is the tool */
.hero { padding: 28px 0 36px; border-bottom: 1px solid var(--rule); }
.question {
font-family: var(--serif); font-weight: 400;
font-size: clamp(30px, 5.2vw, 52px); line-height: 1.22; letter-spacing: -0.01em;
margin: 0; max-width: 21em;
}
.question label { white-space: nowrap; }
.fill {
font: inherit; color: inherit; letter-spacing: inherit;
width: 2.75em; padding: 0 0.06em; margin: 0;
border: 0; border-bottom: 2px solid var(--ink); border-radius: 0;
background: linear-gradient(transparent 12%, var(--mark) 12%, var(--mark) 92%, transparent 92%);
-moz-appearance: textfield; appearance: textfield;
}
.fill.short { width: 1.6em; }
.fill::-webkit-outer-spin-button, .fill::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fill:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.result { font-weight: 700; }
.result.good { color: var(--gain-text); }
.result.bad { color: var(--loss-text); }
.verdict { font-size: 19px; max-width: 40em; margin: 18px 0 6px; }
.built-for { font-size: 15px; color: var(--muted); margin: 0; max-width: 46em; }
.why { font-size: 15px; color: var(--muted); margin: 10px 0 0; max-width: 46em; }
.why strong { color: var(--ink); }
/* Body grid */
main { padding: 32px 0 24px; }
.grid { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 48px; align-items: start; }
@media (max-width: 900px) { .grid { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
/* The form sheet: the only boxed thing on the page */
.sheet { background: var(--sheet); border-radius: 6px; padding: 20px 18px 14px; }
@media (min-width: 901px) { .sheet { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; } }
.sheet h2 { font-family: var(--serif); font-size: 21px; margin: 0 0 2px; }
.sheet fieldset { border: 0; padding: 0; margin: 18px 0 0; }
.sheet legend { font-weight: 700; font-size: 15px; padding: 0; margin-bottom: 8px; }
.hint { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
label.field { display: block; margin-bottom: 10px; font-size: 14px; }
label.field span { display: block; margin-bottom: 3px; color: var(--muted); }
.sheet input[type=number] {
width: 100%; font: inherit; font-size: 16px; color: var(--ink);
padding: 6px 8px; border: 1px solid #c9cec7; border-radius: 4px; background: var(--paper);
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; margin-bottom: 8px; }
.check input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--ink); }
/* Results: plain sections separated by rules */
.results > section { padding: 0 0 32px; margin: 0 0 32px; border-bottom: 1px solid var(--rule); }
.results > section:last-child { border-bottom: 0; margin-bottom: 0; }
h2.section { font-family: var(--serif); font-size: 26px; line-height: 1.25; margin: 0 0 6px; font-weight: 700; }
.lede { color: var(--muted); margin: 0 0 16px; max-width: 40em; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: right; padding: 8px 6px; border-bottom: 1px solid var(--rule); }
th:first-child, td:first-child { text-align: left; padding-left: 0; }
thead th { color: var(--muted); font-weight: 600; font-size: 14px; }
tr.total td { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: none; }
.neg { color: var(--loss-text); }
.pos { color: var(--gain-text); }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.note { margin: 16px 0 0; padding-left: 14px; border-left: 2px solid var(--ink); max-width: 44em; }
.legend { font-size: 13px; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.tip { pointer-events: none; }
/* Plan */
.plan { padding-top: 40px; padding-bottom: 40px; border-top: 1px solid var(--rule); }
.plan-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 48px; }
@media (max-width: 900px) { .plan-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 0 0 18px 44px; max-width: 42em; }
.steps li::before {
content: counter(step); position: absolute; left: 0; top: 0;
font-family: var(--serif); font-weight: 700; font-size: 22px; line-height: 1.2;
}
.steps li strong { display: block; font-size: 17px; margin-bottom: 2px; }
.script {
display: block; margin-top: 8px; padding: 10px 14px;
font-family: var(--serif); font-size: 17px; font-style: italic;
background: linear-gradient(transparent 0, transparent 100%), var(--sheet); border-radius: 4px;
}
.asks-box h3 { font-family: var(--serif); font-size: 20px; margin: 0 0 10px; }
.asks { margin: 0; padding-left: 20px; }
.asks li { margin-bottom: 8px; }
/* Reference */
.reference { padding-top: 36px; padding-bottom: 36px; border-top: 1px solid var(--rule); }
.reference p { max-width: 46em; }
.sources { margin-top: 12px; }
.sources td, .sources th { text-align: left; vertical-align: top; font-size: 14px; overflow-wrap: anywhere; padding-right: 12px; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 6px; border-radius: 3px; white-space: nowrap; }
.badge.verified { background: #e1f1e8; color: var(--gain-text); }
.badge.estimate { background: #fbf1c2; color: #6f5a00; }
@media (max-width: 640px) {
.sources thead { display: none; }
.sources tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.sources td { display: block; border: none; padding: 2px 0; }
.sources td:first-child { font-weight: 700; }
}
footer { font-size: 14px; color: var(--muted); padding-top: 24px; padding-bottom: 48px; border-top: 1px solid var(--rule); }
footer p { max-width: 52em; }
@media print {
.toolbar, .sheet { display: none; }
.grid { grid-template-columns: 1fr; }
}
</style>
</head>
<body>
<div class="wrap">
<div class="topbar">
<p class="wordmark">The Raise Test</p>
<div class="toolbar">
<button class="primary" id="saveBtn" type="button">Save my numbers</button>
<button id="loadBtn" type="button">Open saved file</button>
<input type="file" id="fileInput" accept=".json,application/json" hidden>
<button id="resetBtn" type="button">Reset to example</button>
<span class="status" id="saveStatus" aria-live="polite"></span>
</div>
</div>
<div class="error" id="errorBox" role="alert"></div>
<header class="hero">
<h1 class="question">
Going from <label>$<input class="fill" type="number" id="currentWage" value="16" step="0.25" min="7.25" max="60" aria-label="Pay now, dollars per hour"></label>
to <label>$<input class="fill" type="number" id="offerWage" value="19" step="0.25" min="7.25" max="60" aria-label="Raise offer, dollars per hour"></label> an hour,
at <label><input class="fill short" type="number" id="hours" value="40" step="1" min="1" max="80" aria-label="Hours per week"></label> hours a week,
leaves you <span class="result bad" id="bigNumber" aria-live="polite">$84 a month behind</span>.
</h1>
<p class="verdict" id="verdict">That is after taxes, tax credits, and every benefit change. The raise is real, but the help you lose is bigger. To come out ahead, you would need about $24.50 an hour.</p>
<p class="built-for">Built for a single mom of two in Lexington, Kentucky, earning $16 an hour, who has been offered a shift lead job at $19. Change the highlighted numbers, or your details below, to test your own raise.</p>
<p class="why"><strong>For educational use only.</strong> This is a learning tool, not financial, tax, legal, or benefits advice. Confirm with your caseworker before you decide. Full disclaimer at the bottom of the page.</p>
<p class="why"><strong>Why this matters in Kentucky:</strong> employers report workers hesitating to accept raises because of how a higher income could affect their benefits (Kentucky Chamber of Commerce, 2022). The state's Benefits Cliff Task Force found that a user-friendly tool for weighing a raise against benefit eligibility can help families make that choice (2022 Task Force, cited in the 2023 CHFS report under HJR 39).</p>
</header>
</div>
<main class="wrap">
<div class="grid">
<aside class="sheet" aria-label="Your situation">
<h2>Your situation</h2>
<p class="hint">Everything updates as you type.</p>
<fieldset>
<legend>Kids</legend>
<div class="row2">
<label class="field"><span>In daycare</span><input type="number" id="kidsDaycare" value="1" step="1" min="0" max="4"></label>
<label class="field"><span>In after-school care</span><input type="number" id="kidsSchool" value="1" step="1" min="0" max="4"></label>
</div>
</fieldset>
<fieldset>
<legend>Monthly costs</legend>
<p class="hint">For child care, enter the provider's full price before any help. The page works out your copay.</p>
<div class="row2">
<label class="field"><span>Daycare, per child</span><input type="number" id="daycareCost" value="900" step="25" min="0" max="5000"></label>
<label class="field"><span>After-school, per child</span><input type="number" id="schoolCost" value="350" step="25" min="0" max="5000"></label>
</div>
<div class="row2">
<label class="field"><span>Rent</span><input type="number" id="rent" value="1100" step="25" min="0" max="10000"></label>
<label class="field"><span>Other bills</span><input type="number" id="otherBills" value="600" step="25" min="0" max="10000"></label>
</div>
</fieldset>
<fieldset>
<legend>Benefits you get now</legend>
<label class="check"><input type="checkbox" id="onMedicaid" checked> Medicaid for me, KCHIP for the kids</label>
<label class="check"><input type="checkbox" id="onSnap" checked> SNAP (food benefits)</label>
<label class="check"><input type="checkbox" id="onCcap" checked> Child Care Assistance (CCAP)</label>
<label class="check"><input type="checkbox" id="paysUtilities" checked> I pay my own heating or cooling bill</label>
</fieldset>
<fieldset>
<legend>When each benefit changes</legend>
<p class="hint">Which month after the raise starts. Month 1 is your first month at the new pay. SNAP and Medicaid usually adjust 2 to 3 months in. The child care copay stays the same until your next renewal.</p>
<div class="row2">
<label class="field"><span>SNAP, in month</span><input type="number" id="snapMonth" value="3" step="1" min="1" max="12"></label>
<label class="field"><span>Medicaid, in month</span><input type="number" id="medicaidMonth" value="3" step="1" min="1" max="12"></label>
</div>
<label class="field"><span>Child care copay, in month</span><input type="number" id="ccapMonth" value="12" step="1" min="1" max="12"></label>
</fieldset>
<fieldset>
<legend>Work and savings</legend>
<div class="row2">
<label class="field"><span>Local wage tax (%)</span><input type="number" id="localTax" value="2.25" step="0.05" min="0" max="5"></label>
<label class="field"><span>Savings you have now ($)</span><input type="number" id="savings" value="300" step="50" min="0" max="100000"></label>
</div>
<p class="hint">Lexington-Fayette charges 2.25% of wages. Most Kentucky cities and counties have their own rate, so check your pay stub.</p>
</fieldset>
</aside>
<div class="results">
<section>
<h2 class="section">Where the money goes</h2>
<p class="lede">Each month, today and once every benefit has adjusted to the new pay.</p>
<table>
<thead><tr><th>Per month</th><th id="colNow">Now</th><th id="colRaise">After raise</th><th>Change</th></tr></thead>
<tbody id="compareBody"></tbody>
</table>
</section>
<section>
<h2 class="section">When the drop hits</h2>
<p class="lede">How much more or less you have each month after the raise starts, compared with today. Benefits change on a delay, not on day one.</p>
<svg class="chart" id="timelineChart" viewBox="0 0 640 250" role="img" aria-label="Change in money left each month after the raise, compared with today"></svg>
<div class="legend">
<span><span class="sw" style="background:#11865b"></span>Ahead of today</span>
<span><span class="sw" style="background:#c8412b"></span>Behind today</span>
</div>
<p class="note" id="bridgePlan"></p>
</section>
<section>
<h2 class="section">The wage that clears it</h2>
<p class="lede">What is left each month at every hourly wage, with everything else held the same. Point at the line to read any wage.</p>
<svg class="chart" id="cliffChart" viewBox="0 0 640 270" role="img" aria-label="Money left each month at each hourly wage"></svg>
<p class="note" id="askFor"></p>
</section>
</div>
</div>
</main>
<section class="wrap plan" aria-labelledby="planTitle">
<h2 class="section" id="planTitle">Your plan</h2>
<p class="lede">What to do with these numbers, in order.</p>
<div class="plan-grid">
<ol class="steps" id="planSteps"></ol>
<div class="asks-box">
<h3>Bring these to your caseworker</h3>
<ul class="asks" id="caseworkerQs"></ul>
</div>
</div>
</section>
<section class="wrap reference" aria-labelledby="compareTitle">
<h2 class="section" id="compareTitle">How this differs from other cliff tools</h2>
<p>Kentucky's Family Resource Simulator, run by KYSTATS, models about 18 programs across all 120 counties and is built for policymakers and case managers. The Atlanta Fed's CLIFF tools do similar work nationally. Both show where cliffs sit across a range of incomes. This page answers one person's question about one offer: what changes each month after the raise, when each benefit actually adjusts, the wage that clears the cliff, and what to do next. For a deeper look at your county, use the state's simulator too.</p>
<h2 class="section" style="margin-top:32px">Sources and assumptions</h2>
<p class="lede">Every number this page uses and where it comes from. Figures current as of November 2026. "Estimate" means the state has not published an official figure yet.</p>
<table class="sources">
<thead><tr><th>What</th><th>Value used</th><th>Source</th><th>Status</th></tr></thead>
<tbody id="sourcesBody"></tbody>
</table>
<p class="lede" style="margin-top:16px">Simplifications: tax credits are spread evenly across the year instead of arriving at tax time; marketplace deductibles and copays are not included; the child care copay assumes care about 21.7 days a month and that CCAP covers the provider's full rate (providers can charge extra); Kentucky's transitional child care (six months of reduced help after passing the income limit) is not modeled.</p>
</section>
<footer class="wrap">
<p><strong>For educational use only.</strong> This page is a learning tool built for the Kentucky PFM Challenge. It is not financial, tax, legal, or benefits advice, and it may be wrong or out of date. Benefit rules depend on your full situation. Before you accept or turn down a raise, confirm with your caseworker, the Kentucky Cabinet for Health and Family Services, or a qualified professional.</p>
<p>Your numbers never leave this page. Nothing is sent anywhere. This page uses no outside services and needs no API key.</p>
<p>Made by Ryder Kettering, University of Kentucky. Copyright (c) 2026 Ryder Kettering. Released under the MIT License (full text at the top of this file). No outside code is used.</p>
</footer>
<script>
// ===================== CALC-START =====================
// All rules live here so they can be checked and updated in one place. Figures as of November 2026.
// status: "verified" = checked against the cited source; "estimate" = still needs an official number.
const RULES = {
fpl: {
base: 15960, perPerson: 5680,
label: "Federal poverty guideline, 2026",
show: "$15,960 for 1 person + $5,680 per added person ($27,320 for 3)",
source: "HHS, Federal Register, Jan 15, 2026", status: "verified"
},
fplAca: {
base: 15650, perPerson: 5500,
label: "Poverty guideline used for 2026 marketplace help",
show: "2025 guidelines: $15,650 + $5,500 per added person",
source: "Marketplace credits use the prior year's guidelines (IRS §36B)", status: "verified"
},
fica: { rate: 0.0765, label: "Social Security and Medicare (FICA)", show: "7.65% of wages", source: "IRS", status: "verified" },
fedStdHoH: { value: 24150, label: "Federal standard deduction, head of household, 2026", show: "$24,150", source: "IRS Rev. Proc. 2025-32", status: "verified" },
fedBracketsHoH: {
value: [[24800, 0.10], [100800, 0.12], [211400, 0.22], [Infinity, 0.24]],
label: "Federal tax brackets, head of household, 2026", show: "10% to $24,800; 12% to $100,800; 22% to $211,400",
source: "IRS Rev. Proc. 2025-32", status: "verified"
},
ctc: { perChild: 2200, refundableMax: 1700, refundRate: 0.15, refundFloor: 2500,
label: "Child Tax Credit, 2026", show: "$2,200 per child; up to $1,700 refundable, at 15% of earnings over $2,500",
source: "IRS Rev. Proc. 2025-32; IRC §24(d)", status: "verified" },
eitc: {
// kids: [phase-in rate, earned income amount, max credit, phase-out start (non-joint), phase-out rate]
table: { 0: [0.0765, 8680, 664, 10860, 0.0765], 1: [0.34, 13020, 4427, 23890, 0.1598],
2: [0.40, 18290, 7316, 23890, 0.2106], 3: [0.45, 18290, 8231, 23890, 0.2106] },
label: "Earned Income Tax Credit, 2026", show: "2 kids: max $7,316, shrinks 21.06 cents per dollar above $23,890",
source: "IRS Rev. Proc. 2025-32", status: "verified"
},
kyRate: { value: 0.035, label: "Kentucky income tax", show: "3.5% flat", source: "Kentucky Dept. of Revenue; rate cut effective Jan 1, 2026", status: "verified" },
kyStd: { value: 3360, label: "Kentucky standard deduction, 2026", show: "$3,360", source: "Kentucky Dept. of Revenue announcement (Sep 4, 2025)", status: "verified" },
kyFstc: {
steps: [[1.00, 1.0], [1.04, 0.9], [1.08, 0.8], [1.12, 0.7], [1.16, 0.6], [1.20, 0.5], [1.24, 0.4], [1.27, 0.3], [1.30, 0.2], [1.33, 0.1]],
label: "Kentucky Family Size Tax Credit", show: "Erases state tax at or below the poverty line, stepping down to zero above 133% of it (family of 4+ uses the family-of-4 line)",
source: "Kentucky Schedule ITC (thresholds track the poverty guideline)", status: "verified"
},
localTax: { value: 0.0225, label: "Local wage tax (default: Lexington-Fayette)", show: "2.25% of gross wages; change it under Work and savings for other cities and counties", source: "LFUCG Revenue Division", status: "verified" },
medicaidAdult: { value: 1.38, label: "Medicaid limit, adults", show: "138% of poverty line", source: "Kentucky Medicaid (ACA expansion)", status: "verified" },
kchip: { value: 2.18, label: "Medicaid and KCHIP limit, children", show: "Up to 218% of poverty line; kids keep coverage 12 months once enrolled", source: "kynect Medicaid FPL chart (effective Apr 1, 2026); CMS 12-month continuous eligibility rule (Jan 2024)", status: "verified" },
acaPct: {
// [FPL ratio upper bound, start %, end %] for straight-line interpolation within each band
table: [[1.33, 0.021, 0.021], [1.50, 0.0314, 0.0419], [2.00, 0.0419, 0.066], [2.50, 0.066, 0.0844], [3.00, 0.0844, 0.0996], [4.00, 0.0996, 0.0996]],
label: "Marketplace premium cap (share of income), 2026", show: "2.10% to 9.96% of income; no help above 400% of poverty line",
source: "IRS Rev. Proc. 2025-25; enhanced credits expired after 2025", status: "verified"
},
benchmark: { adult: 524, child: 353, label: "Benchmark silver plan premium (monthly, before help)", show: "$524 for a 30-year-old, $353 per child (Kentucky 2026 average of $590 at age 40, scaled by the federal age curve)", source: "KFF Marketplace Average Benchmark Premiums, 2026; CMS default age curve. Fayette County quotes may differ.", status: "verified" },
snap: {
grossLimitBbce: 2.00, reportLimit: 1.30, earnedDeduction: 0.20, shelterCap: 769, sua: 402, minBenefit: 25,
stdDeduction: { 1: 217, 2: 217, 3: 217, 4: 229, 5: 268, 6: 308 },
maxAllot: { 1: 306, 2: 562, 3: 808, 4: 1023, 5: 1217, 6: 1463 },
label: "SNAP, Oct 2026 to Sep 2027", show: "Kentucky limit 200% of poverty line (no net-income test); max $808 for 3; deduction $217; shelter cap $769",
source: "USDA FY2027 COLA memo; USDA BBCE chart (Jun 2026); 7 CFR 273.9", status: "verified"
},
snapSua: { value: 402, label: "Kentucky SNAP utility allowance", show: "$402 if you pay your own heating or cooling bill (since H.R. 1, you must show the bill)", source: "Amount: unofficial estimate, Kentucky has not posted FY2027 figures. Rule: H.R. 1 (2025), via FRAC", status: "estimate" },
snapReport: { label: "When SNAP must be told about a raise", show: "Only once gross pay passes 130% of poverty line; report within 10 days of month end", source: "7 CFR 273.12(a)(5)", status: "verified" },
ccap: {
smi85Monthly: { 2: 4639, 3: 5731, 4: 6822, 5: 7914, 6: 9005, 7: 9210, 8: 9414 }, careDays: 21.67,
label: "Child Care Assistance (CCAP)", show: "Limit 85% of state median income ($5,731/mo for 3); daily family copay from state chart; copay locked for the 12-month eligibility period",
source: "922 KAR 2:160 §8, §9, §11; CHFS CCAP fact sheet (2025 SMI); 45 CFR 98.21(a)(3) bars raising a copay during the 12-month period (unchanged by the 2026 federal rule)", status: "verified"
}
};
function householdSize(inp) { return 1 + inp.kidsDaycare + inp.kidsSchool; }
function fplAnnual(size) { return RULES.fpl.base + RULES.fpl.perPerson * (size - 1); }
function fplAcaAnnual(size) { return RULES.fplAca.base + RULES.fplAca.perPerson * (size - 1); }
function federalTax(gross, kids) {
const taxable = Math.max(0, gross - RULES.fedStdHoH.value);
let tax = 0, lower = 0;
for (const [upper, rate] of RULES.fedBracketsHoH.value) {
if (taxable > lower) tax += (Math.min(taxable, upper) - lower) * rate;
lower = upper;
}
const c = RULES.ctc;
const ctcTotal = c.perChild * kids;
const nonRef = Math.min(ctcTotal, tax);
const refundable = Math.min(ctcTotal - nonRef, c.refundableMax * kids, c.refundRate * Math.max(0, gross - c.refundFloor));
const e = RULES.eitc.table[Math.min(kids, 3)];
const eitc = Math.max(0, Math.min(e[2], e[0] * gross) - e[4] * Math.max(0, gross - e[3]));
return { incomeTax: tax, ctc: nonRef + refundable, eitc: eitc };
}
function kentuckyTax(gross, size) {
const base = RULES.kyRate.value * Math.max(0, gross - RULES.kyStd.value);
const r = gross / fplAnnual(Math.min(size, 4));
let creditPct = 0;
for (const [upper, pct] of RULES.kyFstc.steps) { if (r <= upper) { creditPct = pct; break; } }
return base * (1 - creditPct);
}
function acaPctFor(r) {
let lower = 0;
for (const [upper, start, end] of RULES.acaPct.table) {
if (r <= upper) {
if (lower === 0) return start;
return start + (end - start) * Math.min(1, Math.max(0, (r - lower) / (upper - lower)));
}
lower = upper;
}
return null; // above the cliff: no help
}
// Monthly cost of health coverage. keepKids = kids still inside their 12-month continuous coverage.
function healthCost(gross, inp, keepKids) {
const size = householdSize(inp);
const kids = inp.kidsDaycare + inp.kidsSchool;
const r = gross / fplAnnual(size);
const adultCovered = inp.onMedicaid && r <= RULES.medicaidAdult.value;
const kidsCovered = inp.onMedicaid && (keepKids || r <= RULES.kchip.value);
if (adultCovered && (kidsCovered || kids === 0)) return { monthly: 0, adultCovered, kidsCovered };
const benchmark = (adultCovered ? 0 : RULES.benchmark.adult) + (kidsCovered ? 0 : RULES.benchmark.child * kids);
const pct = acaPctFor(gross / fplAcaAnnual(size));
const monthly = pct === null ? benchmark : Math.min(benchmark, pct * gross / 12);
return { monthly, adultCovered, kidsCovered };
}
function careCost(inp) { return inp.kidsDaycare * inp.daycareCost + inp.kidsSchool * inp.schoolCost; }
// Kentucky's daily family copay chart (922 KAR 2:160 §11)
function ccapDailyCopay(grossM, size) {
if (grossM < 1600) return 0;
const band = Math.floor((grossM - 1600) / 300) + 1;
const offset = { 2: 3, 3: 2, 4: 1, 5: 0, 6: -1 };
let daily = size <= 6 ? band + offset[Math.max(2, size)] : band - 1 - (size - 6);
daily = Math.max(0, daily);
if (size > 5) daily = Math.min(25, daily);
return daily;
}
function ccapOutOfPocket(gross, inp) {
const size = householdSize(inp);
const full = careCost(inp);
if (!inp.onCcap || full === 0) return { monthly: full, eligible: false };
const c = RULES.ccap;
const limit = c.smi85Monthly[Math.min(Math.max(size, 2), 8)] + Math.max(0, size - 8) * 205;
if (gross / 12 > limit) return { monthly: full, eligible: false };
return { monthly: Math.min(full, ccapDailyCopay(gross / 12, size) * c.careDays), eligible: true };
}
function snapBenefit(gross, inp, careOOP) {
if (!inp.onSnap) return 0;
const s = RULES.snap;
const size = householdSize(inp);
const fplM = fplAnnual(size) / 12;
const grossM = gross / 12;
if (grossM > s.grossLimitBbce * fplM) return 0; // Kentucky's broad-based limit; no net-income test below it
const adj = Math.max(0, grossM * (1 - s.earnedDeduction) - s.stdDeduction[Math.min(size, 6)] - careOOP);
const shelter = inp.rent + (inp.paysUtilities ? RULES.snapSua.value : 0);
const excess = Math.min(s.shelterCap, Math.max(0, shelter - 0.5 * adj));
const net = Math.max(0, adj - excess);
const benefit = Math.round(s.maxAllot[Math.min(size, 6)] - 0.3 * net);
if (benefit <= 0) return size <= 2 ? s.minBenefit : 0;
return Math.max(benefit, size <= 2 ? s.minBenefit : 0);
}
function mustReportSnap(gross, inp) {
return inp.onSnap && gross / 12 > RULES.snap.reportLimit * fplAnnual(householdSize(inp)) / 12;
}
// Full monthly picture at a given hourly wage
function monthly(wage, inp, opts) {
opts = opts || {};
const size = householdSize(inp);
const kids = inp.kidsDaycare + inp.kidsSchool;
const gross = wage * inp.hours * 52;
const fed = federalTax(gross, kids);
const fica = RULES.fica.rate * gross;
const ky = kentuckyTax(gross, size);
const local = (inp.localTax === undefined ? RULES.localTax.value : inp.localTax / 100) * gross;
const takeHome = (gross - fica - fed.incomeTax - ky - local) / 12;
const credits = (fed.ctc + fed.eitc) / 12;
const care = ccapOutOfPocket(gross, inp);
const snap = snapBenefit(gross, inp, care.monthly);
const health = healthCost(gross, inp, opts.keepKids);
const left = takeHome + credits + snap - care.monthly - health.monthly - inp.rent - inp.otherBills;
return {
wage, gross, grossM: gross / 12, fplRatio: gross / fplAnnual(size),
takeHome, credits, snap, care: care.monthly, ccapEligible: care.eligible,
health: health.monthly, adultCovered: health.adultCovered, kidsCovered: health.kidsCovered,
rentBills: inp.rent + inp.otherBills, left
};
}
// Month by month: each benefit switches to its post-raise value in the month entered.
// Kids enrolled in Medicaid/KCHIP keep coverage for all 12 months (continuous eligibility).
function timeline(inp) {
const now = monthly(inp.currentWage, inp);
const after = monthly(inp.offerWage, inp);
const afterYear1 = monthly(inp.offerWage, inp, { keepKids: now.kidsCovered });
const months = [];
for (let m = 1; m <= 12; m++) {
const snap = m < inp.snapMonth ? now.snap : afterYear1.snap;
const health = m < inp.medicaidMonth ? now.health : afterYear1.health;
const care = m < inp.ccapMonth ? now.care : afterYear1.care;
const left = after.takeHome + after.credits + snap - care - health - after.rentBills;
months.push({ month: m, left, diff: left - now.left });
}
return { now, after, months };
}
function bridgePlan(inp) {
const t = timeline(inp);
const steadyGap = t.after.left - t.now.left;
let windowSurplus = 0, windowMonths = 0;
for (const m of t.months) { if (m.diff > 0.5 && m.left > t.after.left + 0.5) { windowSurplus += m.diff; windowMonths++; } }
const cushion = inp.savings + windowSurplus;
const monthsCovered = steadyGap < 0 ? cushion / -steadyGap : Infinity;
return { t, steadyGap, windowSurplus, windowMonths, cushion, monthsCovered,
snapReport: t.now.snap > 0 && mustReportSnap(t.after.gross, inp) };
}
// Lowest wage at or above the offer that leaves you at least as well off as now, and stays that way
function clearingWage(inp) {
const target = monthly(inp.currentWage, inp).left;
for (let w = inp.offerWage; w <= inp.offerWage + 25; w = Math.round((w + 0.05) * 100) / 100) {
let ok = true;
for (let k = w; k <= w + 3; k = Math.round((k + 0.25) * 100) / 100) {
if (monthly(k, inp).left < target) { ok = false; break; }
}
if (ok) return w;
}
return null;
}
// ===================== CALC-END =====================
// ---------- State ----------
const DEFAULTS = {
currentWage: 16, offerWage: 19, hours: 40,
kidsDaycare: 1, kidsSchool: 1,
daycareCost: 900, schoolCost: 350, rent: 1100, otherBills: 600,
onMedicaid: true, onSnap: true, onCcap: true, paysUtilities: true,
snapMonth: 3, medicaidMonth: 3, ccapMonth: 12, savings: 300, localTax: 2.25
};
const NUM_FIELDS = {
currentWage: [7.25, 60], offerWage: [7.25, 60], hours: [1, 80],
kidsDaycare: [0, 4], kidsSchool: [0, 4],
daycareCost: [0, 5000], schoolCost: [0, 5000], rent: [0, 10000], otherBills: [0, 10000],
snapMonth: [1, 12], medicaidMonth: [1, 12], ccapMonth: [1, 12], savings: [0, 100000], localTax: [0, 5]
};
const BOOL_FIELDS = ["onMedicaid", "onSnap", "onCcap", "paysUtilities"];
let state = Object.assign({}, DEFAULTS);
let dirty = false;
const $ = id => document.getElementById(id);
const money = (v, sign) => {
const s = Math.round(Math.abs(v)).toLocaleString("en-US");
if (sign) return (v > 0.5 ? "+$" : v < -0.5 ? "−$" : "$") + s;
return (v < -0.5 ? "−$" : "$") + s;
};
function writeInputs() {
for (const k of Object.keys(NUM_FIELDS)) $(k).value = state[k];
for (const k of BOOL_FIELDS) $(k).checked = state[k];
}
function readInputs() {
const next = Object.assign({}, state);
for (const [k, [lo, hi]] of Object.entries(NUM_FIELDS)) {
const v = parseFloat($(k).value);
if (!isNaN(v)) next[k] = Math.min(hi, Math.max(lo, v));
}
for (const k of BOOL_FIELDS) next[k] = $(k).checked;
["kidsDaycare", "kidsSchool", "snapMonth", "medicaidMonth", "ccapMonth"].forEach(k => next[k] = Math.round(next[k]));
if (next.kidsDaycare + next.kidsSchool > 5) next.kidsSchool = 5 - next.kidsDaycare;
return next;
}
// ---------- Rendering ----------
function render() {
const b = bridgePlan(state);
const { now, after } = b.t;
const gap = b.steadyGap;
const big = $("bigNumber");
const even = Math.abs(gap) < 5;
big.textContent = even ? "about even each month" : gap > 0 ? `${money(gap)} a month ahead` : `${money(-gap)} a month behind`;
big.className = "result " + (even ? "" : gap > 0 ? "good" : "bad");
const cwHero = clearingWage(state);
const isRaise = state.offerWage > state.currentWage + 0.001;
$("verdict").textContent = !isRaise
? "Enter an offer higher than your current pay to test a raise."
: even ? "That is after taxes, tax credits, and every benefit change. The extra pay and the help you lose about cancel out."
: gap > 0 ? "That is after taxes, tax credits, and every benefit change. You keep more than you do today."
: "That is after taxes, tax credits, and every benefit change. The raise is real, but the help you lose is bigger." +
(cwHero !== null && cwHero > state.offerWage + 0.001 ? ` To come out ahead, you would need about $${cwHero.toFixed(2)} an hour.` : "");
$("colNow").textContent = `Now ($${state.currentWage.toFixed(2)})`;
$("colRaise").textContent = `After raise ($${state.offerWage.toFixed(2)})`;
const rows = [
["Pay after taxes", now.takeHome, after.takeHome],
["Tax credits (EITC and Child Tax Credit, per month)", now.credits, after.credits],
["SNAP", now.snap, after.snap],
["Child care you pay", -now.care, -after.care],
["Health coverage you pay", -now.health, -after.health],
["Rent and other bills", -now.rentBills, -after.rentBills]
];
let html = "";
for (const [name, a, c] of rows) {
const d = c - a;
html += `<tr><td>${name}</td><td>${money(a)}</td><td>${money(c)}</td><td class="${d > 0.5 ? "pos" : d < -0.5 ? "neg" : ""}">${money(d, true)}</td></tr>`;
}
html += `<tr class="total"><td>Left each month</td><td>${money(now.left)}</td><td>${money(after.left)}</td><td class="${gap >= 0 ? "pos" : "neg"}">${money(gap, true)}</td></tr>`;
$("compareBody").innerHTML = html;
drawTimeline(b);
drawCliff();
if (!isRaise) {
const msg = "Enter an offer higher than your current pay to see what a raise would do.";
$("bridgePlan").textContent = msg;
$("askFor").textContent = msg;
$("planSteps").innerHTML = `<li><strong>Enter the raise you were offered.</strong>Put your current pay and the new hourly rate in the highlighted boxes at the top of the page.</li>`;
$("caseworkerQs").innerHTML = "";
return;
}
$("bridgePlan").innerHTML = bridgeText(b);
$("askFor").innerHTML = askText();
renderPlan(b);
}
function bridgeText(b) {
const gap = b.steadyGap;
if (gap > -5) return `<strong>No bridge needed.</strong> Once every benefit adjusts, you are ${gap >= 5 ? `about ${money(gap)} a month ahead` : "about even with today"}.`;
let txt = "";
if (b.windowMonths > 0) {
txt += `<strong>Your bridge window:</strong> for ${b.windowMonths} month${b.windowMonths > 1 ? "s" : ""}, your benefits have not caught up with the raise yet, so you are ahead. Bank that extra ${money(b.windowSurplus)} instead of spending it. `;
} else {
txt += `<strong>No bridge window:</strong> with these dates, your benefits change about as fast as your pay does. `;
}
const mc = b.monthsCovered;
txt += `After that you are ${money(-gap)} a month short. Your savings plus what you bank (${money(b.cushion)}) covers about <strong>${mc >= 1 ? Math.floor(mc) : "less than 1"} month${Math.floor(mc) === 1 ? "" : "s"}</strong> of that gap. To come out ahead for good, the raise needs to be bigger.`;
return txt;
}
function bestBelowOffer(inp) {
const target = monthly(inp.currentWage, inp).left;
let best = null, bestLeft = target + 1;
for (let w = Math.round((inp.currentWage + 0.25) * 100) / 100; w < inp.offerWage; w = Math.round((w + 0.25) * 100) / 100) {
const l = monthly(w, inp).left; if (l > bestLeft) { bestLeft = l; best = w; }
}
return best;
}
// First wage above the offer where you would fall behind today (the next cliff), if any
function nextCliff(inp) {
const target = monthly(inp.currentWage, inp).left;
for (let w = Math.round((inp.offerWage + 0.05) * 100) / 100; w <= inp.offerWage + 25; w = Math.round((w + 0.05) * 100) / 100) {
if (monthly(w, inp).left < target - 0.5) return w;
}
return null;
}
function askText() {
const target = monthly(state.currentWage, state).left;
const offerGap = monthly(state.offerWage, state).left - target;
if (offerGap > -5) {
const c = nextCliff(state);
const head = offerGap >= 5 ? "<strong>This offer keeps you ahead.</strong>" : "<strong>This offer about breaks even.</strong>";
if (c === null) return `${head} Higher raises on the chart keep you ahead too.`;
const back = clearingWage(Object.assign({}, state, { offerWage: c }));
return `${head} Watch your next raise, though: anywhere from about $${c.toFixed(2)}${back ? ` to $${back.toFixed(2)}` : ""} an hour would leave you behind once benefits adjust.${back ? ` If a future offer lands in that range, ask for at least $${back.toFixed(2)}.` : ""}`;
}
const w = clearingWage(state);
if (w === null) return "Within $25 an hour of this offer, no wage leaves you better off than today. Double-check your numbers.";
return `<strong>Ask for at least $${w.toFixed(2)} an hour.</strong> That is the lowest wage at or above the offer where you keep as much as you do now. Between $${state.offerWage.toFixed(2)} and $${w.toFixed(2)}, the extra pay mostly goes to replacing benefits you lose. ${(() => { const best = bestBelowOffer(state); return best ? `Smaller raises can still help: at $${best.toFixed(2)} you would keep more than you do now.` : ``; })()}`;
}
// ---------- Charts (plain SVG, no libraries) ----------
function svgEl(tag, attrs, text) {
const e = document.createElementNS("http://www.w3.org/2000/svg", tag);
for (const [k, v] of Object.entries(attrs)) e.setAttribute(k, v);
if (text !== undefined) e.textContent = text;
return e;
}
function niceRange(lo, hi) {
const pad = Math.max(50, (hi - lo) * 0.12);
return [Math.floor((lo - pad) / 100) * 100, Math.ceil((hi + pad) / 100) * 100];
}
function drawTimeline(b) {
const svg = $("timelineChart");
svg.innerHTML = "";
const W = 640, H = 250, L = 60, R = 10, T = 16, B = 46;
const vals = b.t.months.map(m => m.diff).concat([0]);
let lo = Math.min(...vals), hi = Math.max(...vals);
const span = Math.max(100, hi - lo);
const step = [25, 50, 100, 200, 250, 500, 1000].find(s => span / s <= 4) || 1000;
lo = Math.floor(lo / step) * step - (lo < 0 ? step : 0); hi = Math.ceil(hi / step) * step + step;
const nTicks = Math.round((hi - lo) / step);
const y = v => T + (hi - v) / (hi - lo) * (H - T - B);
const slot = (W - L - R) / 12;
for (let i = 0; i <= nTicks; i++) {
const v = lo + step * i;
svg.appendChild(svgEl("line", { x1: L, x2: W - R, y1: y(v), y2: y(v), stroke: "#e7eae4" }));
svg.appendChild(svgEl("text", { x: L - 6, y: y(v) + 4, "text-anchor": "end", "font-size": 11, fill: "#59656b" }, money(v, true)));
}
b.t.months.forEach((m, i) => {
const x = L + i * slot + slot * 0.18, w = slot * 0.64;
const y1 = y(Math.max(0, m.diff)), y2 = y(Math.min(0, m.diff));
svg.appendChild(svgEl("rect", { x, y: y1, width: w, height: Math.max(1, y2 - y1), fill: m.diff >= 0 ? "#11865b" : "#c8412b", rx: 2 }));
svg.appendChild(svgEl("text", { x: x + w / 2, y: m.diff >= 0 ? y1 - 4 : y2 + 12, "text-anchor": "middle", "font-size": 10, fill: "#17242b" }, money(m.diff, true)));
svg.appendChild(svgEl("text", { x: x + w / 2, y: H - 26, "text-anchor": "middle", "font-size": 11, fill: "#59656b" }, String(m.month)));
});
svg.appendChild(svgEl("text", { x: (L + W - R) / 2, y: H - 6, "text-anchor": "middle", "font-size": 11, fill: "#59656b" }, "Months after the raise starts"));
svg.appendChild(svgEl("line", { x1: L, x2: W - R, y1: y(0), y2: y(0), stroke: "#17242b", "stroke-width": 1.5 }));
}
function drawCliff() {
const svg = $("cliffChart");
svg.innerHTML = "";
const W = 640, H = 270, L = 60, R = 14, T = 14, B = 44;
const wMin = Math.max(7.25, Math.floor(state.currentWage - 4)), wMax = Math.ceil(Math.max(state.offerWage, state.currentWage) + 12);
const pts = [];
for (let w = wMin; w <= wMax + 1e-9; w += 0.1) pts.push([w, monthly(w, state).left]);
const vals = pts.map(p => p[1]);
const [lo, hi] = niceRange(Math.min(...vals), Math.max(...vals));
const x = w => L + (w - wMin) / (wMax - wMin) * (W - L - R);
const y = v => T + (hi - v) / (hi - lo) * (H - T - B);
for (let i = 0; i <= 4; i++) {
const v = lo + (hi - lo) * i / 4;
svg.appendChild(svgEl("line", { x1: L, x2: W - R, y1: y(v), y2: y(v), stroke: "#e7eae4" }));
svg.appendChild(svgEl("text", { x: L - 6, y: y(v) + 4, "text-anchor": "end", "font-size": 11, fill: "#59656b" }, money(v)));
}
const step = (wMax - wMin) > 16 ? 4 : 2;
for (let w = Math.ceil(wMin / step) * step; w <= wMax; w += step) {
svg.appendChild(svgEl("text", { x: x(w), y: H - 24, "text-anchor": "middle", "font-size": 11, fill: "#59656b" }, "$" + w));
}
// baseline: what is left today
const today = monthly(state.currentWage, state).left;
svg.appendChild(svgEl("line", { x1: L, x2: W - R, y1: y(today), y2: y(today), stroke: "#59656b", "stroke-dasharray": "4 4" }));
svg.appendChild(svgEl("text", { x: W - R, y: y(today) - 6, "text-anchor": "end", "font-size": 11, fill: "#59656b" }, "What you have today"));
svg.appendChild(svgEl("polyline", { points: pts.map(p => x(p[0]).toFixed(1) + "," + y(p[1]).toFixed(1)).join(" "), fill: "none", stroke: "#17242b", "stroke-width": 2, "stroke-linejoin": "round" }));
const marks = [[state.currentWage, "Now", "#17242b"], [state.offerWage, "Offer", "#c8412b"]];
const cw = clearingWage(state);
if (cw !== null && cw > state.offerWage + 0.001) marks.push([cw, "Clears it", "#11865b"]);
marks.forEach(([w, label, color]) => {
const v = monthly(w, state).left;
svg.appendChild(svgEl("circle", { cx: x(w), cy: y(v), r: 6, fill: color, stroke: "#fcfcfa", "stroke-width": 2 }));
svg.appendChild(svgEl("text", { x: x(w), y: y(v) + 22, "text-anchor": "middle", "font-size": 12, "font-weight": 700, fill: "#17242b" }, label));
});
svg.appendChild(svgEl("text", { x: (L + W - R) / 2, y: H - 4, "text-anchor": "middle", "font-size": 11, fill: "#59656b" }, "Hourly wage"));
// Hover layer: read any wage on the line
const tip = svgEl("g", { class: "tip", visibility: "hidden" });
const vline = svgEl("line", { y1: T, y2: H - B, stroke: "#59656b", "stroke-width": 1 });
const dot = svgEl("circle", { r: 5, fill: "#17242b", stroke: "#fcfcfa", "stroke-width": 2 });
const box = svgEl("rect", { width: 186, height: 46, rx: 4, fill: "#17242b" });
const t1 = svgEl("text", { "font-size": 12, "font-weight": 700, fill: "#fcfcfa" });
const t2 = svgEl("text", { "font-size": 12, fill: "#fcfcfa" });
[vline, dot, box, t1, t2].forEach(el => tip.appendChild(el));
svg.appendChild(tip);
const hit = svgEl("rect", { x: L, y: T, width: W - L - R, height: H - T - B, fill: "transparent" });
svg.appendChild(hit);
const move = ev => {
const r = svg.getBoundingClientRect();
const px = (ev.clientX - r.left) * (W / r.width);
const w = Math.min(wMax, Math.max(wMin, Math.round((wMin + (px - L) / (W - L - R) * (wMax - wMin)) * 4) / 4));
const v = monthly(w, state).left, d = v - today;
const cx = x(w), cy = y(v);
vline.setAttribute("x1", cx); vline.setAttribute("x2", cx);
dot.setAttribute("cx", cx); dot.setAttribute("cy", cy);
const bx = cx + 200 > W ? cx - 196 : cx + 10, by = Math.max(T, Math.min(cy - 52, H - B - 46));
box.setAttribute("x", bx); box.setAttribute("y", by);
t1.setAttribute("x", bx + 10); t1.setAttribute("y", by + 19); t1.textContent = `At $${w.toFixed(2)} an hour`;
t2.setAttribute("x", bx + 10); t2.setAttribute("y", by + 36); t2.textContent = `${money(v)} left, ${money(d, true)} vs. today`;
tip.setAttribute("visibility", "visible");
};
hit.addEventListener("pointermove", move);
hit.addEventListener("pointerdown", move);
hit.addEventListener("pointerleave", () => tip.setAttribute("visibility", "hidden"));
}
function renderPlan(b) {
const { now, after } = b.t;
const afterKids = monthly(state.offerWage, state, { keepKids: now.kidsCovered });
const w = clearingWage(state);
const gap = b.steadyGap;
const steps = [];
const d = v => money(v);
if (gap < 0 && w !== null && w > state.offerWage + 0.001) {
steps.push(`<strong>Before you say yes, ask for $${w.toFixed(2)} an hour.</strong>At $${state.offerWage.toFixed(2)} you end up about ${d(-gap)} a month behind. You do not have to mention benefits to ask. For example:<span class="script">"I'm excited about this role. Before I accept, can we talk about the rate? I was hoping for something closer to $${w.toFixed(2)} an hour. That's the number where this move really works for my family."</span>`);
steps.push(`<strong>If the answer is no, you can still take it with a plan.</strong>The steps below get you through the change. Or ask whether the raise could come in stages, since a smaller first step can keep you ahead (see the note under the wage chart).`);
} else if (gap >= 5) {
steps.push(`<strong>This raise works. Take it.</strong>Once every benefit adjusts, you keep about ${d(gap)} more a month than today. Before your next raise, read the note under the wage chart.`);
} else if (gap > -5) {
steps.push(`<strong>This raise about breaks even.</strong>Once benefits adjust, you keep roughly what you have today. It can still be worth taking for the experience and the next step up, but ask for more if you can. The note under the wage chart shows how much.`);
} else {
steps.push(`<strong>Think hard before accepting.</strong>No wage within $25 of this offer gets you back to today's level. Double-check your numbers with your caseworker.`);
}
if (state.onSnap && now.snap > 0) {
if (b.snapReport) {
steps.push(`<strong>Report the raise to SNAP by the 10th of the month after your first month at the new pay.</strong>Your SNAP goes from about ${d(now.snap)} to ${d(after.snap)} a month. Reporting on time keeps you from owing money back later. It puts you over SNAP's reporting line (130% of the poverty line). Report it once through kynect, by phone, or at your DCBS office, and the same report updates your Medicaid and KCHIP too.`);
} else {
steps.push(`<strong>You do not have to report this raise to SNAP right away.</strong>It keeps you under the reporting line (130% of the poverty line). Your SNAP adjusts to about ${d(after.snap)} a month at your next renewal or six-month report.`);
}
}
if (b.windowSurplus > 0.5 && gap < 0) {
steps.push(`<strong>Bank the first ${b.windowMonths} month${b.windowMonths > 1 ? "s" : ""} of extra money: about ${d(b.windowSurplus)}.</strong>Your benefits lag behind your raise at first. That money is your cushion for when they catch up. Together with your savings, it covers about ${Math.floor(b.monthsCovered)} month${Math.floor(b.monthsCovered) === 1 ? "" : "s"} of the shortfall.`);
}
if (state.onMedicaid && now.adultCovered && !after.adultCovered) {
steps.push(`<strong>When your Medicaid ends, pick a marketplace plan on kynect within 60 days.</strong>Losing Medicaid lets you sign up outside open enrollment. With the premium tax credit, a benchmark silver plan should cost you about ${d(after.health)} a month.`);
}
if (state.onMedicaid && now.kidsCovered) {
if (after.kidsCovered) steps.push(`<strong>Your kids keep their Medicaid or KCHIP.</strong>At the new pay they still qualify, and once enrolled they are covered for 12 months either way.`);
else steps.push(`<strong>Your kids stay covered for 12 months, then will need a new plan.</strong>The new pay is over the KCHIP limit, so at their next renewal plan for about ${d(after.health - afterKids.health)} more a month in premiums.`);
}
if (state.onCcap && now.ccapEligible && careCost(state) > 0) {
if (after.ccapEligible) steps.push(`<strong>Your child care copay stays at ${d(now.care)} a month until your next CCAP renewal.</strong>At renewal it goes to about ${d(after.care)} a month. Mark that month on your calendar.`);
else steps.push(`<strong>The new pay is over the CCAP income limit, so your help can end once you report the raise.</strong>Ask DCBS about Transitional Child Care, which gives six more months of reduced help. Full price for your care is ${d(careCost(state))} a month.`);
}
$("planSteps").innerHTML = steps.map(s => `<li>${s}</li>`).join("");
const qs = [];
if (state.onSnap && now.snap > 0) qs.push("If I report this raise, which month will my SNAP change?");
if (state.onMedicaid) qs.push("When would my Medicaid end, and will I get a notice first?");
if (state.onCcap) qs.push("When is my next CCAP renewal, and what will my copay be after it?");
qs.push("Is there anything about my situation this tool would miss?");
$("caseworkerQs").innerHTML = qs.map(q => `<li>${q}</li>`).join("");
}
function renderSources() {
let html = "";
for (const r of Object.values(RULES)) {
html += `<tr><td>${r.label}</td><td>${r.show}</td><td>${r.source}</td><td><span class="badge ${r.status}">${r.status === "verified" ? "Verified" : "Estimate"}</span></td></tr>`;
}
$("sourcesBody").innerHTML = html;
}
// ---------- Save / open ----------
function showError(msg) { const e = $("errorBox"); e.textContent = msg; e.style.display = msg ? "block" : "none"; }
function setStatus(msg) { $("saveStatus").textContent = msg; }
function saveFile() {
const data = { app: "the-raise-test", version: 1, saved: new Date().toISOString(), inputs: state };
const blob = new Blob([JSON.stringify(data, null, 2)], { type: "application/json" });
const a = document.createElement("a");
a.href = URL.createObjectURL(blob);
a.download = "my-raise-test.json";
document.body.appendChild(a);
a.click();
setTimeout(() => { URL.revokeObjectURL(a.href); a.remove(); }, 1000);
dirty = false;
setStatus("Saved to your downloads.");
showError("");
}
function validate(data) {
if (!data || typeof data !== "object") return "That file is not a saved Raise Test file.";
if (data.app !== "the-raise-test") return "That file was not made by The Raise Test.";
if (data.version !== 1) return "That file is from a version of The Raise Test this page can't read.";
const inp = data.inputs;
if (!inp || typeof inp !== "object") return "That file is missing your numbers.";
for (const [k, [lo, hi]] of Object.entries(NUM_FIELDS)) {
if (typeof inp[k] !== "number" || !isFinite(inp[k]) || inp[k] < lo || inp[k] > hi) return `That file has a bad value for "${k}".`;
}
for (const k of BOOL_FIELDS) if (typeof inp[k] !== "boolean") return `That file has a bad value for "${k}".`;
return null;
}
function openFile(file) {
const reader = new FileReader();
reader.onload = () => {
let data;
try { data = JSON.parse(reader.result); }
catch (e) { showError("That file could not be read. Your current numbers have not been changed."); return; }
if (data && data.inputs && typeof data.inputs === "object") {
// Files saved by earlier versions of this page lack these fields
if (data.inputs.paysUtilities === undefined) data.inputs.paysUtilities = true;
if (data.inputs.localTax === undefined) data.inputs.localTax = 2.25;
}
const problem = validate(data);
if (problem) { showError(problem + " Your current numbers have not been changed."); return; }
const next = {};
for (const k of Object.keys(NUM_FIELDS)) next[k] = data.inputs[k];
for (const k of BOOL_FIELDS) next[k] = data.inputs[k];
state = next;
writeInputs();
render();
dirty = false;
showError("");
setStatus("Opened " + file.name + ".");
};
reader.onerror = () => showError("That file could not be opened. Your current numbers have not been changed.");
reader.readAsText(file);
}
// ---------- Wiring ----------
document.querySelectorAll("input[type=number], input[type=checkbox]").forEach(el => {
el.addEventListener("input", () => { state = readInputs(); dirty = true; setStatus("Unsaved changes."); render(); });
el.addEventListener("change", () => { state = readInputs(); writeInputs(); render(); });
});
$("saveBtn").addEventListener("click", saveFile);
// Ask for a second click instead of a pop-up, because pop-ups can be blocked inside embedded pages
let pending = null;
function confirmThen(kind, message, run) {
if (!dirty || pending === kind) { pending = null; run(); return; }
pending = kind;
setStatus(message);
setTimeout(() => { if (pending === kind) { pending = null; setStatus(dirty ? "Unsaved changes." : ""); } }, 8000);
}
$("loadBtn").addEventListener("click", () => {
confirmThen("open", "You have unsaved changes. Click Open saved file again to replace them, or save first.", () => {
$("fileInput").value = "";
$("fileInput").click();
});
});
$("fileInput").addEventListener("change", e => { if (e.target.files[0]) openFile(e.target.files[0]); });
$("resetBtn").addEventListener("click", () => {
confirmThen("reset", "You have unsaved changes. Click Reset to example again to clear them, or save first.", () => {
state = Object.assign({}, DEFAULTS); writeInputs(); render(); dirty = false; setStatus(""); showError("");
});
});
window.addEventListener("beforeunload", e => { if (dirty) { e.preventDefault(); e.returnValue = ""; } });
writeInputs();
renderSources();
render();
</script>
</body>
</html>
Websites this page contacts when it runs — fonts, chart libraries, data. Found by reading its source.
Published on Globefin under the MIT License. You may copy, change, and reuse this page, including commercially — just keep the notice below with it.
Copyright © 2026 Ryder Kettering. Licensed under the MIT License. Published on Globefin.
Provided as is, without warranty. Any external libraries it loads keep their own licences. Terms →
Scripts run, but the demo has its own throwaway origin. It can't read your session or cookies, can't reach the page around it, and can't navigate your tab. Don't enter real passwords or personal data into any demo.