✦ Embeddable · v1

An embeddable retirement calculator that answers one question.

When could you actually retire? Drop a single script tag into your site, then use <retirement-calc-rmd> as a custom HTML element anywhere on the page.

Sibling of <retirement-calc-spend> — same engine, different question.

Live demos

Default (single, defaults)

Themed (orange accent, household, pre-seeded)

Preview your theme

Pick colors that match your site, then copy the CSS snippet at the bottom.

Theme colors

Big number, slider thumb, CTA button
#4f8ec9
Outer surface of the calc
#ffffff
Result area + toggle background
#f7f9fc
Title, slider values, result subline
#1a1f2e
retirement-calc-rmd {
  --rc-accent: #4f8ec9;
  --rc-bg: #ffffff;
  --rc-surf: #f7f9fc;
  --rc-text: #1a1f2e;
}

Integration code

Drop this into your HTML:

<script src="https://app.retirementscenario.com/embed/v1/rmd.js"></script>

<retirement-calc-rmd></retirement-calc-rmd>

Or pre-seed values relevant to your audience:

<retirement-calc-rmd
  plan-type="household"
  current-age="62"
  current-balance="1400000"
  contrib-annual="20000"
  retirement-age="65"
  return-pct="6.5">
</retirement-calc-rmd>

Attributes

AttributeDefaultRange
current-age6040 – 85
current-balance8000000 – 5,000,000 (pre-tax: 401k + traditional IRA combined)
contrib-annual150000 – 50,000 (assumed until retirement-age, then stops)
retirement-age65currentAge – 80 (when contributions stop)
return-pct7.04.0 – 10.0 (nominal annual %)
plan-typesinglesingle or household
refsrc(none)partner attribution tag

Theming

Override CSS custom properties on the host:

retirement-calc-rmd {
  --rc-accent: #ff6b35;    /* primary color */
  --rc-bg: #ffffff;        /* card background */
  --rc-surf: #f7f9fc;      /* sub-surface (result area) */
  --rc-text: #1a1f2e;
  --rc-muted: #6a7280;
  --rc-border: rgba(20,30,50,0.10);
  --rc-radius: 12px;
}

Events

The element emits two custom events you can listen to:

document.querySelector('retirement-calc-rmd')
  .addEventListener('rc-calculated', (e) => {
    console.log('First RMD at age:', e.detail.firstRMDAge);
    console.log('First RMD amount:', e.detail.firstRMD);
  });

document.querySelector('retirement-calc-rmd')
  .addEventListener('rc-cta-clicked', (e) => {
    console.log('User clicked CTA to:', e.detail.url);
  });