✦ Embeddable · v1

An embeddable retirement calculator that answers one question.

How much can I get into Roth this year? Drop a single script tag into your site, then use <retirement-calc-backdoor> as a custom HTML element anywhere on the page. Consolidates 3 strategies under one composite question: direct Roth IRA, Backdoor Roth IRA, and Mega Backdoor Roth. Eligibility status + dollar room for each, plus pro-rata warnings + plan-allows checks.

Composes with <retirement-calc-irmaa> (Medicare surcharge cliff) and <retirement-calc-roth> (Roth conversion sweet spot) as the Roth-strategies discovery trio.

Live demos

Default (HH 45yo, $300K MAGI, plan allows mega)

Themed (single 50yo with pro-rata issue, plan doesn't allow mega)

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

<retirement-calc-backdoor></retirement-calc-backdoor>

Or pre-seed values relevant to your audience:

<retirement-calc-backdoor
  plan-type="household"
  current-age="45"
  annual-magi="300000"
  current-401k="24500"
  employer-match="20000"
  existing-trad-ira="0"
  plan-allows-mega="yes">
</retirement-calc-backdoor>

Attributes

AttributeDefaultRange
plan-typehouseholdsingle or household (= MFJ — affects MAGI phase-out threshold)
current-age4525 – 70 (≥50 enables IRA catch-up + 401(k) catch-up; 60-63 enables SECURE 2.0 super catch-up)
annual-magi30000030,000 – 500,000 (household combined modified AGI)
current-401k245000 – 35,750 (your employee 401(k) deferral this year)
employer-match200000 – 50,000 (annual employer match contribution)
existing-trad-ira00 – 1,000,000 (pre-tax Trad IRA balance — triggers pro-rata warning)
plan-allows-megayesyes or no (does your 401(k) support after-tax + Roth conversion?)
refsrc(none)partner attribution tag

Honest scope: 2026 IRS limits (refresh annually with the engine's IRS-limits refresh slice). Models USER's IRA only — for HH plans, the spouse can do the same backdoor strategy independently (effectively doubling the total). Mega Backdoor room is calculated from YOUR plan; spouse's plan has its own separate 415(c) room. Pro-rata rule warning is informational — doesn't compute the actual tax bill (depends on marginal rate). Doesn't model 415(c) reductions for other employer contributions (profit-sharing, etc.) beyond direct match. For multi-year contribution planning + plan modeling, use the full app.

Theming

Override CSS custom properties on the host:

retirement-calc-backdoor {
  --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-backdoor')
  .addEventListener('rc-calculated', (e) => {
    console.log('Total Roth potential:', e.detail.totalRoth);     // $ across all 3 strategies
    console.log('Direct Roth IRA:', e.detail.directRoth);         // { limit, status: 'full'|'partial'|'phased_out', phaseoutLow, phaseoutHigh }
    console.log('Backdoor Roth IRA:', e.detail.backdoorRoth);     // { limit, proRataPct, proRataWarning, existingTradIra }
    console.log('Mega Backdoor:', e.detail.megaBackdoor);          // { limit, room, status: 'available'|'plan_doesnt_allow'|'no_room', cap415c }
  });

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