✦ 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-aca> 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-aca {
  --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/aca.js"></script>

<retirement-calc-aca></retirement-calc-aca>

Or pre-seed values relevant to your audience:

<retirement-calc-aca
  plan-type="household"
  current-age="55"
  retirement-age="60"
  annual-magi="70000"
  household-size="2">
</retirement-calc-aca>

Attributes

AttributeDefaultRange
plan-typehouseholdsingle or household
current-age5545 – 64 (must be pre-Medicare)
retirement-age60currentAge – 65 (when ACA coverage starts)
annual-magi700000 – 300,000 (Modified Adjusted Gross Income during bridge years, today's $)
household-size21 – 6 (drives Federal Poverty Level threshold)

Theming

Override CSS custom properties on the host:

retirement-calc-aca {
  --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-aca')
  .addEventListener('rc-calculated', (e) => {
    console.log('Cliff status:', e.detail.cliffStatus);
    console.log('Annual premium range:', e.detail.annualPremiumLow, '-', e.detail.annualPremiumHigh);
    console.log('Total bridge cost:', e.detail.totalBridgeCostLow, '-', e.detail.totalBridgeCostHigh);
    
  });

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