Portfolio LabKnowledgeSign inCreate account

Methodology of the free calculators: savings plan, withdrawal and leveraged ETF

In depth8 min read · updated 28 October 2026 · 3 sources

Portfolio Lab's free calculators need neither an account nor price data: you enter numbers, and the computational core applies open formulas to them. This page describes what the code actually computes: the savings plan with compound interest and costs, the withdrawal plan with optional Monte Carlo simulation and the leveraged ETF with volatility drag, each with its defaults, assumptions and limitations. The pages are not investment advice.

Overview: three calculators, open formulas

The calculators live in a single file of the computational core; the pages only display what the API returns. Inputs have fixed limits, such as a term of 1 to 60 years for the savings plan or leverage of 0.1 to 5. Anything outside these limits is rejected by the calculator with a message instead of producing nonsense.

  • Savings plan and compound interest: initial amount, monthly contribution with annual increase, return and running costs.
  • Withdrawal: how long a sum of capital lasts, which withdrawal it supports exactly to the end and, with Monte Carlo, how safe that is when returns fluctuate.
  • Leveraged ETF: mean return versus median, volatility drag, financing costs and a simulated distribution compared with L × index return.

The simulations use a fixed seed and 5,000 paths: the same inputs give the same figures. The remaining Monte Carlo error of a success probability p is √(p (1 − p) / 5,000), i.e. just over 0.7 percentage points at p = 50%.

Savings plan: monthly, with costs in the fund price

The savings plan calculates in months. The contribution goes into the account at the start of each month (annuity due), the initial amount on the first day. The return p.a. is the same every year and is converted into a monthly return; the calculator deducts the running costs from the fund assets every month, using the same conversion as the backtest. The annual increase raises the contribution after every twelve months.

V_m = (V_{m−1} + E_m) × (1 + r)^(1/12) × (1 − TER)^(1/12); E_m = R × (1 + d)^⌊m/12⌋ (+ initial amount in the first month)
V_m
portfolio value after month m
E_m
contribution at the start of month m
r, TER
return before costs and running costs p.a.
R, d
monthly contribution in the first year and annual increase

Withdrawal: duration, sustainable withdrawal, Monte Carlo

The withdrawal (payout plan) is likewise deducted at the start of the month, and the remainder grows at the monthly return. If the withdrawal is inflation-adjusted, it rises by the inflation rate after every twelve months. The calculator tracks the capital for up to 100 years: if there is no longer quite enough for a withdrawal, it shows the number of full months and the remainder as a final partial withdrawal.

K_m = (K_{m−1} − W_m) × (1 + i); W* = K₀ / Σ_{m=0}^{n−1} a_m × (1 + i)^−m
K_m
capital after month m
W_m
withdrawal in month m; inflation-adjusted W × (1 + π)^⌊m/12⌋
i
monthly return (1 + r)^(1/12) − 1
W*
sustainable withdrawal: the present value of all withdrawals over the term equals the initial capital (annuity present value factor)
a_m
1 without inflation adjustment, otherwise (1 + π)^⌊m/12⌋

The Monte Carlo simulation draws monthly returns from a lognormal distribution with ln(1 + R) ~ N(ln(1 + r) / 12; σ² / 12). The return you enter is therefore the median, not the mean. This keeps the median path close to the calculation without fluctuations. Success means that all withdrawals over the term are paid in full. That just over half of the paths fail, even though the calculation without fluctuations just about works out, illustrates sequence risk: bad years at the start can hardly be made up later. Bengen (1994) used historical US data to test which inflation-adjusted initial withdrawal would have survived every period; the simulation asks the same question with random rather than historical returns.

Leveraged ETF: mean, median and volatility drag

A leveraged ETF resets its leverage L every trading day. The calculator uses the same daily formula as the leverage in the backtest: L times the index return, the financed part L − 1 costs the money market rate plus a spread, below L = 1 the remainder earns the money market rate, and running costs come on top. If the index follows a geometric Brownian motion, continuous-time calculation yields closed-form formulas, as derived for leveraged ETFs and tested on real funds by Avellaneda and Zhang (2010).

g_L = L · ln(1 + r) − L (L − 1) σ² / 2 + (1 − L) · z − max(L − 1; 0) · s − c; μ_L = g_L + L² σ² / 2
g_L
median growth of the leveraged ETF (continuous, p.a.); median return = exp(g_L) − 1
μ_L
mean growth (expected value); mean return = exp(μ_L) − 1
r, σ
median return and volatility of the index p.a.
z, s, c
money market rate, spread and running costs, converted to continuous rates

The simulation runs 5,000 paths with 252 trading days per year and lognormal daily returns; the index without costs runs alongside on the same random numbers. If a day falls to −100% or worse, the leveraged ETF is worthless. The page shows the median and mean, percentiles of the final value, the probability of doing worse than the index or than L × index return, and the distribution up to the 99th percentile. Why daily rebalancing makes the outcome path-dependent is also described by Cheng and Madhavan (2009).

Limitations and assumptions

  • Constant rates: return, inflation, interest and costs apply over the entire term. Real markets move in phases; lognormal, independent returns underestimate crashes and fat tails, especially for leveraged ETFs.
  • No trading costs: no front-end load, order fees or spreads; leveraged ETFs without tracking differences.
  • No advice: the calculators show what the formulas make of the inputs. Whether a savings plan, a withdrawal or a leveraged ETF suits you depends on more than these figures.

Frequently asked questions

Why is the median return of a leveraged ETF lower than leverage times the index return?

Because the leverage is reset daily, volatility grows with L and volatility drag with L². On top of that come financing and costs. The mean rises with leverage, but the typical outcome (the median) only rises up to the growth-optimal leverage.

How long will my money last with monthly withdrawals?

The withdrawal calculator deducts the withdrawal every month and applies the return to the remainder. It shows after how many months the capital runs out, which withdrawal it supports exactly to the end of the term and, with Monte Carlo, in how many simulated paths the money lasts until the end.

Do the calculators use real prices?

No. They only use your inputs and open formulas. With an account, the backtest, the Monte Carlo simulation and Financial goals work with price data.

Literature

  1. Avellaneda, Marco; Zhang, Stanley (2010): Path-Dependence of Leveraged ETF Returns. SIAM Journal on Financial Mathematics 1 (1), pp. 586–603. doi:10.1137/090760805
  2. Bengen, William P. (1994): Determining Withdrawal Rates Using Historical Data. Journal of Financial Planning. Source
  3. Cheng, Minder; Madhavan, Ananth (2009): The Dynamics of Leveraged and Inverse Exchange-Traded Funds. Journal of Investment Management 7 (4). Source

Full bibliography

This page describes how Portfolio Lab calculates; past results are not a forecast. All terms in the glossary.