A multi-year guaranteed annuity (MYGA) looks like a savings product, but the arithmetic behind it is one line of compound interest. If you build a finance calculator, or just want to check a quote yourself, here is the whole model, the edge cases that trip people up, and a small open-source widget that implements it.

The core formula

A MYGA takes a lump sum, credits a fixed rate for a fixed term, and guarantees the result. With deposit P, annual rate r (as a decimal) and n years:

value = P * (1 + r)^n 

For $100,000 at 4.5% for 5 years: 100000 * 1.045^5 = $124,618.19. Interest earned: $24,618.19.

Year by year it is a geometric series, so each year's gain is larger than the last:

Year Value
1 $104,500.00
2 $109,202.50
3 $114,116.61
4 $119,251.86
5 $124,618.19

Compounding frequency

Most MYGAs credit interest annually, but contracts differ, so a calculator should let the user choose. With m credits per year:

value = P * (1 + r/m)^(m*n) effective annual yield = (1 + r/m)^m - 1 

Same deposit and 4.5% nominal rate, monthly compounding (m = 12): $125,179.58 after 5 years, an effective annual yield of 4.594% instead of 4.5%. Always compare products on effective yield, not the nominal rate.

The "pay me monthly" option

If the owner takes interest as income instead of leaving it in, nothing compounds. The payout is simple interest on a principal that never changes:

monthly payout = P * r / 12 // $100,000 at 4.5% -> $375.00 per month 

A common bug is to quote the compounded growth figure and the monthly payout from the same input as if they were the same strategy. They are alternatives.

JavaScript

function growth(principal, ratePct, years, freq) { const r = ratePct / 100; const m = freq === "monthly" ? 12 : 1; const value = principal * Math.pow(1 + r / m, m * years); return { value, interest: value - principal, effectiveAnnualYield: Math.pow(1 + r / m, m) - 1, monthlyPayout: principal * r / 12, }; } growth(100000, 4.5, 5, "annual").value; // 124618.19... 

Use Math.pow rather than a loop for the headline figure, and only loop when you need the year-by-year table. Format money at display time, never round in the middle of the calculation.

What a growth calculator leaves out

The formula gives the guaranteed account value. It says nothing about:

  • Surrender charges. Withdrawing more than the free amount before the term ends usually costs a declining percentage of the withdrawal.
  • Taxes. Interest is tax-deferred, then taxed as ordinary income when withdrawn. A fair comparison with a bank CD needs an after-tax view: the CD's interest is taxed every year, the annuity's at exit.
  • Market value adjustments on some contracts.

Skip those in a "value at end of term" figure, but say so on the page. Users trust a calculator that states its limits.

Try it, or embed it

I published the growth math as a dependency-free widget (MIT, about 4 KB, Shadow DOM so it will not fight your CSS):

<script src="https://hkgoldstein-sketch.github.io/myga-growth-widget/myga-widget.js"></script> 

These are educational estimates, not financial advice. Confirm any real rate and contract terms with the issuer.