The Kentucky Debt-Freedom Plan is a free, interactive financial planning tool designed to help Kentucky households take control of their debt. Users can create a personalized budget, organize their debts, estimate payoff timelines, and see how the debt snowball method can help them become debt-free. The website also provides insights into debt trends in Kentucky and allows users to save their plans privately on their own devices.
<!DOCTYPE html>
<!-- Copyright (c) 2026 Your Name. Released under the MIT License. -->
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='16' fill='%231f5fa8'/%3E%3Cpath d='M7 50L26 17 36 34 42 26 57 50Z' fill='%23fff'/%3E%3Ccircle cx='44' cy='43' r='11' fill='%23fff' stroke='%230b3a6e' stroke-width='3'/%3E%3C/svg%3E">
<title>Kentucky Debt-Freedom Plan</title>
<style>
:root{--ink:#0f2742;--mut:#4a627d;--bg:#f6faff;--card:#fff;--line:#cfdcea;--green:#1f5fa8;--dk:#0b3a6e;--gold:#5aaee8;--red:#a8362a;--tint:#e6f0fa}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.6 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
h1,h2,h3{font-family:"Iowan Old Style","Palatino Linotype",Georgia,serif;line-height:1.2;margin:0 0 .5rem}
h1{font-size:clamp(2rem,5vw,3.2rem);letter-spacing:-.01em}
h2{font-size:1.6rem}h3{font-size:1.1rem}
.wrap{max-width:1120px;margin:0 auto;padding:0 1.25rem}
header{background:linear-gradient(160deg,#0b3a6e,#1f5fa8);color:#fff;padding:3rem 0 2.6rem;border-bottom:5px solid var(--gold)}
header p{max-width:62ch;color:#d6e6f7;font-size:1.08rem;margin:.4rem 0}
header .for{font-size:.95rem;color:#b4cfea}
section{padding:2.8rem 0}
.lead{color:var(--mut);max-width:70ch}
.card{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:1.3rem}
.src{font-size:.82rem;color:var(--mut);margin-top:.8rem}
.stats{display:grid;grid-template-columns:1fr;gap:1.4rem}
.bar{display:grid;grid-template-columns:3.2rem 1fr 4.6rem;align-items:center;gap:.6rem;margin:.35rem 0;font-size:.92rem}
.bar i{display:block;height:20px;background:var(--green);border-radius:3px}
.bar i.us{background:#9db8d4}.bar i.gold{background:var(--gold)}
table{border-collapse:collapse;width:100%;font-size:.92rem}
th,td{text-align:right;padding:.45rem .5rem;border-bottom:1px solid var(--line)}
th:first-child,td:first-child{text-align:left}
th{font-weight:600;color:var(--mut)}
.facts{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem;margin-top:1.4rem}
.facts div{border-left:4px solid var(--gold);padding-left:.9rem}
.facts b{display:block;font:700 1.7rem Georgia,serif;color:var(--dk)}
.facts span{font-size:.9rem;color:var(--mut)}
.plan{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);gap:1.6rem;align-items:start}
fieldset{border:0;padding:0;margin:0 0 1.4rem}
legend{font:700 1.05rem Georgia,serif;margin-bottom:.6rem;color:var(--dk)}
label{display:block;font-size:.88rem;font-weight:600;margin:.6rem 0 .2rem}
input,select{width:100%;font:inherit;padding:.5rem .6rem;border:1.5px solid #b3c6dc;border-radius:7px;background:#fff;color:var(--ink)}
input[type=checkbox]{width:auto}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:.8rem}
.chk{display:flex;gap:.5rem;align-items:center;font-weight:400;margin:.6rem 0}
.drow{display:grid;grid-template-columns:1fr 1fr 1fr;gap:.5rem;align-items:end;margin-bottom:.9rem;padding:.8rem;border:1px solid var(--line);border-radius:10px;background:#f6faff}.drow .nm{grid-column:1/-1}.drow .m{order:4}.drow .x{order:5;grid-column:1/-1;justify-self:end}
.drow label{margin:0 0 .15rem;font-size:.75rem}
.drow .m{grid-column:1/-1;font-size:.82rem;margin:0 0 .5rem;display:flex;gap:.4rem;align-items:center;font-weight:400}
button{font:inherit;font-weight:600;border:0;border-radius:999px;padding:.6rem 1.2rem;cursor:pointer;background:var(--green);color:#fff}
button:hover{background:var(--dk)}
button.ghost{background:#fff;color:var(--dk);border:1.5px solid var(--green)}
button.x{padding:.45rem .7rem;background:#fff;color:var(--red);border:1.5px solid #e1b5af}
.btns{display:flex;flex-wrap:wrap;gap:.6rem;margin-top:.8rem}
:focus-visible{outline:3px solid var(--gold);outline-offset:2px}
.msg{border-radius:8px;padding:.7rem .9rem;margin:.8rem 0;font-size:.92rem}
.msg.bad{background:#fdeceb;border:1px solid #e1a49c;color:#6f1f17}
.msg.ok{background:var(--tint);border:1px solid #9ec3e6;color:#0f3358}
.msg.warn{background:#fff6dc;border:1px solid #e8c766;color:#5b4308}
.big{display:grid;grid-template-columns:1fr 1fr;gap:.8rem;margin-bottom:1rem}
.big div{background:var(--tint);border-radius:8px;padding:.8rem 1rem}
.big b{display:block;font:700 1.45rem Georgia,serif;color:var(--dk)}
.big span{font-size:.85rem;color:var(--mut)}
.tl{margin:.6rem 0 1rem}
.tl div{display:grid;grid-template-columns:8.5rem 1fr;gap:.6rem;align-items:center;font-size:.88rem;margin:.3rem 0}
.tl .track{background:#e4edf7;border-radius:4px;height:22px;position:relative}
.tl .track i{position:absolute;left:0;top:0;bottom:0;background:var(--green);border-radius:4px;min-width:3px}
.tl .track em{position:absolute;right:.4rem;top:0;font-style:normal;font-size:.78rem;line-height:22px;color:#fff;text-shadow:0 0 3px #0b3a6e}
.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem}
.steps .card h3{color:var(--green)}
.empty{color:var(--mut);padding:1rem 0}
footer{background:var(--dk);color:#bcd3ec;padding:2rem 0;font-size:.85rem}
footer a{color:#a9d4f5}
.snow svg{width:100%;height:auto;display:block}
.fl circle{fill:#fff;stroke:#1f5fa8;stroke-width:3}.fl.done circle{fill:#1f5fa8}
.fl text{font:600 13px system-ui,sans-serif;fill:#0b3a6e;text-anchor:middle}.fl.done text{opacity:.45;text-decoration:line-through}
.ctl{display:flex;gap:.9rem;align-items:center;margin-top:.8rem}
.ctl input{flex:1;accent-color:#1f5fa8;padding:0}
.rd{background:var(--tint);border-radius:8px;padding:.8rem 1rem;margin-top:.8rem}
.rd .n{font:700 1.6rem Georgia,serif;color:var(--dk)}
.two{display:grid;grid-template-columns:1fr 1fr;gap:1.4rem;align-items:start}
.card{border-radius:14px;box-shadow:0 6px 22px rgba(11,58,110,.08)}
.snow svg{border-radius:12px}
section{padding:3.2rem 0}
h2{font-size:1.9rem;color:var(--dk)}
header{position:relative;overflow:hidden;padding:0;border-bottom:0;background:radial-gradient(900px 400px at 85% 0,#4a8fd4 0,transparent 70%),linear-gradient(165deg,#082d57,#1f5fa8)}
header .wrap{position:relative;z-index:1}
.brand{display:flex;align-items:center;gap:.8rem;padding:1.1rem 0;font:700 1.05rem/1.15 Georgia,serif;letter-spacing:.01em}
.logo{width:52px;height:52px;flex:none;filter:drop-shadow(0 3px 8px rgba(0,0,0,.25))}
.hero{padding:2.2rem 0 7rem}
.hero h1{font-size:clamp(2.2rem,5.5vw,3.6rem);margin-bottom:1rem}
.ridge{position:absolute;left:0;bottom:-1px;width:100%;height:90px;z-index:0}
.hbtns{margin-top:1.4rem;display:flex;gap:.8rem;flex-wrap:wrap}
.hb{display:inline-block;padding:.7rem 1.5rem;border-radius:999px;border:2px solid rgba(255,255,255,.7);color:#fff;font-weight:600;text-decoration:none}
.hb:hover{background:rgba(255,255,255,.15)}
.hb.main{background:#fff;color:#0b3a6e;border-color:#fff}.hb.main:hover{background:#e6f0fa}
.chips{list-style:none;padding:0;margin:1.4rem 0 0;display:flex;gap:.5rem;flex-wrap:wrap}
.chips li{font-size:.82rem;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.25);border-radius:999px;padding:.25rem .8rem;color:#e4f0fc}
html{scroll-behavior:smooth;scroll-padding-top:1rem}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
@media(max-width:860px){.stats,.two,.facts{grid-template-columns:1fr}}
</style>
</head>
<body>
<header>
<svg class="ridge" viewBox="0 0 1200 90" preserveAspectRatio="none" aria-hidden="true"><path d="M0 60L150 25 260 55 420 10 560 50 700 22 860 58 1000 18 1200 52V90H0Z" fill="#7fb4ea" opacity=".45"/><path d="M0 78L180 50 320 72 520 40 700 70 900 44 1100 70 1200 58V90H0Z" fill="#d9ebfb"/></svg>
<div class="wrap">
<div class="brand"><svg class="logo" viewBox="0 0 64 64" aria-hidden="true"><rect width="64" height="64" rx="16" fill="#fff"/><path d="M7 50 L26 17 L36 34 L42 26 L57 50Z" fill="#1f5fa8"/><path d="M26 17 L19.5 28.5 L26 25 L32 29Z" fill="#fff"/><circle cx="44" cy="43" r="11" fill="#fff" stroke="#0b3a6e" stroke-width="3"/><path d="M38 41Q44 36 50 41M39 47Q44 43 49 47" fill="none" stroke="#9fc4e8" stroke-width="2" stroke-linecap="round"/></svg><span>Kentucky<br>Debt-Freedom Plan</span></div>
<div class="hero">
<h1>Get out of debt.<br>Keep more of what you earn.</h1>
<p>See how Kentuckians borrow, then build a budget that puts every spare dollar toward paying debt off, using the debt snowball method.</p>
<p class="for">Built for a Kentucky household with credit cards, car loans, medical bills or student loans, such as a family on hourly pay that wants to know how fast it can be debt-free.</p>
<div class="hbtns"><a class="hb main" href="#plan">Build my plan</a><a class="hb" href="#how">See how it works</a></div>
<ul class="chips"><li>Free</li><li>Private: nothing leaves your device</li><li>Save your plan to a file</li></ul>
</div></div></header>
<section class="snow" id="how" style="background:linear-gradient(#d9ebfb,#fff 75%)"><div class="wrap">
<h2>How the debt snowball works</h2>
<p class="lead">Drag the slider to roll the snowball down the hill. Every debt it reaches gets paid off, and each time the snowball gets bigger because the freed-up payment rolls onto the next debt.</p>
<div class="card">
<svg viewBox="0 0 800 300" role="img" aria-label="A snowball rolling down a mountain past four debts, growing as each one is paid off">
<defs><linearGradient id="sg" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#9fcdf3"/><stop offset="1" stop-color="#eef7ff"/></linearGradient><linearGradient id="mg" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#e3f0fc"/><stop offset="1" stop-color="#a9cdee"/></linearGradient></defs>
<rect width="800" height="300" fill="url(#sg)"/>
<circle cx="700" cy="55" r="46" fill="#fff" opacity=".55"/><circle cx="700" cy="55" r="26" fill="#fff" opacity=".9"/>
<g fill="#fff" opacity=".95"><ellipse cx="300" cy="38" rx="48" ry="14"/><ellipse cx="335" cy="30" rx="30" ry="12"/><ellipse cx="560" cy="86" rx="42" ry="12"/><ellipse cx="590" cy="78" rx="26" ry="10"/></g>
<polygon points="300,300 470,105 545,170 640,90 800,215 800,300" fill="#cfe3f6"/><polygon points="470,105 445,135 470,128 490,138" fill="#fff"/><polygon points="640,90 615,122 640,115 662,126" fill="#fff"/>
<g fill="#fff" opacity=".85"><circle cx="430" cy="40" r="2.5"/><circle cx="500" cy="22" r="2"/><circle cx="640" cy="40" r="2.5"/><circle cx="760" cy="120" r="2"/><circle cx="520" cy="70" r="2"/><circle cx="260" cy="12" r="2"/></g>
<path d="M0 300 L0 40 Q400 100 800 250 L800 300Z" fill="url(#mg)"/>
<g transform="translate(50 256)"><polygon points="0,0 -13,28 13,28" fill="#4f86bd"/><polygon points="0,-12 -10,12 10,12" fill="#6a9fd2"/><rect x="-2" y="28" width="4" height="6" fill="#3d6a99"/></g><g transform="translate(140 256)"><polygon points="0,0 -13,28 13,28" fill="#4f86bd"/><polygon points="0,-12 -10,12 10,12" fill="#6a9fd2"/><rect x="-2" y="28" width="4" height="6" fill="#3d6a99"/></g><g transform="translate(230 256)"><polygon points="0,0 -13,28 13,28" fill="#4f86bd"/><polygon points="0,-12 -10,12 10,12" fill="#6a9fd2"/><rect x="-2" y="28" width="4" height="6" fill="#3d6a99"/></g><g transform="translate(320 256)"><polygon points="0,0 -13,28 13,28" fill="#4f86bd"/><polygon points="0,-12 -10,12 10,12" fill="#6a9fd2"/><rect x="-2" y="28" width="4" height="6" fill="#3d6a99"/></g><g transform="translate(410 256)"><polygon points="0,0 -13,28 13,28" fill="#4f86bd"/><polygon points="0,-12 -10,12 10,12" fill="#6a9fd2"/><rect x="-2" y="28" width="4" height="6" fill="#3d6a99"/></g><g transform="translate(500 256)"><polygon points="0,0 -13,28 13,28" fill="#4f86bd"/><polygon points="0,-12 -10,12 10,12" fill="#6a9fd2"/><rect x="-2" y="28" width="4" height="6" fill="#3d6a99"/></g><g transform="translate(590 256)"><polygon points="0,0 -13,28 13,28" fill="#4f86bd"/><polygon points="0,-12 -10,12 10,12" fill="#6a9fd2"/><rect x="-2" y="28" width="4" height="6" fill="#3d6a99"/></g><g transform="translate(680 256)"><polygon points="0,0 -13,28 13,28" fill="#4f86bd"/><polygon points="0,-12 -10,12 10,12" fill="#6a9fd2"/><rect x="-2" y="28" width="4" height="6" fill="#3d6a99"/></g><g transform="translate(760 256)"><polygon points="0,0 -13,28 13,28" fill="#4f86bd"/><polygon points="0,-12 -10,12 10,12" fill="#6a9fd2"/><rect x="-2" y="28" width="4" height="6" fill="#3d6a99"/></g>
<path id="slp" d="M0 40 Q400 100 800 250" fill="none" stroke="#fff" stroke-width="7" stroke-linecap="round"/>
<g id="flags"></g>
<g id="ball"><circle id="bc" r="14" fill="#fff" stroke="#8fb8e0" stroke-width="3"/><g id="bt"><path d="M-11 -4Q0 -13 11 -4M-13 6Q0 -3 13 6M-4 12Q2 9 7 12" fill="none" stroke="#bcd6ee" stroke-width="2.5" stroke-linecap="round"/></g></g>
</svg>
<div class="ctl"><input type="range" id="sr" min="0" max="100" value="0" aria-label="Roll the snowball down the hill"></div>
<div class="rd" id="rd" aria-live="polite"></div>
<p class="src">Example only: four debts, $200 a month extra. Your own numbers are in the planner below. Method based on the debt snowball popularized by Dave Ramsey (not affiliated).</p>
</div></div></section>
<section><div class="wrap">
<h2>Debt in Kentucky</h2>
<p class="lead">Kentuckians owe less per person than most Americans, mainly because homes cost less. Outside the mortgage, though, debt has been climbing, and it takes a bigger bite out of the paychecks of people with modest incomes.</p>
<div class="facts">
<div><b id="f1"></b><span>Growth in average debt per Kentucky borrower, 2019 to 2023</span></div>
<div><b>$43,200</b><span>Average debt per Kentucky borrower with a credit score in 2025, with mortgages about 61% of it</span></div>
<div><b id="f3"></b><span>Non-mortgage debt per Kentucky borrower in 2023 (auto, cards, student loans and other)</span></div>
</div>
<div class="stats" style="margin-top:1.6rem">
<div class="card"><h3>Average debt per person, Kentucky</h3><div id="c1"></div>
<p class="src">Per person aged 18+ with a credit file, all debt types, Q4 each year. Source: Federal Reserve Bank of New York Consumer Credit Panel/Equifax, as published in the Hawaii DBEDT Data Book (Tables 13.45 to 13.47); 2025 figure from USAFacts. Kentucky ranked 47th of 51 in 2023. Nationally in Q2 2026, about 4.7% of household debt was in some stage of delinquency (New York Fed). Check newyorkfed.org for the latest Kentucky figures.</p></div>
</div></div></section>
<section id="plan" style="background:#e9f3fc"><div class="wrap">
<h2>Your plan</h2>
<p class="lead">Enter your numbers. Nothing leaves your device. Use Save to keep your plan as a file and Open to come back to it later.</p>
<div id="form">
<div class="two">
<div class="card">
<fieldset><legend>Income and household</legend>
<div class="row2"><div><label for="income">Monthly take-home pay ($)</label><input id="income" type="number" min="0" step="any" inputmode="decimal"></div>
<div><label for="extra">Extra income: side job, overtime ($/mo)</label><input id="extra" type="number" min="0" step="any" inputmode="decimal"></div></div>
<div class="row2"><div><label for="status">Household</label><select id="status"><option value="single">Single</option><option value="notSingle">Not single (married or partnered)</option></select></div>
<div><label for="kids">Children at home</label><input id="kids" type="number" min="0" max="10" step="1" inputmode="numeric"></div></div>
<label class="chk"><input id="fund" type="checkbox"> I already have $1,000 saved for emergencies</label>
</fieldset>
<fieldset><legend>What you spend each month now</legend>
<div id="spend"></div>
<p class="src">Leave car loan, credit card and other debt payments out. Add them below.</p>
</fieldset>
</div>
<div class="card">
<fieldset><legend>Your debts</legend>
<div id="debts"></div>
<button type="button" class="ghost" id="addDebt">Add a debt</button>
<p class="src">Mortgage: tick the box on that row. Its payment belongs in Housing, and the snowball skips it.</p>
</fieldset>
</div>
</div>
<div class="btns"><button type="button" id="save">Save plan to file</button>
<button type="button" class="ghost" id="open">Open saved plan</button>
<button type="button" class="ghost" id="demo">Try an example</button>
<button type="button" class="ghost" id="reset">Clear all</button></div>
<input type="file" id="file" accept=".json,application/json" hidden>
<div id="note" role="status" aria-live="polite"></div>
</div>
<div class="card" id="out" aria-live="polite" style="margin-top:1.4rem"></div>
</div></section>
<footer><div class="wrap">
<p><b>Educational use only.</b> This tool is not financial, tax, legal or investment advice. Spending targets are rules of thumb, not requirements, and results are estimates that assume steady payments and fixed interest rates. It does not recommend any specific investment or product. Talk with a qualified professional, or a nonprofit credit counselor, before big money decisions.</p>
<p>No data leaves your device and no outside services or keys are used. Statistics from the Federal Reserve Bank of New York (via the Hawaii DBEDT Data Book and USAFacts). Debt snowball method as described in the Baby Steps plan by Dave Ramsey. Built for the <a href="https://globefin.org/ky-pfm.php">Kentucky PFM Challenge</a>. Released under the MIT License.</p>
</div></footer>
<script>
(function(){
"use strict";
var $=function(i){return document.getElementById(i)};
var esc=function(s){return String(s).replace(/[&<>"']/g,function(c){return {"&":"&","<":"<",">":">",'"':""","'":"'"}[c]})};
var money=function(n){return "$"+Math.round(n).toLocaleString("en-US")};
var N=function(v){v=parseFloat(v);return isFinite(v)&&v>0?v:0};
/* ---------- statistics (NY Fed Consumer Credit Panel/Equifax) ---------- */
var KY={2019:34910,2020:36270,2021:37890,2022:40290,2023:41170,2025:43200};
$("f1").textContent="+"+Math.round((KY[2023]/KY[2019]-1)*100)+"%";
$("f3").textContent=money(41170-25270);
(function(){var h="",m=45000;Object.keys(KY).forEach(function(y){h+='<div class="bar"><span>'+y+'</span><i class="'+(y==2025?"gold":"")+'" style="width:'+(KY[y]/m*100)+'%"></i><b>'+money(KY[y])+'</b></div>'});
$("c1").insertAdjacentHTML("beforeend",h);})();
/* ---------- budget targets (share of take-home pay) ---------- */
var CAT=[["housing","Housing (rent or mortgage, taxes, home insurance)",.30],["utilities","Utilities and phone",.06],["food","Groceries and household items",.11],["transport","Transportation (gas, car insurance, upkeep)",.09],["insurance","Health and life insurance",.07],["other","Everything else (kids, clothes, fun)",.06]];
function capPct(k,s,kids){var p=CAT.filter(function(c){return c[0]==k})[0][2],q=Math.min(kids,6);
if(k=="food")p+=(s=="notSingle"?.02:0)+.015*q; if(k=="other")p+=.01*q; if(k=="insurance")p+=.005*q; return p}
/* ---------- state ---------- */
var state,dirty=false;
function blank(){var sp={};CAT.forEach(function(c){sp[c[0]]=""});return{income:"",extra:"",status:"single",kids:"",fund:false,spend:sp,debts:[]}}
function setDirty(d){dirty=d}
window.addEventListener("beforeunload",function(e){if(dirty){e.preventDefault();e.returnValue=""}});
function msg(t,c){$("note").innerHTML='<div class="msg '+c+'">'+esc(t)+"</div>"}
/* ---------- form build ---------- */
function buildSpend(){$("spend").innerHTML=CAT.map(function(c){return '<label for="s_'+c[0]+'">'+esc(c[1])+' ($/mo)</label><input id="s_'+c[0]+'" data-s="'+c[0]+'" type="number" min="0" step="any" inputmode="decimal">'}).join("")}
function buildDebts(){
$("debts").innerHTML=state.debts.map(function(d,i){return '<div class="drow">'+
'<div class="nm"><label for="dn'+i+'">Name</label><input id="dn'+i+'" data-d="'+i+'" data-k="name" type="text" maxlength="40"></div>'+
'<div><label for="db'+i+'">Balance ($)</label><input id="db'+i+'" data-d="'+i+'" data-k="balance" type="number" min="0" step="any" inputmode="decimal"></div>'+
'<div><label for="dr'+i+'">Rate (%)</label><input id="dr'+i+'" data-d="'+i+'" data-k="rate" type="number" min="0" step="any" inputmode="decimal"></div>'+
'<div><label for="dm'+i+'">Min pay ($/mo)</label><input id="dm'+i+'" data-d="'+i+'" data-k="min" type="number" min="0" step="any" inputmode="decimal"></div>'+
'<button type="button" class="x" data-del="'+i+'" aria-label="Remove debt '+(i+1)+'">Remove</button>'+
'<label class="m" for="dg'+i+'"><input id="dg'+i+'" data-d="'+i+'" data-k="mortgage" type="checkbox"> This is my mortgage (leave out of the snowball)</label></div>'}).join("");
state.debts.forEach(function(d,i){$("dn"+i).value=d.name;$("db"+i).value=d.balance;$("dr"+i).value=d.rate;$("dm"+i).value=d.min;$("dg"+i).checked=!!d.mortgage});
}
function fill(){$("income").value=state.income;$("extra").value=state.extra;$("status").value=state.status;$("kids").value=state.kids;$("fund").checked=state.fund;
CAT.forEach(function(c){$("s_"+c[0]).value=state.spend[c[0]]});buildDebts();calc()}
$("form").addEventListener("input",function(e){var t=e.target;
if(t.id=="income")state.income=t.value;else if(t.id=="extra")state.extra=t.value;else if(t.id=="status")state.status=t.value;
else if(t.id=="kids")state.kids=t.value;else if(t.id=="fund")state.fund=t.checked;
else if(t.dataset.s)state.spend[t.dataset.s]=t.value;
else if(t.dataset.d!==undefined){state.debts[+t.dataset.d][t.dataset.k]=t.type=="checkbox"?t.checked:t.value}
else return; setDirty(true);calc()});
$("form").addEventListener("change",function(e){if(e.target.id=="status"||e.target.id=="fund"){state[e.target.id=="fund"?"fund":"status"]=e.target.id=="fund"?e.target.checked:e.target.value;setDirty(true);calc()}});
$("form").addEventListener("click",function(e){var t=e.target;
if(t.dataset.del!==undefined){state.debts.splice(+t.dataset.del,1);buildDebts();setDirty(true);calc()}});
$("addDebt").onclick=function(){if(state.debts.length>=30)return;state.debts.push({name:"",balance:"",rate:"",min:"",mortgage:false});buildDebts();setDirty(true);var l=$("dn"+(state.debts.length-1));if(l)l.focus()};
$("reset").onclick=function(){if(dirty&&!confirm("Clear everything? Unsaved changes will be lost."))return;state=blank();fill();setDirty(false);msg("Cleared.","ok")};
$("demo").onclick=function(){if(dirty&&!confirm("Replace your entries with the example? Unsaved changes will be lost."))return;
state={income:"4200",extra:"0",status:"notSingle",kids:"2",fund:false,spend:{housing:"1500",utilities:"380",food:"850",transport:"650",insurance:"420",other:"500"},
debts:[{name:"Store card",balance:"650",rate:"24",min:"35",mortgage:false},{name:"Medical bill",balance:"1800",rate:"0",min:"75",mortgage:false},{name:"Credit card",balance:"5200",rate:"22",min:"130",mortgage:false},{name:"Car loan",balance:"11800",rate:"7",min:"340",mortgage:false},{name:"Student loan",balance:"14000",rate:"5.5",min:"160",mortgage:false}]};
fill();setDirty(true);msg("Example loaded. Replace it with your own numbers.","ok")};
/* ---------- save / open ---------- */
$("save").onclick=function(){
var blob=new Blob([JSON.stringify({app:"ky-debt-freedom-plan",version:1,data:state},null,2)],{type:"application/json"});
var a=document.createElement("a");a.href=URL.createObjectURL(blob);a.download="ky-debt-freedom-plan.json";document.body.appendChild(a);a.click();a.remove();
setTimeout(function(){URL.revokeObjectURL(a.href)},1000);setDirty(false);msg("Saved. Look for ky-debt-freedom-plan.json in your downloads.","ok")};
$("open").onclick=function(){$("file").click()};
function valid(o){
if(!o||o.app!=="ky-debt-freedom-plan"||!o.data||typeof o.data!=="object")return null;var d=o.data,out=blank();
var ok=function(v){return v===""||(typeof v==="string"||typeof v==="number")&&isFinite(parseFloat(v))&&parseFloat(v)>=0&&parseFloat(v)<1e9};
if(!ok(d.income)||!ok(d.extra)||!ok(d.kids)||(d.status!=="single"&&d.status!=="notSingle")||typeof d.fund!=="boolean"||!d.spend||!Array.isArray(d.debts)||d.debts.length>30)return null;
out.income=String(d.income);out.extra=String(d.extra);out.kids=String(d.kids);out.status=d.status;out.fund=d.fund;
for(var i=0;i<CAT.length;i++){var v=d.spend[CAT[i][0]];if(!ok(v))return null;out.spend[CAT[i][0]]=String(v)}
for(var j=0;j<d.debts.length;j++){var x=d.debts[j];if(!x||typeof x.name!=="string"||!ok(x.balance)||!ok(x.rate)||!ok(x.min)||typeof x.mortgage!=="boolean")return null;
out.debts.push({name:x.name.slice(0,40),balance:String(x.balance),rate:String(x.rate),min:String(x.min),mortgage:x.mortgage})}
return out}
$("file").onchange=function(){var f=this.files[0];this.value="";if(!f)return;
if(dirty&&!confirm("Opening a file replaces what you have now, including unsaved changes. Continue?"))return;
var r=new FileReader();r.onerror=function(){msg("Couldn't read that file. Your current plan is unchanged.","bad")};
r.onload=function(){var o=null;try{o=valid(JSON.parse(r.result))}catch(e){o=null}
if(!o){msg("That isn't a plan saved by this page, or it's damaged. Your current plan is unchanged.","bad");return}
state=o;fill();setDirty(false);msg("Plan opened.","ok")};r.readAsText(f)};
/* ---------- debt snowball engine ---------- */
function sim(ds,extra,roll,fund){
var b=ds.map(function(d){return d.b}),paid=ds.map(function(){return 0}),tot=0,mo=0,f=fund;
while(mo<600&&b.some(function(x){return x>.005})){mo++;
b=b.map(function(x,i){if(x<=0)return 0;var it=x*ds[i].r/1200;tot+=it;return x+it});
var ex=roll?extra:0,left=0;
if(roll&&f<1000){var put=Math.min(ex,1000-f);f+=put;ex-=put}
left=ex;
ds.forEach(function(d,i){var p=Math.min(d.m,b[i]);b[i]-=p;if(roll)left+=d.m-p});
if(roll)for(var i=0;i<b.length&&left>0;i++){if(b[i]>0){var q=Math.min(left,b[i]);b[i]-=q;left-=q}}
b.forEach(function(x,i){if(x<=.005){b[i]=0;if(!paid[i])paid[i]=mo}})}
return{mo:mo,tot:tot,paid:paid,never:b.some(function(x){return x>.005})}}
var ym=function(m){var y=Math.floor(m/12),r=m%12;return (y?y+" yr ":"")+(r||!y?r+" mo":"")};
var when=function(m){var d=new Date();d.setMonth(d.getMonth()+m);return d.toLocaleDateString("en-US",{month:"long",year:"numeric"})};
function calc(){
var o=$("out"),inc=N(state.income)+N(state.extra),kids=Math.floor(N(state.kids));
if(!inc){o.innerHTML='<p class="empty">Enter your monthly take-home pay to see your plan, or use Try an example.</p>';return}
var rows="",plan=0,over=0;
CAT.forEach(function(c){var cap=inc*capPct(c[0],state.status,kids),a=N(state.spend[c[0]]),p=Math.min(a,cap);plan+=p;over+=Math.max(0,a-cap);
rows+='<tr><td>'+esc(c[1].split(" (")[0])+'</td><td>'+money(a)+'</td><td>'+money(cap)+'</td><td>'+money(p)+'</td></tr>'});
var ds=state.debts.filter(function(d){return !d.mortgage&&N(d.balance)>0}).map(function(d){return{n:d.name||"Unnamed debt",b:N(d.balance),r:N(d.rate),m:N(d.min)}}).sort(function(a,b){return a.b-b.b});
var mins=ds.reduce(function(s,d){return s+d.m},0),surplus=inc-plan-mins,extra=Math.max(0,surplus);
var h="";
if(surplus<0)h+='<div class="msg bad">Your plan is short by '+money(-surplus)+' a month even at the target spending below. Cut further, add income, or contact a nonprofit credit counselor about your minimums.</div>';
else if(over>0)h+='<div class="msg warn">You spend '+money(over)+' a month above the targets. The plan below assumes you cut back to them, which frees that money for debt.</div>';
h+='<h3>Monthly budget</h3><div style="overflow-x:auto"><table><tr><th>Category</th><th>Now</th><th>Target max</th><th>Plan</th></tr>'+rows+
'<tr><td>Debt minimums</td><td></td><td></td><td>'+money(mins)+'</td></tr><tr><td><b>Extra to debt</b></td><td></td><td></td><td><b>'+money(extra)+'</b></td></tr></table></div>';
if(!ds.length){o.innerHTML=h+'<p class="empty">Add your debts to see a payoff timeline. With no debt besides a mortgage, go straight to the emergency fund.</p>';return}
var fundNeed=state.fund?0:1000,R=sim(ds,extra,true,state.fund?1000:0),B=sim(ds,0,false,0);
if(R.never){o.innerHTML=h+'<div class="msg bad">At this pace the debts don\'t reach zero within 50 years. Raise the extra amount or the minimums.</div>';return}
var save=B.never?null:B.tot-R.tot;
h+='<h3 style="margin-top:1.2rem">Your payoff</h3><div class="big"><div><b>'+ym(R.mo)+'</b><span>Debt-free (except mortgage) by '+when(R.mo)+'</span></div>'+
'<div><b>'+money(R.tot)+'</b><span>Total interest paid</span></div></div>';
h+='<p>'+(B.never?'Paying only the minimums, your debts would not be paid off in 50 years.':'Paying only minimums would take '+ym(B.mo)+' and cost '+money(B.tot)+' in interest. The snowball saves you about '+money(save)+' and '+ym(B.mo-R.mo)+'.')+'</p>';
if(fundNeed)h+='<p>'+(extra>0?'Your first '+ym(Math.ceil(fundNeed/extra))+' of extra money goes to the $1,000 starter fund.':'There is no extra money to start the $1,000 fund yet.')+'</p>';
h+='<h3>Snowball order</h3><div class="tl">';
ds.forEach(function(d,i){var w=Math.max(3,R.paid[i]/R.mo*100);h+='<div><span>'+(i+1)+'. '+esc(d.n)+'</span><span class="track"><i style="width:'+w+'%"></i><em>'+when(R.paid[i])+'</em></span></div>'});
h+='</div>';
var pool=mins+extra,t3=plan*3,t6=plan*6;
if(pool>0)h+='<h3>After the debts</h3><p>Your plan spending is about '+money(plan)+' a month, so a 3 to 6 month emergency fund is '+money(t3)+' to '+money(t6)+'. Putting the same '+money(pool)+' a month toward it takes about '+ym(Math.ceil(t3/pool))+' for 3 months and '+ym(Math.ceil(t6/pool))+' for 6 months.</p>';
o.innerHTML=h}
(function(){
var D=[["Store card",500,25],["Medical bill",1500,40],["Credit card",4000,75],["Car loan",9000,150]],EX=200,NS="http://www.w3.org/2000/svg";
var sl=$("slp"),L=sl.getTotalLength(),rng=$("sr"),ball=$("ball"),bt=$("bt"),bc=$("bc"),rd=$("rd");
function nrm(t){var a=sl.getPointAtLength(L*t),b=sl.getPointAtLength(L*Math.min(1,t+.01)),dx=b.x-a.x,dy=b.y-a.y,l=Math.hypot(dx,dy);return{p:a,x:dy/l,y:-dx/l}}
var marks=D.map(function(d,i){var p=nrm(.2+.2*i).p,g=document.createElementNS(NS,"g"),x=Math.min(760,Math.max(40,p.x));
g.innerHTML='<circle cx="'+p.x+'" cy="'+p.y+'" r="8"/><text x="'+x+'" y="'+(p.y+32)+'">'+d[0]+'</text><text x="'+x+'" y="'+(p.y+48)+'">'+money(d[1])+'</text>';
$("flags").appendChild(g);return g});
function draw(){var s=rng.value/100,t=.03+.94*s,r=14+26*s,n=nrm(t),k=0,roll=0,i;
ball.setAttribute("transform","translate("+(n.p.x+n.x*r)+" "+(n.p.y+n.y*r)+")");bc.setAttribute("r",r);
bt.setAttribute("transform","rotate("+(s*1440)+") scale("+(r/20)+")");
D.forEach(function(d,j){var done=t>=.2+.2*j;if(done)k++;marks[j].setAttribute("class","fl"+(done?" done":""))});
for(i=0;i<k;i++)roll+=D[i][2];
if(k>=D.length)rd.innerHTML='All four debts are gone. The full <b>'+money(EX+roll)+'</b> a month is now free to build an emergency fund.';
else rd.innerHTML='<span class="n">'+money(EX+roll+D[k][2])+'</span> a month is going at <b>'+D[k][0]+'</b>: your '+money(EX)+' extra, its '+money(D[k][2])+' minimum'+(k?', and '+money(roll)+' rolled over from '+k+' paid-off debt'+(k>1?'s':''):'')+'.'}
rng.addEventListener("input",draw);
draw();
})();
state=blank();buildSpend();fill();
})();
</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 Sam Chapman. 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.