← Demos
Web Pages · Demos

Kentucky Wage Gap Calculator

by Ella Hensley Nov 20, 2026 20 views 54.1 KB
Sandbox · kentucky-wage-gap-calculator · no access to your account
View source — the whole page is this one file
<!-- Copyright (c) 2026 Ella Hensley. Released under the MIT License. -->
<title>Kentucky Wage Gap Calculator</title>
<meta name="claude:viewport-fit-sides" content="cover">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Archivo:wght@500;700;800&family=Public+Sans:wght@400;500;600;700&display=swap">
<style>
  /* Layout: shared green masthead with a three-step nav; three pages (facts, calculator, take action) switched by URL hash; each page opens with a green hero band, then white working panels. */
  :root {
    --bg: #F4F6F3;
    --surface: #FFFFFF;
    --fg: #14231F;
    --muted: #4F5F5A;
    --line: #D6DDD8;
    --accent: #0F5C4D;
    --accent-fg: #FFFFFF;
    --gold: #B87A00;
    --gold-soft: #F6E7BF;
    --bar-soft: #8FB5AB;
    --danger: #B42318;
    --chart-grid: #E3E8E4;
    --font-display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
    --font-body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #0D1714; --surface: #14231F; --fg: #E8EEEA; --muted: #A2B5AD; --line: #26383A;
      --accent: #4FC3A1; --accent-fg: #0D1714; --gold: #E3B341; --gold-soft: #3A3014; --bar-soft: #2E5E52; --danger: #FF8F85; --chart-grid: #1F302C;
      color-scheme: dark;
    }
  }
  :root[data-theme="dark"] {
    --bg: #0D1714; --surface: #14231F; --fg: #E8EEEA; --muted: #A2B5AD; --line: #26383A;
    --accent: #4FC3A1; --accent-fg: #0D1714; --gold: #E3B341; --gold-soft: #3A3014; --bar-soft: #2E5E52; --danger: #FF8F85; --chart-grid: #1F302C;
    color-scheme: dark;
  }

  * { box-sizing: border-box; }
  body {
    background: var(--bg); color: var(--fg);
    font-family: var(--font-body); font-size: 17px; line-height: 1.55;
    margin: 0; padding-block: 0 56px;
  }
  .in {
    max-width: 1040px; margin: 0 auto;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
  h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; line-height: 1.1; margin: 0; letter-spacing: -.01em; }
  a { color: var(--accent); }
  :focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
  [tabindex="-1"]:focus { outline: none; }

  /* Masthead and step nav */
  .top { background: var(--accent); color: var(--accent-fg); }
  .top .in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; padding-top: 14px; padding-bottom: 0; }
  .brand { font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; padding-bottom: 12px; }
  .steps { display: flex; flex-wrap: wrap; gap: 0 22px; }
  .steps a {
    color: var(--accent-fg); text-decoration: none; font-weight: 600; font-size: 15px;
    padding: 6px 0 12px; border-bottom: 4px solid transparent; opacity: .82;
  }
  .steps a:hover { opacity: 1; }
  .steps a[aria-current="page"] { border-bottom-color: var(--gold); opacity: 1; }
  .steps .n { font-family: var(--font-display); font-weight: 800; margin-right: 6px; }
  .top :focus-visible { outline-color: var(--accent-fg); }

  /* Hero band on each page */
  .hero { background: var(--accent); color: var(--accent-fg); padding-block: 34px 40px; }
  .hero .in { display: grid; gap: 12px; }
  .kicker { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; opacity: .88; }
  .hero h1 { font-size: clamp(32px, 6vw, 58px); font-weight: 800; max-width: 20ch; }
  .hero p { margin: 0; max-width: 60ch; font-size: 19px; opacity: .96; }

  main { padding-top: 28px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
  main > * { min-width: 0; }
  .page[hidden] { display: none; }

  .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 24px; }
  .panel h2 { font-size: 26px; font-weight: 800; margin-bottom: 14px; }
  .panel h3 { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
  .lede { margin: 0 0 18px; max-width: 70ch; color: var(--muted); }

  /* Buttons */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    background: var(--accent); color: var(--accent-fg); text-decoration: none;
    font-family: var(--font-display); font-weight: 800; font-size: 18px; letter-spacing: .03em; text-transform: uppercase;
    padding: 16px 28px; border-radius: 6px; border: 2px solid var(--accent);
    min-height: 54px; transition: transform .12s;
  }
  .btn:hover { transform: translateX(2px); }
  .btn.alt { background: transparent; color: var(--accent); }
  .btn.small { font-size: 15px; padding: 10px 18px; min-height: 44px; }
  .nextbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding-top: 4px; }
  .nextbar p { margin: 0; color: var(--muted); max-width: 52ch; }
  @media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover { transform: none; } }

  /* Welcome page */
  .facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
  .fact { display: grid; gap: 4px; border-top: 4px solid var(--gold); padding-top: 12px; align-content: start; }
  .fact .num { font-family: var(--font-display); font-size: 40px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
  .fact p { margin: 0; color: var(--muted); font-size: 15px; }
  .bars { display: grid; gap: 14px; }
  .bar-row { display: grid; grid-template-columns: minmax(120px, 210px) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 12px; border-radius: 6px; transition: background-color .15s; }
  .bar-row:hover, .bar-row.hl, .bar-row:focus-visible { background: var(--gold-soft); }
  .bar-row.hl .bar-fill, .bar-row:hover .bar-fill { background: var(--gold); }
  .bar-row.ref:hover .bar-fill, .bar-row.ref.hl .bar-fill { background: var(--gold); opacity: .7; }
  tbody tr.hl td, tbody tr:hover td { background: var(--gold-soft); }
  .bar-row .name { font-weight: 600; font-size: 15px; line-height: 1.25; }
  .bar-track { background: var(--chart-grid); height: 22px; border-radius: 3px; overflow: hidden; }
  .bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: background-color .15s; }
  .bar-row.ref .bar-fill { background: var(--bar-soft); }
  .bar-row .val { font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; min-width: 88px; text-align: right; }
  @media (max-width: 560px) {
    .bar-row { grid-template-columns: minmax(0, 1fr) auto; }
    .bar-row .bar-track { grid-column: 1 / -1; grid-row: 2; }
  }
  .meaning { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
  .meaning p { margin: 0; color: var(--muted); font-size: 16px; }

  table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
  th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
  th { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; white-space: nowrap; }
  td.r, th.r { text-align: right; }
  tr.on td { background: var(--gold-soft); font-weight: 700; }
  tr.ref td { color: var(--muted); }
  .scroll { overflow-x: auto; }
  .scroll table { min-width: 520px; }

  /* Calculator page */
  .bench { display: grid; gap: 20px; grid-template-columns: minmax(0, 350px) minmax(0, 1fr); align-items: start; }
  @media (max-width: 820px) { .bench { grid-template-columns: minmax(0, 1fr); } }
  .field { display: grid; gap: 6px; margin-bottom: 20px; }
  .field:last-child { margin-bottom: 0; }
  .field label { font-weight: 600; display: flex; justify-content: space-between; gap: 12px; }
  .field output { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 700; }
  .hint { font-size: 14px; color: var(--muted); margin: 0; }
  input[type="range"] { width: 100%; accent-color: var(--accent); min-height: 28px; }
  input[type="number"], select {
    width: 100%; font: inherit; padding: 11px 12px; border-radius: 6px;
    border: 1px solid var(--line); background: var(--bg); color: var(--fg);
  }
  .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
  .check input { margin-top: 5px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }

  .result-top { display: grid; gap: 4px; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
  .result-top .lab { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
  .big { font-family: var(--font-display); font-size: clamp(46px, 9vw, 76px); font-weight: 800; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
  .big small { font-family: var(--font-body); font-size: 17px; font-weight: 500; color: var(--muted); margin-left: 10px; display: inline-block; }
  .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 20px; }
  .stat { display: grid; gap: 2px; }
  .stat .lab { font-size: 13px; color: var(--muted); font-weight: 600; }
  .stat .val { font-family: var(--font-display); font-size: 25px; font-weight: 700; font-variant-numeric: tabular-nums; }
  .chart-box { overflow-x: auto; }
  svg { display: block; width: 100%; height: auto; min-width: 440px; }
  .legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); margin: 10px 0 0; }
  .legend i { display: inline-block; width: 18px; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }

  .note { font-size: 15px; color: var(--muted); }
  .note p { margin: 0 0 10px; max-width: 78ch; }

  /* Take action page */
  .split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
  @media (max-width: 720px) { .split { grid-template-columns: minmax(0, 1fr); } }
  .split .bill { display: flex; flex-direction: column; gap: 8px; }
  .split .bill p { margin: 0; }
  .split .bill .chips { margin-top: auto; padding-top: 6px; }
  .bills { display: grid; gap: 14px; }
  .bill { border: 1px solid var(--line); border-left: 5px solid var(--gold); border-radius: 6px; padding: 16px 18px; display: grid; gap: 6px; }
  .bill header { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: space-between; }
  .bill h3 { margin: 0; }
  .tag { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .bill p { margin: 0; font-size: 16px; }
  .bill .status { color: var(--muted); font-size: 15px; }
  .chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
  .chips a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 600; text-decoration: none; }
  .chips a:hover { border-color: var(--accent); }
  .callout { background: var(--gold-soft); border-radius: 8px; padding: 16px 18px; font-size: 16px; }
  .callout p { margin: 0 0 8px; }
  .callout p:last-child { margin: 0; }
  .script { border-left: 4px solid var(--accent); padding: 4px 0 4px 16px; margin: 12px 0 0; font-size: 16px; max-width: 70ch; }
  ol.do { margin: 0; padding-left: 22px; display: grid; gap: 10px; max-width: 72ch; }
  .phone { font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

  /* Who this is for, save/open controls, footer */
  .notice { background: var(--gold-soft); color: var(--fg); font-size: 14px; padding-block: 9px; border-bottom: 1px solid var(--line); }
  .who { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.75fr); gap: 20px 36px; align-items: start; }
  .who .who-intro h2 { margin-bottom: 12px; }
  .who .who-intro .lede { margin: 0; }
  @media (max-width: 820px) { .who { grid-template-columns: minmax(0, 1fr); } }
  .who blockquote { margin: 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--gold); font-size: 18px; }
  .who blockquote p { margin: 0; }
  .who cite { display: block; margin-top: 10px; font-style: normal; font-weight: 700; font-family: var(--font-display); }
  button.btn { cursor: pointer; font-family: var(--font-display); }
  .field .lab { font-weight: 600; }
  .filebar { display: flex; flex-wrap: wrap; gap: 10px; }
  .msg { min-height: 1.2em; }
  .msg.err { color: var(--danger); font-weight: 600; }
  .foot { margin-top: 40px; border-top: 1px solid var(--line); padding-block: 24px 8px; color: var(--muted); font-size: 14px; }
  .foot p { margin: 0 0 10px; max-width: 82ch; }
</style>

<header class="top">
  <div class="in">
    <div class="brand">Kentucky Wage Gap Calculator</div>
    <nav class="steps" aria-label="Steps">
      <a href="#start" id="nav-start"><span class="n">1</span>The gap</a>
      <a href="#calculator" id="nav-calculator"><span class="n">2</span>Your number</a>
      <a href="#take-action" id="nav-take-action"><span class="n">3</span>End the gap</a>
    </nav>
  </div>
</header>

<!-- PAGE 1: THE GAP -->
<div class="page" id="page-start">
  <div class="notice" role="note"><div class="in"><strong>Educational use only.</strong> This page is an educational tool. It is not financial, investment, tax or legal advice.</div></div>
  <div class="hero">
    <div class="in">
      <div class="kicker">Kentucky women and pay</div>
      <h1 tabindex="-1">Kentucky women are paid less. Here is what it costs.</h1>
      <p>Women working full time, year round in Kentucky are paid 83 cents for every dollar paid to men. For Black women and Latinas, the gap is much wider.</p>
    </div>
  </div>
  <div class="in">
    <main>
      <section class="panel who" aria-labelledby="h-who">
        <div class="who-intro">
          <h2 id="h-who">Who this is for</h2>
          <p class="lede">This site is built for Kentucky women who want to see what the wage gap costs over a career and plan around it. It is especially for Black women and Latinas, who face the widest gaps in the state.</p>
        </div>
        <blockquote>
          <p>A little over 50 years ago, the Equal Credit Opportunity Act was passed, freeing women from needing a male co-signer on their loans, whether they were married, divorced, widowed, or single. Since then, women have continued to gain equal rights across all areas of their lives. However, there is still work to be done. When I retire, we will be nearing the 100-year anniversary of the Equal Credit Opportunity Act. I hope that by then the national wage gap will be completely closed, and websites like this one will be nothing more than an artifact.</p>
          <cite>&ndash; Ella</cite>
        </blockquote>
      </section>

      <section class="panel" aria-labelledby="h-fast">
        <h2 id="h-fast">Kentucky at a glance</h2>
        <div class="facts">
          <div class="fact"><span class="num">83&cent;</span><p>What all Kentucky women are paid for every $1 paid to all men.</p></div>
          <div class="fact"><span class="num">$395,520</span><p>Estimated loss over a 40-year career for all Kentucky women. The U.S. figure is $542,800.</p></div>
          <div class="fact"><span class="num">10th</span><p>Kentucky's rank among 50 states and D.C. Rank 1 has the smallest lifetime loss.</p></div>
          <div class="fact"><span class="num">Age 68</span><p>When a Kentucky woman's career earnings catch up to a man's earnings at age 60.</p></div>
        </div>
      </section>

      <section class="panel" aria-labelledby="h-groups">
        <h2 id="h-groups">The gap is not the same for every woman</h2>
        <p class="lede">Estimated 40-year loss by race and ethnicity. Each group is compared with white, non-Hispanic men. The lighter bar compares all women with all men, so it is not directly comparable.</p>
        <div class="bars" id="bars" role="list"></div>
        <div class="scroll" style="margin-top:22px">
          <table>
            <thead><tr><th>Group</th><th class="r">Paid per $1</th><th class="r">Lost per year</th><th class="r">Lost over 40 years</th><th class="r">Catch-up age</th></tr></thead>
            <tbody id="gapRows"></tbody>
          </table>
        </div>
        <p class="hint" style="margin-top:12px">NWLC does not publish Kentucky figures for Indigenous women or for Native Hawaiian and Pacific Islander women because there is not enough data.</p>
      </section>

      <section class="panel" aria-labelledby="h-mean">
        <h2 id="h-mean">How to read these numbers</h2>
        <div class="meaning">
          <div><h3>Paid per $1</h3><p>The median pay of full-time, year-round women in the group, compared with the median pay of men in the comparison group.</p></div>
          <div><h3>Lost over 40 years</h3><p>What a woman would lose across a 40-year career if today's gap stays the same. It is not adjusted for inflation.</p></div>
          <div><h3>Catch-up age</h3><p>The age a woman would need to work until to match the career earnings of a man who starts at 20 and retires at 60.</p></div>
        </div>
      </section>

      <section class="nextbar" aria-label="Next step">
        <p>Now see an example of how much you could set aside each year to make up the difference.</p>
        <a class="btn" href="#calculator">Calculate my number <span aria-hidden="true">&rarr;</span></a>
      </section>

      <section class="note" aria-label="Sources">
        <p><strong>Sources.</strong> National Women's Law Center, March 2026 tables: <a href="https://nwlc.org/wp-content/uploads/2025/02/Lifetime-Wage-Gap-Losses-by-State-for-Women-Overall-March-2026.pdf">women overall</a> (2024 American Community Survey 1-year estimates), and 2020 to 2024 American Community Survey 5-year estimates for <a href="https://nwlc.org/wp-content/uploads/2025/02/Lifetime-Wage-Gap-Losses-by-State-for-White-non-Hispanic-Women-March-2026.pdf">white, non-Hispanic women</a>, <a href="https://nwlc.org/wp-content/uploads/2025/02/Lifetime-Wage-Gap-Losses-by-State-for-Black-Women-March-2026.pdf">Black women</a>, <a href="https://nwlc.org/wp-content/uploads/2025/02/Lifetime-Wage-Gap-Losses-by-State-for-Latinas-March-2026.pdf">Latinas</a> and <a href="https://nwlc.org/wp-content/uploads/2025/02/Lifetime-Wage-Gap-Losses-by-State-for-Asian-Women-March-2026.pdf">Asian women</a>. See also <a href="https://nwlc.org/resource/the-lifetime-wage-gap-state-by-state/">The Lifetime Wage Gap, State by State</a>.</p>
      </section>
    </main>
  </div>
</div>

<!-- PAGE 2: YOUR NUMBER -->
<div class="page" id="page-calculator" hidden>
  <div class="hero">
    <div class="in">
      <div class="kicker">Step 2 &middot; Your number</div>
      <h1 tabindex="-1">What would it take to close the gap yourself?</h1>
      <p>Choose your group, set your timeline and see an example of the yearly amount that could offset the pay you are projected to lose.</p>
    </div>
  </div>
  <div class="in">
    <main>
      <section class="bench" aria-label="Calculator">
        <form class="panel" onsubmit="return false" aria-label="Your assumptions">
          <h2>Your assumptions</h2>

          <div class="field">
            <label for="grp">Race and ethnicity</label>
            <select id="grp">
              <option value="white">White, non-Hispanic women</option>
              <option value="black">Black women</option>
              <option value="latina">Latinas</option>
              <option value="asian">Asian women</option>
              <option value="native" disabled>Indigenous women (no Kentucky data)</option>
              <option value="nhopi" disabled>Native Hawaiian and Pacific Islander women (no Kentucky data)</option>
            </select>
            <p class="hint" id="grpHint"></p>
            <p class="hint">NWLC does not publish Kentucky figures for Indigenous women or for Native Hawaiian and Pacific Islander women because there is not enough data.</p>
          </div>

          <div class="field">
            <label for="salary">Your annual salary <span class="hint">(optional)</span></label>
            <input id="salary" type="number" inputmode="numeric" min="0" step="1000" placeholder="e.g. 42000">
            <p class="hint" id="salaryHint"></p>
          </div>

          <div class="field">
            <label for="years">Years until you retire <output id="yearsOut">40</output></label>
            <input id="years" type="range" min="5" max="40" step="1" value="40">
            <p class="hint">NWLC measures the gap over a 40-year career.</p>
          </div>

          <div class="field">
            <label for="ret">Expected yearly return <output id="retOut">5.0%</output></label>
            <input id="ret" type="range" min="0" max="10" step="0.5" value="5">
            <p class="hint">Returns are not guaranteed and can be negative in any year. This rate is an illustrative assumption, not a forecast or a recommendation.</p>
          </div>

          <div class="field">
            <label class="check" for="infl">
              <input id="infl" type="checkbox">
              <span>Show results in today's dollars<br><span class="hint">Assumes 2.5% inflation, so the return is adjusted to match.</span></span>
            </label>
          </div>

          <div class="field" id="filebox">
            <span class="lab">Save your work</span>
            <div class="filebar">
              <button type="button" class="btn small" id="saveBtn">Save to file</button>
              <button type="button" class="btn small alt" id="openBtn">Open a saved file</button>
              <input type="file" id="openFile" accept=".json,application/json" hidden>
            </div>
            <p class="hint"><span id="saveState">No changes yet</span>. Saving creates a file on your own device. Opening a file replaces the entries above. Nothing you enter is sent anywhere.</p>
            <p class="hint msg" id="fileMsg" role="status"></p>
          </div>
        </form>

        <div class="panel" aria-live="polite">
          <div class="result-top">
            <span class="lab">Yearly amount to offset the gap</span>
            <div class="big"><span id="annual">$0</span><small id="monthly">about $0 a month</small></div>
          </div>

          <div class="stats">
            <div class="stat"><span class="lab">Yearly pay gap</span><span class="val" id="gapYr">$0</span></div>
            <div class="stat"><span class="lab">Gap over your career</span><span class="val" id="target">$0</span></div>
            <div class="stat"><span class="lab">You put in</span><span class="val" id="put">$0</span></div>
            <div class="stat"><span class="lab">Growth does the rest</span><span class="val" id="growth">$0</span></div>
          </div>

          <div class="chart-box"><div id="chart"></div></div>
          <p class="legend">
            <span><i style="background:var(--accent)"></i>Account balance</span>
            <span><i style="background:var(--gold)"></i>Total you contributed</span>
          </p>
        </div>
      </section>

      <section class="panel">
        <h2>How the return you earn changes the answer</h2>
        <div class="scroll">
          <table>
            <thead><tr><th>Yearly return</th><th class="r">Per year</th><th class="r">Per month</th></tr></thead>
            <tbody id="rows"></tbody>
          </table>
        </div>
      </section>

      <section class="panel" aria-labelledby="h-res">
        <h2 id="h-res">Next steps: Kentucky resources</h2>
        <p class="lede">Put your number to work. These resources can help you save for retirement, bank at a credit union, get advice and invest on your own.</p>
        <div class="split">
          <article class="bill">
            <header><h3>Save for retirement</h3><span class="tag">IRA and 401(k)</span></header>
            <p><strong>401(k):</strong> a plan through your employer. Ask your employer whether it offers one and whether it matches your contributions. The 2026 employee limit is $24,500.</p>
            <p><strong>IRA:</strong> an account you open yourself at a bank, credit union or brokerage. The 2026 limit is $7,500, and income rules apply to some tax benefits.</p>
            <p class="status" id="irsHint"></p>
            <ul class="chips">
              <li><a href="https://www.irs.gov/retirement-plans/401k-plans">IRS: 401(k) plans</a></li>
              <li><a href="https://www.irs.gov/retirement-plans/individual-retirement-arrangements-iras">IRS: IRAs</a></li>
              <li><a href="https://www.irs.gov/retirement-plans">IRS: all retirement plans</a></li>
            </ul>
          </article>
          <article class="bill">
            <header><h3>Bank with a credit union</h3><span class="tag">Savings and loans</span></header>
            <p>Credit unions are member-owned and often charge lower fees and offer lower loan rates than other lenders. Look for one near you and check that it is federally insured or state regulated.</p>
            <ul class="chips">
              <li><a href="https://mycreditunion.gov/about-credit-unions/credit-union-locator">Find a credit union (NCUA)</a></li>
              <li><a href="https://kfi.ky.gov/">Kentucky Department of Financial Institutions</a></li>
            </ul>
          </article>
          <article class="bill">
            <header><h3>Connect with a financial advisor</h3><span class="tag">Get personal advice</span></header>
            <p>An advisor can build a plan around your income, debts and goals. Ask whether the advisor is a fiduciary, which means legally required to act in your best interest, and how they are paid. A fee-only advisor is paid by you, not by commissions on products.</p>
            <p class="status">Before you hire anyone, look them up in the free SEC and FINRA databases to see their record.</p>
            <ul class="chips">
              <li><a href="https://www.letsmakeaplan.org/">Find a CFP professional</a></li>
              <li><a href="https://www.napfa.org/">NAPFA fee-only advisors</a></li>
              <li><a href="https://www.investor.gov/backgroundcheck">Check an adviser (SEC)</a></li>
              <li><a href="https://brokercheck.finra.org/">BrokerCheck (FINRA)</a></li>
            </ul>
          </article>
          <article class="bill">
            <header><h3>Invest on your own</h3><span class="tag">Self-directed services</span></header>
            <p>Brokerage firms let you open an IRA or a regular investment account online and choose your own funds, often with no advisor fee. Compare fees, fund choices and account minimums before you pick one. These are examples, not endorsements, and this page does not recommend any account, fund or security.</p>
            <ul class="chips">
              <li><a href="https://www.fidelity.com/">Fidelity</a></li>
              <li><a href="https://www.schwab.com/">Charles Schwab</a></li>
              <li><a href="https://investor.vanguard.com/">Vanguard</a></li>
              <li><a href="https://www.investor.gov/">Investor.gov (learn the basics)</a></li>
            </ul>
          </article>
        </div>
        <p class="hint" style="margin-top:14px">Contribution limits change each year and program rules change often. Confirm details with the official source before you act.</p>
      </section>

      <section class="nextbar" aria-label="Next step">
        <p>Saving covers part of the problem. Ending the gap takes changes in law and in workplaces.</p>
        <span style="display:flex;flex-wrap:wrap;gap:12px">
          <a class="btn alt" href="#start"><span aria-hidden="true">&larr;</span> The gap</a>
          <a class="btn" href="#take-action">How to end the gap <span aria-hidden="true">&rarr;</span></a>
        </span>
      </section>

      <section class="note" aria-label="Method">
        <p><strong>How this works.</strong> The yearly gap is NWLC's Kentucky lifetime loss for the group you pick, divided by 40 years. If you enter a salary, the gap is the difference between your pay and what a white, non-Hispanic man would earn at that group's cents-on-the-dollar ratio. The yearly amount is the sum that, set aside each year and growing at your chosen illustrative return, reaches the career gap, assuming one deposit at the end of each year.</p>
        <p><strong>What it does not do.</strong> Investing does not close the pay gap itself. It is a savings target that offsets the lost earnings. The figures are medians for each group, not a prediction for any one person. Investment returns can be lower or negative in any year. This page is for education and is not financial advice.</p>
        <p><strong>Sources.</strong> National Women's Law Center, March 2026 tables, not adjusted for inflation, using 2020 to 2024 American Community Survey 5-year estimates. See the sources on <a href="#start">page 1</a>. To learn about retirement account types, visit the <a href="https://www.irs.gov/retirement-plans">IRS retirement plans page</a>.</p>
      </section>
    </main>
  </div>
</div>

<!-- PAGE 3: END THE GAP -->
<div class="page" id="page-take-action" hidden>
  <div class="hero">
    <div class="in">
      <div class="kicker">Step 3 &middot; End the gap</div>
      <h1 tabindex="-1">Close the gap at its source.</h1>
      <p>Investing helps you plan. Laws and employers decide what you are paid. Here is who represents Kentucky, what is on the table, and how to make your voice count.</p>
    </div>
  </div>
  <div class="in">
    <main>
      <section class="panel" aria-labelledby="h-fed">
        <h2 id="h-fed">Your members of Congress</h2>
        <p class="lede">Kentucky has two U.S. senators and six U.S. representatives. Several seats change hands when the new Congress is sworn in on January 3, 2027.</p>
        <div class="scroll">
          <table>
            <thead><tr><th>Member</th><th>Office</th><th>Party</th><th>Contact</th></tr></thead>
            <tbody>
              <tr><td>Mitch McConnell</td><td>U.S. Senator<br><span class="hint">Retiring. Term ends January 2027.</span></td><td>R</td><td><a href="https://www.mcconnell.senate.gov/">Official site</a></td></tr>
              <tr><td>Rand Paul</td><td>U.S. Senator</td><td>R</td><td><a href="https://www.paul.senate.gov/">Official site</a></td></tr>
              <tr><td>Andy Barr</td><td>Senator-elect<br><span class="hint">Currently represents the 6th District. Takes McConnell's seat in January 2027.</span></td><td>R</td><td><a href="https://barr.house.gov/contact">Official site</a></td></tr>
              <tr><td>James Comer</td><td>U.S. Representative, 1st District<br><span class="hint">Re-elected November 2026.</span></td><td>R</td><td><a href="https://comer.house.gov/">Official site</a></td></tr>
              <tr><td>Brett Guthrie</td><td>U.S. Representative, 2nd District<br><span class="hint">Re-elected November 2026.</span></td><td>R</td><td><a href="https://guthrie.house.gov/contact-brett/">Official site</a></td></tr>
              <tr><td>Morgan McGarvey</td><td>U.S. Representative, 3rd District<br><span class="hint">Re-elected November 2026. Cosponsor of the Paycheck Fairness Act.</span></td><td>D</td><td><a href="https://mcgarvey.house.gov/">Official site</a></td></tr>
              <tr><td>Thomas Massie</td><td>U.S. Representative, 4th District<br><span class="hint">Term ends January 2027. Ed Gallrein (R) won the seat in November 2026.</span></td><td>R</td><td><a href="https://massie.house.gov/contact/offices">Official site</a></td></tr>
              <tr><td>Hal Rogers</td><td>U.S. Representative, 5th District<br><span class="hint">Re-elected November 2026.</span></td><td>R</td><td><a href="https://halrogers.house.gov/contact/offices.htm">Official site</a></td></tr>
              <tr><td>Zach Dembo</td><td>Representative-elect, 6th District<br><span class="hint">Won the open seat in November 2026. Sworn in January 2027.</span></td><td>D</td><td>Site opens when sworn in</td></tr>
            </tbody>
          </table>
        </div>
        <div class="callout" style="margin-top:18px">
          <p><strong>Reach any member of Congress:</strong> call the Capitol Switchboard at <span class="phone">202-224-3121</span> and ask for your senator or representative by name.</p>
          <p>Not sure who represents you? <a href="https://www.house.gov/representatives/find-your-representative">Find your representative</a> or <a href="https://www.senate.gov/senators/senators-contact.htm">find your senators</a>. Contact details for incoming members will appear on those official sites after they take office.</p>
        </div>
      </section>

      <section class="panel" aria-labelledby="h-state">
        <h2 id="h-state">Your Kentucky legislators</h2>
        <p class="lede">State law sets pay rules for most Kentucky workplaces. The General Assembly's next regular session begins in January 2027.</p>
        <div class="callout">
          <p><strong>Leave a message for any legislator:</strong> call the General Assembly Message Line at <span class="phone">1-800-372-7181</span>. Kentuckians with hearing loss can use Kentucky Relay by dialing <span class="phone">7-1-1</span>.</p>
          <p>To find your state senator and representative and track bills, visit the <a href="https://legislature.ky.gov/pages/index.aspx">Kentucky General Assembly website</a>.</p>
        </div>
      </section>

      <section class="panel" aria-labelledby="h-bills">
        <h2 id="h-bills">Legislation to end the gap</h2>
        <p class="lede">Bills below target pay discrimination and pay secrecy. Statuses come from the official records. Bills that do not pass by the end of a session must be filed again in the next one.</p>
        <div class="bills">
          <article class="bill">
            <header><h3>Paycheck Fairness Act (H.R. 17 and S. 1115)</h3><span class="tag">Federal &middot; 119th Congress</span></header>
            <p>Strengthens legal remedies for people who face sex-based pay discrimination by amending the Fair Labor Standards Act.</p>
            <p class="status"><strong>Status:</strong> Introduced March 25, 2025 and referred to committee in both chambers. No further action recorded. <strong>Kentucky:</strong> Rep. Morgan McGarvey is a cosponsor.</p>
            <ul class="chips"><li><a href="https://www.congress.gov/bill/119th-congress/house-bill/17">H.R. 17 on Congress.gov</a></li><li><a href="https://www.congress.gov/bill/119th-congress/senate-bill/1115">S. 1115 on Congress.gov</a></li></ul>
          </article>
          <article class="bill">
            <header><h3>House Bill 210: Wage transparency</h3><span class="tag">Kentucky &middot; 2026 session</span></header>
            <p>Would require employers to include the wage or wage range, and a description of benefits, in every job posting.</p>
            <p class="status"><strong>Status:</strong> Sponsored by N. Kulkarni. Sent to the House Economic Development and Workforce Investment Committee on January 14, 2026, with no further action recorded. It would need to be filed again in 2027.</p>
            <ul class="chips"><li><a href="https://apps.legislature.ky.gov/record/26rs/hb210.html">HB 210 on the General Assembly site</a></li></ul>
          </article>
          <article class="bill">
            <header><h3>Other 2026 Kentucky bills that affect women's pay and savings</h3><span class="tag">Kentucky &middot; 2026 session</span></header>
            <p>Each bill was filed in the 2026 session. Open the record to read the text and see its status.</p>
            <ul class="chips">
              <li><a href="https://apps.legislature.ky.gov/record/26rs/hb771.html">HB 771 &middot; Earned paid sick leave</a></li>
              <li><a href="https://apps.legislature.ky.gov/record/26rs/hb556.html">HB 556 &middot; Unpaid family care leave</a></li>
              <li><a href="https://apps.legislature.ky.gov/record/26rs/hb24.html">HB 24 &middot; Advance notice of work schedules</a></li>
              <li><a href="https://apps.legislature.ky.gov/record/26rs/hb597.html">HB 597 &middot; Commonwealth Retirement Savings Plan</a></li>
              <li><a href="https://apps.legislature.ky.gov/record/26rs/hb349.html">HB 349 &middot; State minimum wage increase</a></li>
            </ul>
          </article>
        </div>
        <div class="callout" style="margin-top:18px">
          <p><strong>What the law says today.</strong> Kentucky already bars employers from paying employees of one sex less than the other for comparable work in the same establishment (KRS 337.420 and following). Kentucky has no statewide law that requires pay ranges in job postings.</p>
        </div>
      </section>

      <section class="panel" aria-labelledby="h-fair">
        <h2 id="h-fair">Get paid fairly</h2>
        <p class="lede">If you think you are paid less than a coworker of another sex for comparable work, these offices can answer questions and take complaints.</p>
        <div class="callout">
          <p>Kentucky law bars paying employees of one sex less than the other for comparable work in the same workplace. The Education and Labor Cabinet's wage and hour division answers questions at <span class="phone">502-564-3534</span>.</p>
        </div>
        <ul class="chips">
          <li><a href="https://elc.ky.gov/">Kentucky Education and Labor Cabinet</a></li>
          <li><a href="https://kchr.ky.gov/">Kentucky Commission on Human Rights</a></li>
          <li><a href="https://www.eeoc.gov/">U.S. EEOC</a></li>
          <li><a href="https://nwlc.org/resource/the-lifetime-wage-gap-state-by-state/">NWLC wage gap data</a></li>
        </ul>
      </section>

      <section class="panel" aria-labelledby="h-do">
        <h2 id="h-do">What you can do this week</h2>
        <ol class="do">
          <li><strong>Call your legislators.</strong> Use the numbers above. Ask them to support equal pay and wage transparency bills in the 2027 session.</li>
          <li><strong>Ask for the pay range.</strong> Before you apply for or accept a job, ask what the pay range is. Ask what raises are based on.</li>
          <li><strong>Negotiate with numbers.</strong> Use this calculator to see what a gap costs you over a career, then ask for pay based on the work, not your last salary.</li>
          <li><strong>Know where to report discrimination.</strong> You can file a complaint with the <a href="https://kchr.ky.gov/">Kentucky Commission on Human Rights</a> or the <a href="https://www.eeoc.gov/">U.S. Equal Employment Opportunity Commission</a>. Filing deadlines apply, so act soon after you learn of a problem.</li>
        </ol>
        <p class="script"><strong>Sample call:</strong> "My name is [name] and I live in [town]. I am calling to ask [legislator] to support pay equity and pay transparency legislation. Kentucky women lose an estimated $395,520 over a career to the wage gap, and the loss is larger for Black women and Latinas. Thank you."</p>
      </section>

      <section class="nextbar" aria-label="Back">
        <p>This page is for education. Contact details and bill statuses change, so confirm them on the official sites before you call or write.</p>
        <span style="display:flex;flex-wrap:wrap;gap:12px">
          <a class="btn alt" href="#calculator"><span aria-hidden="true">&larr;</span> Your number</a>
          <a class="btn alt" href="#start">Back to the gap</a>
        </span>
      </section>
    </main>
  </div>
</div>

<footer class="foot">
  <div class="in">
    <p><strong>Educational use only.</strong> This page is an educational tool. It is not financial, investment, tax or legal advice, and neither Globefin nor the University of Kentucky endorses any calculation or conclusion on it. It does not recommend any account, fund or security.</p>
    <p><strong>Your information stays with you.</strong> Nothing you enter is sent anywhere. The page needs no account, password or API key, and it works without a connection. Saved files go only to your own device.</p>
    <p><strong>Outside service.</strong> The page loads two typefaces, Archivo and Public Sans, from Google Fonts. That request carries no financial or personal information. If it fails, the page uses your device's own fonts and works the same. Links to other sites open only when you click them.</p>
    <p><strong>Credits.</strong> Wage gap data from the National Women's Law Center. Archivo (Omnibus-Type) and Public Sans (U.S. Web Design System) are open fonts under the SIL Open Font License. Built by Ella Hensley with help from an AI assistant. &copy; 2026 Ella Hensley. Released under the MIT License.</p>
  </div>
</footer>

<script>
(function () {
  var CAREER_YEARS = 40;
  var INFLATION = 0.025;
  // Kentucky figures from NWLC, Lifetime Wage Gap Losses by State, March 2026.
  // loss = 40-year loss in dollars; cents = pay per $1 paid to the comparison group; age = catch-up age.
  var GROUPS = {
    white:  { label: "White, non-Hispanic women", vs: "white, non-Hispanic men", loss: 507960, cents: 79, age: 70,
              note: "Compared with white, non-Hispanic men, using 2020 to 2024 Census data." },
    black:  { label: "Black women", vs: "white, non-Hispanic men", loss: 762320, cents: 69, age: 78,
              note: "Compared with white, non-Hispanic men, using 2020 to 2024 Census data." },
    latina: { label: "Latinas", vs: "white, non-Hispanic men", loss: 911240, cents: 63, age: 84,
              note: "Compared with white, non-Hispanic men, using 2020 to 2024 Census data." },
    asian:  { label: "Asian women", vs: "white, non-Hispanic men", loss: 439000, cents: 82, age: 69,
              note: "Compared with white, non-Hispanic men, using 2020 to 2024 Census data." }
  };
  var OVERALL = { label: "All women (compared with all men)", loss: 395520, cents: 83, age: 68 };

  var $ = function (id) { return document.getElementById(id); };
  var money = function (v) { return "$" + Math.round(v).toLocaleString("en-US"); };
  var compact = function (v) {
    if (v >= 1e6) return "$" + (v / 1e6).toFixed(v % 1e6 === 0 ? 0 : 1) + "M";
    if (v >= 1e3) return "$" + (v / 1e3).toFixed(v % 1e3 === 0 ? 0 : 1).replace(/\.0$/, "") + "K";
    return "$" + Math.round(v);
  };

  /* ---------- Page 1: facts ---------- */
  function buildFacts() {
    var list = Object.keys(GROUPS).map(function (k) { return GROUPS[k]; });
    list.sort(function (a, b) { return b.loss - a.loss; });
    var max = list[0].loss, bars = "", rows = "";
    list.concat([OVERALL]).forEach(function (g, i) {
      var ref = g === OVERALL;
      bars += '<div class="bar-row' + (ref ? " ref" : "") + '" role="listitem" tabindex="0" data-k="' + i + '"><span class="name">' + g.label +
        '</span><span class="bar-track"><span class="bar-fill" style="width:' + (g.loss / max * 100).toFixed(1) + '%"></span></span><span class="val">' + money(g.loss) + '</span></div>';
      rows += '<tr' + (ref ? ' class="ref"' : "") + ' data-k="' + i + '"><td>' + g.label + '</td><td class="r">' + g.cents + '&cent;</td><td class="r">' +
        money(g.loss / CAREER_YEARS) + '</td><td class="r">' + money(g.loss) + '</td><td class="r">' + g.age + '</td></tr>';
    });
    $("bars").innerHTML = bars;
    $("gapRows").innerHTML = rows;

    // Hovering or focusing a bar or a table row highlights the same group in both.
    function mark(e, on) {
      var el = e.target.closest ? e.target.closest("[data-k]") : null;
      if (!el) return;
      var k = el.getAttribute("data-k");
      [$("bars"), $("gapRows")].forEach(function (box) {
        var m = box.querySelector('[data-k="' + k + '"]');
        if (m) m.classList.toggle("hl", on);
      });
    }
    [$("bars"), $("gapRows")].forEach(function (box) {
      box.addEventListener("mouseover", function (e) { mark(e, true); });
      box.addEventListener("mouseout", function (e) { mark(e, false); });
      box.addEventListener("focusin", function (e) { mark(e, true); });
      box.addEventListener("focusout", function (e) { mark(e, false); });
    });
  }

  /* ---------- Page 2: calculator ---------- */
  function factor(r, n) { return r === 0 ? n : (Math.pow(1 + r, n) - 1) / r; }
  function nice(x) {
    var e = Math.pow(10, Math.floor(Math.log10(x))), f = x / e;
    var nf = f <= 1 ? 1 : f <= 2 ? 2 : f <= 2.5 ? 2.5 : f <= 5 ? 5 : 10;
    return nf * e;
  }

  function read() {
    var salary = parseFloat($("salary").value);
    var hasSalary = isFinite(salary) && salary > 0;
    var g = GROUPS[$("grp").value] || GROUPS.white;
    var gap = hasSalary ? salary / (g.cents / 100) - salary : g.loss / CAREER_YEARS;
    var years = parseInt($("years").value, 10);
    var nominal = parseFloat($("ret").value) / 100;
    var real = $("infl").checked;
    var r = real ? (1 + nominal) / (1 + INFLATION) - 1 : nominal;
    return { gap: gap, hasSalary: hasSalary, years: years, nominal: nominal, r: r, real: real, grp: g };
  }

  function contribution(gap, years, r) { return gap * years / factor(r, years); }

  function drawChart(s, c) {
    var W = 640, H = 300, L = 58, R = 18, T = 30, B = 34;
    var target = s.gap * s.years;
    var ymax = nice(target * 1.02);
    var pw = W - L - R, ph = H - T - B;
    var X = function (t) { return L + (t / s.years) * pw; };
    var Y = function (v) { return T + ph - (v / ymax) * ph; };

    var out = '<svg viewBox="0 0 ' + W + ' ' + H + '" role="img" aria-label="Chart of account balance growing to ' + money(target) + ' over ' + s.years + ' years">';
    for (var i = 0; i <= 4; i++) {
      var v = ymax * i / 4, y = Y(v);
      out += '<line x1="' + L + '" x2="' + (W - R) + '" y1="' + y + '" y2="' + y + '" stroke="var(--chart-grid)" stroke-width="1"/>';
      out += '<text x="' + (L - 8) + '" y="' + (y + 4) + '" text-anchor="end" font-size="12" fill="var(--muted)" font-family="var(--font-body)">' + compact(v) + '</text>';
    }
    var step = s.years <= 10 ? 2 : s.years <= 20 ? 5 : 10, ticks = [];
    for (var t = 0; t <= s.years; t += step) ticks.push(t);
    if (s.years - ticks[ticks.length - 1] >= step / 2) ticks.push(s.years);
    ticks.forEach(function (t) {
      out += '<text x="' + X(t) + '" y="' + (H - 12) + '" text-anchor="middle" font-size="12" fill="var(--muted)" font-family="var(--font-body)">' + (t === 0 ? "Now" : "Yr " + t) + '</text>';
    });

    var bal = [], con = [];
    for (var k = 0; k <= s.years; k++) {
      bal.push([X(k), Y(c * factor(s.r, k))]);
      con.push([X(k), Y(c * k)]);
    }
    var pts = function (a) { return a.map(function (p) { return p[0].toFixed(1) + "," + p[1].toFixed(1); }).join(" "); };
    out += '<polygon points="' + L + ',' + Y(0) + ' ' + pts(bal) + ' ' + X(s.years) + ',' + Y(0) + '" fill="var(--accent)" fill-opacity="0.14"/>';
    out += '<polyline points="' + pts(con) + '" fill="none" stroke="var(--gold)" stroke-width="3" stroke-linejoin="round" stroke-linecap="round"/>';
    out += '<polyline points="' + pts(bal) + '" fill="none" stroke="var(--accent)" stroke-width="3" stroke-linejoin="round" stroke-linecap="round"/>';

    var eb = bal[bal.length - 1], ec = con[con.length - 1];
    out += '<circle cx="' + eb[0] + '" cy="' + eb[1] + '" r="5" fill="var(--accent)"/>';
    out += '<text x="' + (eb[0] - 8) + '" y="' + (eb[1] - 10) + '" text-anchor="end" font-size="13" font-weight="600" fill="var(--accent)" font-family="var(--font-body)">' + money(target) + '</text>';
    if (s.r > 0.0001 && Math.abs(ec[1] - eb[1]) > 26) {
      out += '<circle cx="' + ec[0] + '" cy="' + ec[1] + '" r="5" fill="var(--gold)"/>';
      out += '<text x="' + (ec[0] - 8) + '" y="' + (ec[1] + 20) + '" text-anchor="end" font-size="13" font-weight="600" fill="var(--gold)" font-family="var(--font-body)">' + money(c * s.years) + '</text>';
    }
    out += '</svg>';
    $("chart").innerHTML = out;
  }

  function update() {
    var s = read();
    var c = contribution(s.gap, s.years, s.r);
    var target = s.gap * s.years;
    var g = s.grp;

    $("yearsOut").textContent = s.years;
    $("retOut").textContent = (s.nominal * 100).toFixed(1) + "%";
    $("salaryHint").textContent = s.hasSalary
      ? "Your gap is estimated at " + money(s.gap) + " a year, using the " + g.cents + "-cent ratio for " + g.label + " in Kentucky."
      : "Leave blank to use the typical gap for " + g.label + " in Kentucky, " + money(g.loss / CAREER_YEARS) + " a year.";
    $("grpHint").textContent = g.note;
    $("irsHint").textContent = c <= 7500
      ? "For comparison, your yearly amount of " + money(c) + " is below the 2026 IRA contribution limit of $7,500."
      : c <= 24500
        ? "For comparison, your yearly amount of " + money(c) + " is above the 2026 IRA limit of $7,500 and below the 2026 401(k) employee limit of $24,500."
        : "For comparison, your yearly amount of " + money(c) + " is above both the 2026 IRA limit of $7,500 and the 401(k) employee limit of $24,500.";

    $("annual").textContent = money(c);
    $("monthly").textContent = "about " + money(c / 12) + " a month";
    $("gapYr").textContent = money(s.gap);
    $("target").textContent = money(target);
    $("put").textContent = money(c * s.years);
    $("growth").textContent = money(Math.max(0, target - c * s.years));
    drawChart(s, c);

    var rates = [0, 0.04, 0.05, 0.06, 0.07], rows = "";
    rates.forEach(function (n) {
      var r = s.real ? (1 + n) / (1 + INFLATION) - 1 : n;
      var a = contribution(s.gap, s.years, r);
      var on = Math.abs(n - s.nominal) < 0.0001 ? ' class="on"' : "";
      rows += "<tr" + on + "><td>" + (n * 100).toFixed(0) + "%</td><td class=\"r\">" + money(a) + "</td><td class=\"r\">" + money(a / 12) + "</td></tr>";
    });
    $("rows").innerHTML = rows;
    refreshDirty();
  }

  ["grp", "salary", "years", "ret", "infl"].forEach(function (id) {
    $(id).addEventListener("input", update);
    $(id).addEventListener("change", update);
  });

  /* ---------- Save and open a plan file ---------- */
  var APP_ID = "kentucky-wage-gap-calculator";
  var savedSnapshot = "";
  var dirty = false;
  var everSaved = false;

  function getState() {
    var s = parseFloat($("salary").value);
    return {
      group: $("grp").value,
      salary: isFinite(s) && s > 0 ? s : null,
      years: parseInt($("years").value, 10),
      returnPct: parseFloat($("ret").value),
      inflation: $("infl").checked
    };
  }

  function refreshDirty() {
    dirty = JSON.stringify(getState()) !== savedSnapshot;
    $("saveState").textContent = dirty ? "Unsaved changes" : (everSaved ? "All changes saved" : "No changes yet");
  }

  function say(text, isError) {
    var m = $("fileMsg");
    m.textContent = text;
    m.className = "hint msg" + (isError ? " err" : "");
  }

  function saveFile() {
    try {
      var payload = { app: APP_ID, version: 1, savedAt: new Date().toISOString(), data: getState() };
      var blob = new Blob([JSON.stringify(payload, null, 2)], { type: "application/json" });
      var url = URL.createObjectURL(blob);
      var a = document.createElement("a");
      a.href = url;
      a.download = "kentucky-wage-gap-plan.json";
      document.body.appendChild(a);
      a.click();
      a.remove();
      setTimeout(function () { URL.revokeObjectURL(url); }, 1500);
      savedSnapshot = JSON.stringify(payload.data);
      everSaved = true;
      refreshDirty();
      say("Saved as kentucky-wage-gap-plan.json. If nothing downloaded, your browser may have blocked it.", false);
    } catch (e) {
      say("Could not save the file. Your entries are still here.", true);
    }
  }

  function validate(obj) {
    var bad = function (why) { return { ok: false, why: why }; };
    if (!obj || typeof obj !== "object" || Array.isArray(obj)) return bad("It does not look like a saved plan.");
    if (obj.app !== APP_ID) return bad("It was not saved by this calculator.");
    if (obj.version !== 1) return bad("It was saved by a different version.");
    var d = obj.data;
    if (!d || typeof d !== "object") return bad("The saved entries are missing.");
    if (typeof d.group !== "string" || !Object.prototype.hasOwnProperty.call(GROUPS, d.group)) return bad("The saved group is not one of the groups on this page.");
    var sal = d.salary;
    if (sal !== null && !(typeof sal === "number" && isFinite(sal) && sal >= 0 && sal <= 10000000)) return bad("The saved salary is not a valid amount.");
    if (!(Number.isInteger(d.years) && d.years >= 5 && d.years <= 40)) return bad("The saved years are outside 5 to 40.");
    var r = d.returnPct;
    if (!(typeof r === "number" && isFinite(r) && r >= 0 && r <= 10 && Math.abs(r * 2 - Math.round(r * 2)) < 1e-9)) return bad("The saved return is outside 0 to 10 percent.");
    if (typeof d.inflation !== "boolean") return bad("The saved inflation setting is not valid.");
    return { ok: true, data: { group: d.group, salary: sal === 0 ? null : sal, years: d.years, returnPct: r, inflation: d.inflation } };
  }

  function openFileObject(file) {
    var fail = function (why) { say("Could not open that file. " + why + " Your current entries were not changed.", true); };
    if (!file) return;
    if (file.size > 100000) { fail("It is too large to be a saved plan."); return; }
    var reader = new FileReader();
    reader.onerror = function () { fail("The file could not be read."); };
    reader.onload = function () {
      var obj;
      try { obj = JSON.parse(String(reader.result)); } catch (e) { fail("It is not a valid saved plan."); return; }
      var v = validate(obj);
      if (!v.ok) { fail(v.why); return; }
      var d = v.data;
      $("grp").value = d.group;
      $("salary").value = d.salary === null ? "" : String(d.salary);
      $("years").value = String(d.years);
      $("ret").value = String(d.returnPct);
      $("infl").checked = d.inflation;
      update();
      savedSnapshot = JSON.stringify(getState());
      everSaved = true;
      refreshDirty();
      say("Opened " + file.name + ".", false);
    };
    reader.readAsText(file);
  }

  $("saveBtn").addEventListener("click", saveFile);
  $("openBtn").addEventListener("click", function () { $("openFile").click(); });
  $("openFile").addEventListener("change", function () {
    var f = this.files && this.files[0];
    this.value = "";
    openFileObject(f);
  });
  window.addEventListener("beforeunload", function (e) {
    if (!dirty) return;
    e.preventDefault();
    e.returnValue = "";
    return "";
  });

  /* ---------- Page routing by URL hash ---------- */
  var PAGES = ["start", "calculator", "take-action"];
  var first = true;
  function route() {
    var h = (location.hash || "#start").slice(1);
    if (PAGES.indexOf(h) < 0) h = "start";
    PAGES.forEach(function (p) {
      $("page-" + p).hidden = p !== h;
      var a = $("nav-" + p);
      if (p === h) a.setAttribute("aria-current", "page"); else a.removeAttribute("aria-current");
    });
    if (h === "calculator") update();
    if (!first) {
      window.scrollTo(0, 0);
      var head = $("page-" + h).querySelector("h1");
      if (head) head.focus({ preventScroll: true });
    }
    first = false;
  }
  window.addEventListener("hashchange", route);

  buildFacts();
  update();
  savedSnapshot = JSON.stringify(getState());
  refreshDirty();
  route();
})();
</script>

Reaches out to

Websites this page contacts when it runs — fonts, chart libraries, data. Found by reading its source.

  • fonts.googleapis.com
  • nwlc.org
  • www.irs.gov
  • mycreditunion.gov
  • kfi.ky.gov
  • www.letsmakeaplan.org
  • www.napfa.org
  • www.investor.gov
  • brokercheck.finra.org
  • www.fidelity.com
  • www.schwab.com
  • investor.vanguard.com

Licence

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 Ella Hensley. Licensed under the MIT License. Published on Globefin.

Provided as is, without warranty. Any external libraries it loads keep their own licences. Terms →

Sandbox

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.