A Roth vs Traditional Calculator Widget You Can Embed

The Roth vs traditional calculator widget is the small version of my Roth vs traditional optimizer. You type in your salary, your age, when you want to stop working, what you spend and what you’ve saved, and it tells you what to put in the Roth and traditional accounts this year, and how much that mix is worth against going all-in on either one. You can use it on its own page, and you can put it on your own website with a couple of lines of HTML.

Below: what it does, a live copy you can try right here, two real runs (one where the answer is “it barely matters” and one where it really doesn’t look like a rule of thumb), and the snippet to embed it.

What the widget does

The box asks for your filing status, your state (optional; leave it on federal only if you like), your salary before tax, your age and your retirement age, what you spend a year while working and what you expect to spend in retirement, what you already have in traditional, Roth and brokerage accounts, and your Social Security at 67. That’s it.

Behind the button is the same model as the full tool, the one I described in the Roth vs traditional 401k calculator post. It doesn’t compare “my rate now” with “my rate later” and call it a day. It plans every year at once, from your next paycheck to the end of the plan: how much goes in the traditional 401(k), the Roth 401(k), a Roth IRA and the brokerage while you work, then how much to convert and which account to spend from once you stop. The contribution limits are the 2026 ones from the IRS announcement ($24,500 for a 401(k), $7,500 for an IRA, plus catch-ups after 50).

What comes back is a sentence with this year’s dollars per account (and your employer match, if there is one), a one-line reason for the choice, your after-tax wealth at 92 in today’s dollars, and how far ahead the optimal mix is of always-traditional and of always-Roth. Under that, a link opens the full tool with your numbers already filled in, so you don’t have to type them twice.

Try it here

This is the live widget, not a screenshot. The numbers in the boxes are its defaults, which are the first run below, so you can press the button and check my work.

Run one: $85,000 at 35, and a coin flip

The defaults are a single 35-year-old earning $85,000, stopping work at 65, spending $50,000 a year now and in retirement, starting from zero in every account, with $24,000 of Social Security at 67. Behind the scenes the widget also assumes a 5% real return, a plan that runs to 92, and a 22% tax rate on anything still pre-tax at the end.

This year it says: put $18,628 in the Roth 401(k). That’s everything left of the paycheck after spending and tax, and the reason it gives is short: “Roth this year because your bracket now (22%) is no higher than the about 22% the plan expects pre-tax money to pay later.”

Now the comparison, which is the part I’d look at first. The optimal mix ends with $3,644,276 after tax. Always-traditional ends with $3,643,768, so the optimum is ahead by $508 over 57 years. In other words, nothing. Always-Roth ends with $3,303,931, which is $340,344 behind. So the honest answer for this person is: Roth or traditional this year is a coin flip, but going Roth on every paycheck for 30 years is an expensive habit. From 38 on, the plan puts just enough in the traditional 401(k) to pull taxable income down to the top of the 12% bracket (skipping 22% tax on those dollars now) and the rest in Roth, then moves that traditional money out after 65, much of it at 12%. A rule of thumb would have said “you’re young, go Roth” and stopped there.

Run two: a $200,000 earner (and a backdoor Roth)

Then I tried someone the defaults don’t cover: single, 40, earning $200,000, stopping at 60, spending $90,000 a year now and $80,000 in retirement, with $250,000 already in an old 401(k), $50,000 in a Roth and $100,000 in a brokerage account, and $36,000 of Social Security at 67.

This year: $24,500 in the Roth 401(k), $7,500 in a Roth IRA, $22,637 to the brokerage, and a $17,875 conversion of the existing pre-tax money. That $7,500 Roth IRA deserves a flag. At $200,000 a single filer is well past the Roth IRA income limit (the phase-out for 2026 is $153,000 to $168,000), so the widget is putting it in through the backdoor: a nondeductible traditional IRA contribution converted right away. The backdoor is on by default, and the small box has no switch for it. If you can’t or don’t want to do that, open the full tool with your numbers and turn it off. Also, the backdoor only works cleanly when you have no pre-tax money in a traditional IRA; here the $250,000 sits in the 401(k), which is fine, but the tool doesn’t model the pro-rata rule if it doesn’t. Same for the $17,875 conversion: whether you can convert inside a 401(k) while you still work depends on your plan.

The reason line for this one is more honest than clever: “This year’s split is set by the whole plan rather than one rate comparison (bracket now 24%, about 12% later).” Read literally, 24% now against 12% later says traditional. The plan still goes Roth this year; the full tool’s year-by-year table and notes show how that fits the rest of the plan.

Roth vs traditional calculator widget result for a $200,000 earner: all Roth from 40 to 44, traditional 401(k) plus a backdoor Roth IRA from 45, the catch-up in Roth from 50, and the rest of the savings in a brokerage account
The $200,000 earner, year by year: Roth first, traditional from 45, and the catch-up forced into Roth from 50.

From 40 to 44 everything goes Roth, and in the first four of those years the existing pre-tax money is converted up to the top of the 24% bracket. From 45 the 401(k) switches to traditional while the backdoor Roth IRA keeps going, all still in the same 24% bracket. From 50 the $8,000 catch-up has to go Roth anyway (the tool applies the SECURE 2.0 rule for people paid over $150,000). Everything past the limits lands in the brokerage. Then, once the paycheck stops at 60, the plan converts $121,800 a year for four years, up to the top of the 22% bracket, and keeps filling the 12% bracket after that. The traditional money saved in the middle of the career is what those cheap years are for.

The bottom line: the optimal mix ends with $9,998,866 after tax at 92, $163,368 ahead of always-traditional and $92,140 ahead of always-Roth. Neither default matches the plan, and the plan isn’t one rule applied every year.

A word on those numbers. They’re from this week’s engine. Until a fix I made in November, Social Security and other income didn’t pay for spending in the model, which made retirements look poorer than they are and pushed every answer around. I found it in my own tool after months of telling people to trust the solver (humbling, and a good reason to rerun anything you saved before the fix).

What it won’t do

It’s a small box on purpose. There’s no employer match field, no second earner (married shows one salary), no HSA, no children for the child tax credit and no raises. The return (5%), the end-of-plan tax rate (22%), the Social Security age (67) and the end of the plan (92) are fixed. The full Roth vs traditional optimizer handles all of those, plus the earliest age you can stop working, and the link under the widget’s results carries your numbers there.

It’s also a model, not tax advice. It holds 2026 tax law constant in today’s dollars, and the answer depends on the return and the future tax rate, which nobody knows. Once you’re retired, the question changes from what to contribute to how much to convert, and I wrote about the answer that keeps coming back in how full to fill your tax bracket.

Put it on your site

This part is for personal finance bloggers, FIRE writers, HR and benefits pages, and anyone who’s tired of answering “should I do the Roth 401(k)?” with “it depends.” Your readers get an answer for their own salary and savings. It’s free, there’s no API key and no signup, and nothing to install. Copy this into any page that accepts HTML (on WordPress, a Custom HTML block, which is how it’s embedded above):

<iframe src="https://roth-vs-traditional-calculator.kindoflost.com/embed" style="width:100%;max-width:640px;height:600px;border:1px solid #ddd;border-radius:8px" loading="lazy" title="Roth vs Traditional Calculator by Kind of Lost"></iframe>
<p style="font-size:12px">Powered by the free <a href="https://roth-vs-traditional-calculator.kindoflost.com/">Roth vs Traditional Calculator</a> from <a href="https://kindoflost.com/">Kind of Lost</a></p>

Change the height if your layout needs it. The widget carries a small “Powered by Kind of Lost” line at the bottom, and the second line of the snippet is a plain credit link under it; keeping those is the only thing it asks in return.

If you embed it, or it gives you a split that looks wrong, email me at [email protected]. Sometimes “wrong” is the plan seeing a cheap year twenty years out that you didn’t think about. Sometimes it’s me, and I’d like to know.

Tradeline Supply
Things that I use, like, and am affiliated with:
Mint Mobile offers great cell phone service for $15 flat, get $15 off using the link. Get discounted phones with service activation and no contract.
I never spend money before I check Mr Rebates or Rakuten to get cashbacks, rebates, discounts, coupons or cheaper gift cards.

Leave a Reply