---
title: "Formula & Assumption Registry"
description: "The Swoopr Formula Registry documents the formulas, inputs, assumptions, rounding rules, test cases, & sources behind every Swoopr calculator & analytical tool."
canonical: https://www.getswoopr.com/research/formulas/
source: "Swoopr Investment: https://www.getswoopr.com"
---

# Formula & Assumption Registry









## Direct answer



> The Swoopr Formula Registry documents how each public calculator works: the exact formula, input definitions, assumptions, rounding rules, known limitations, authoritative sources, and deterministic test vectors. Its goal is reproducibility. Any reader entering the same valid inputs into the same formula version should receive the same output and be able to verify it independently. A documented formula is not financial advice and does not guarantee that the output is appropriate for any specific decision.








## What this registry covers



Each eligible tool record discloses:



- formula or model;
- input definitions and units;
- assumptions (what is assumed, why, and how output changes if wrong);
- rounding rules;
- supported input range and validation;
- authoritative source for material rules or regulatory inputs;
- known limitations;
- deterministic test cases;
- formula version;
- last verification date.



Coverage is limited to tools whose math lives in a dedicated, unit-tested core module (`*-core.js`). Inline page scripts that have not yet been extracted are not documented here.








## What documentation does not mean



A documented calculator is not personalized financial advice.



A formula can be mathematically correct and still be unsuitable for a particular decision. Calculators simplify taxes, fees, market behavior, future returns, inflation, longevity, and uncertain inputs. Documentation makes those limitations visible. It does not eliminate them.








## CAGR Calculator



**Canonical tool:** [CAGR Calculator](https://www.getswoopr.com/risk-management/performance/cagr/) 
 **Core module:** `public/cagr-calculator-core.js` 
 **Formula version:** 1.0
 **Last verified:** 2026-09-27
 **Validation status:** Method documented, internally verified




### Purpose



Calculates the Compound Annual Growth Rate: the single constant annual rate that would turn a beginning value into an ending value over a given holding period, ignoring intermediate cash flows.




### Formula



CAGR = (endingValue / beginningValue)1 / years − 1




### Inputs



| Input | Type | Constraint |
| --- | --- | --- |
| beginningValue | number | finite, > 0 |
| endingValue | number | finite, > 0 |
| years | number | finite, > 0 |




### Assumptions



- No intermediate cash flows (contributions or withdrawals) between the beginning and ending dates.
- Both values represent the same asset, portfolio, or index without currency conversion.
- Years is expressed as a decimal, not as whole years only; fractional periods are supported.




### Rounding



Internal computation uses full floating-point precision. The result is returned as a decimal (e.g., 0.10 for 10%) and rounded for display. Division by a small positive number cannot produce Infinity because years > 0 is enforced.




### Test cases



| beginningValue | endingValue | years | Expected CAGR |
| --- | --- | --- | --- |
| 10,000 | 12,100 | 2 | 10.00% |
| 10,000 | 10,000 | 5 | 0.00% |
| 10,000 | 5,000 | 1 | −50.00% |
| 100 | 200 | 10 | 7.18% (20.1 − 1) |




### Limitations



- CAGR does not reflect volatility or path. A 10% CAGR from a smooth trend and one from an extreme drawdown followed by a large recovery are mathematically equal.
- The formula assumes no dividends, distributions, or interim cash flows are reinvested at the same rate; results may differ from time-weighted return calculations when distributions are present.
- Past CAGR is not a forecast of future performance.








## Compound Growth Calculator



**Canonical tool:** [Compound Growth Calculator](https://www.getswoopr.com/tools/compound-growth-calculator/) 
 **Core module:** `public/compound-growth-core.js` 
 **Formula version:** 1.0
 **Last verified:** 2026-09-27
 **Validation status:** Method documented, internally verified




### Purpose



Projects the future value of a lump-sum principal with periodic compounding, optionally adding a stream of regular contributions made at the end of each contribution period (ordinary annuity convention).




### Formula



Principal component:



FVprincipal = P × (1 + r/n)n × t



Contribution component (when periodic contribution C > 0):



ic = (1 + r/n)n/f − 1



FVcontributions = C × [((1 + ic)f × t − 1) / ic]



Total future value = FVprincipal + FVcontributions



Where:



- P = initial principal
- r = annual nominal interest rate (decimal)
- n = compounding periods per year (1 = annual, 12 = monthly, 365 = daily)
- t = time in years
- C = contribution per contribution period
- f = contribution frequency per year
- ic = effective rate per contribution period, derived from the compounding rate




### Assumptions



- Contributions are made at the end of each period (ordinary annuity), not the beginning.
- The nominal rate and compounding frequency remain constant throughout the projection.
- Compounding periods per year (n) and contribution frequency (f) are independent; the effective-rate conversion bridges them correctly.
- No taxes, fees, or inflation adjustment.




### Test cases



| P | r | n | t | C | f | Expected FV |
| --- | --- | --- | --- | --- | --- | --- |
| 10,000 | 5% | 1 | 2 | 0 | n/a | 11,025.00 |
| 0 | 6% | 12 | 10 | 100 | 12 | 16,387.93 |
| 5,000 | 7% | 1 | 5 | 1,200 | 12 | 14,428 (approx) |




### Limitations



- The rate input is an assumption, not a projection. Future investment returns are uncertain.
- No fees, expense ratios, taxes, or inflation adjustment are applied unless the user explicitly enters a net-of-fee rate.
- The ordinary-annuity convention (end-of-period contributions) will differ from annuity-due (beginning-of-period) results by one period's compounding factor.








## Position Size Calculator



**Canonical tool:** [Stock Position Size Calculator](https://www.getswoopr.com/learn/position-sizing-risk-per-trade/) 
 **Core module:** `public/position-size-core.js` 
 **Formula version:** 1.0
 **Last verified:** 2026-09-27
 **Validation status:** Method documented, internally verified




### Purpose



Calculates the maximum number of shares for a directional trade that keeps the potential loss, measured from entry price to stop price, within a specified percentage of account equity.




### Formula



accountRisk = accountBalance × (riskPercent / 100)



stopDistance = |entryPrice − stopPrice|



shares = floor(accountRisk / stopDistance)



The floor operation ensures shares is always a whole number. When a per-share slippage estimate is provided:



adjustedShares = floor(accountRisk / (stopDistance + slippagePerShare))




### Inputs



| Input | Type | Constraint |
| --- | --- | --- |
| accountBalance | number | finite, > 0 |
| riskPercent | number | finite, > 0 (e.g., 1 means 1%) |
| direction | string | "long" or "short" |
| entryPrice | number | finite, > 0 |
| stopPrice | number | finite, > 0; below entry for long, above for short |
| slippagePerShare | number | optional; ≥ 0, defaults to 0 |




### Assumptions



- The stop will be executed at exactly the stop price (no gap risk).
- The account balance is expressed in the same currency as the share price.
- All position values (shares × price) fit within normal floating-point range.
- Slippage is symmetric per share; in practice, slippage depends on liquidity and order type.



The stop distance is computed from unrounded prices to avoid floating-point distortion. Rounding to cents before the division has caused sub-cent distances to collapse to zero (Infinity shares) and has understated distances like $0.0149 as $0.01, yielding a position whose real risk exceeded the budget. Only displayed values are rounded.




### Test cases



| Balance | Risk % | Dir. | Entry | Stop | Slippage | Expected shares |
| --- | --- | --- | --- | --- | --- | --- |
| 50,000 | 1% | long | 25.00 | 24.00 | 0 | 500 |
| 50,000 | 1% | long | 25.00 | 24.00 | 0.10 | 454 |
| 100,000 | 0.5% | short | 50.00 | 52.00 | 0 | 250 |




### Limitations



- Does not account for commission costs or margin requirements.
- Assumes the stop will be hit at the stated price; gaps and fast-market conditions can cause worse fills.
- Does not enforce any maximum position concentration or portfolio-level risk constraint.
- This tool sizes a single trade; portfolio heat (aggregate open risk across positions) requires a separate calculation.








## RMD Estimator



**Canonical tool:** [RMD Estimator](https://www.getswoopr.com/tools/rmd-estimator/) 
 **Core module:** `public/rmd-estimator-core.js` 
 **Formula version:** 1.0
 **Last verified:** 2026-09-27
 **Validation status:** Method documented, internally verified




### Purpose



Estimates the Required Minimum Distribution (RMD) for a traditional IRA, 401(k), or similar tax-deferred retirement account using the IRS Uniform Lifetime Table.




### Formula



RMD = prior year-end account balance / distribution period factor



The distribution period factor is read from the IRS Uniform Lifetime Table for the account owner's age as of December 31 of the distribution year.




### Regulatory source



IRS Publication 590-B, Appendix B, Table III (Uniform Lifetime Table), effective January 1, 2022, under Treasury Decision T.D. 9930 (final regulations, November 2020). The 2022 table uses longer distribution periods than the prior 2002 table, reflecting updated mortality data. Consult IRS.gov and a qualified tax advisor for your specific situation.




### Assumptions



- The account owner uses the Uniform Lifetime Table (the most common case); a different table applies when the sole beneficiary is a spouse more than 10 years younger.
- The balance input is the prior December 31 account value.
- The age input is the owner's age as of December 31 of the current distribution year.
- U.S. federal rules apply; state tax treatment varies.




### Test cases



| Balance | Age | Distribution period | Expected RMD |
| --- | --- | --- | --- |
| 500,000 | 72 | 27.4 | ~18,248 |
| 500,000 | 75 | 24.6 | ~20,325 |
| 1,000,000 | 80 | 20.2 | ~49,505 |




### Limitations



- This is an estimate. Tax law, contribution history, account type, and beneficiary designations affect the actual RMD obligation.
- The calculator uses the Uniform Lifetime Table only. Inherited IRA distributions use different rules.
- Roth IRAs are not subject to RMD requirements during the owner's lifetime under current law; the calculator is not designed for Roth accounts.
- IRS tables and rules can change. Verify the current table at IRS.gov before relying on this estimate for planning.








## Roth vs. Traditional Calculator



**Canonical tool:** [Roth vs. Traditional Calculator](https://www.getswoopr.com/tools/roth-vs-traditional-calculator/) 
 **Core module:** `public/roth-vs-traditional-core.js` 
 **Formula version:** 1.0
 **Last verified:** 2026-09-29
 **Validation status:** Method documented, internally verified




### Purpose



Compares the projected after-tax value of a single hypothetical contribution under two account tax treatments: Traditional (pre-tax contribution, taxed on withdrawal) versus Roth (post-tax contribution, tax-free withdrawal).




### Formula



Traditional after-tax future value:



FVTraditional = contribution × (1 + annualReturn)years × (1 − retirementTaxRate)



Roth after-tax future value:



FVRoth = contribution × (1 − currentTaxRate) × (1 + annualReturn)years



When currentTaxRate equals retirementTaxRate, the two are mathematically equal (multiplication is commutative over a fixed growth factor). This is a well-known result and a built-in test invariant.




### Inputs



| Input | Type | Constraint |
| --- | --- | --- |
| contribution | number | > 0 |
| years | number | > 0 |
| annualReturnPercent | number | > 0 (e.g., 7 for 7%) |
| currentTaxRatePercent | number | 0-100 |
| retirementTaxRatePercent | number | 0-100 |




### Assumptions



- A single lump-sum contribution; no annual contribution limits, phaseouts, or matching are modeled.
- Constant annual return throughout the holding period; sequence risk and volatility are not modeled.
- Federal marginal rate only; state taxes, additional Medicare taxes, and bracket changes over time are excluded.
- No required minimum distributions, early-withdrawal penalties, or estate-planning considerations.




### Test cases



| Contribution | Years | Return | Current rate | Retirement rate | Trad FV | Roth FV |
| --- | --- | --- | --- | --- | --- | --- |
| 10,000 | 20 | 7% | 24% | 24% | 29,410 | 29,410 (equal rates = equal outcome) |
| 10,000 | 20 | 7% | 22% | 28% | 27,862 | 30,184 (higher retirement rate = Roth wins) |




### Limitations



- The future marginal tax rate is an assumption. Bracket changes, income composition, and other deductions all affect the actual rate paid.
- Does not model conversion strategies, backdoor Roth contributions, or tax-loss harvesting.
- A Roth IRA and a Traditional IRA also differ on required minimum distributions, beneficiary rules, and contribution phaseout income thresholds, none of which are reflected here.








## APY / Effective Yield Calculator



**Canonical tool:** [APY / Effective Yield Calculator](https://www.getswoopr.com/tools/apy-effective-yield-calculator/) 
 **Core module:** `public/apy-effective-yield-core.js` 
 **Formula version:** 1.0
 **Last verified:** 2026-09-29
 **Validation status:** Method documented, internally verified




### Purpose



Converts a nominal annual interest rate and a compounding frequency into the Annual Percentage Yield (APY), the effective annual rate an account actually earns once intra-year compounding is accounted for.




### Formula



APY = (1 + r/n)n − 1



Where r is the nominal annual rate (decimal) and n is the number of compounding periods per year. When a principal is supplied, the illustrative one-year ending value is: ending value = principal × (1 + APY).




### Inputs



| Input | Type | Constraint |
| --- | --- | --- |
| nominalRatePercent | number | finite, ≥ 0 |
| compoundingsPerYear | number | finite positive integer (1, 4, 12, 365, etc.) |
| principal | number | optional; finite, ≥ 0 |




### Assumptions



- Illustrative projection: one year at a constant nominal rate, no withdrawals, no additional deposits.
- Compounding periods per year must be a positive whole number; fractional compounding periods are not valid.




### Test cases



| Nominal rate | Compoundings/yr | Expected APY |
| --- | --- | --- |
| 5% | 1 (annual) | 5.0000% |
| 5% | 12 (monthly) | 5.1162% |
| 5% | 365 (daily) | 5.1267% |
| 0% | 12 | 0.0000% |




### Limitations



- APY reflects one year of compounding only. Projecting beyond one year requires the compound growth formula.
- Real accounts may compound on average daily balance rather than on a fixed balance, which can produce slightly different results than this formula.








## Inflation-Adjusted Return Calculator



**Canonical tool:** [Inflation-Adjusted Return Calculator](https://www.getswoopr.com/tools/inflation-adjusted-return-calculator/) 
 **Core module:** `public/inflation-adjusted-return-core.js` 
 **Formula version:** 1.0
 **Last verified:** 2026-09-29
 **Validation status:** Method documented, internally verified




### Purpose



Converts a gross nominal return and an inflation assumption into the exact real return (purchasing-power change), accounting for an annual fee. Returns both the exact Fisher-equation result and the linear approximation so the difference is visible.




### Formula



Fee deduction (multiplicative, applied before inflation adjustment):



net nominal = (1 + grossReturn) × (1 − feePercent/100) − 1



Exact real return (Fisher equation):



real return = (1 + net nominal) / (1 + inflationRate) − 1



Linear approximation (for reference):



real return ≈ grossReturn − feePercent − inflationPercent



Nominal future value = startingValue × (1 + net nominal)years



Purchasing-power future value = startingValue × (1 + real return)years




### Inputs



| Input | Type | Constraint |
| --- | --- | --- |
| grossNominalReturnPercent | number | finite |
| annualFeePercent | number | finite, ≥ 0 |
| inflationPercent | number | finite, > −100 |
| startingValue | number | finite, > 0 |
| years | number | finite, > 0 |




### Assumptions



- Constant nominal return and constant inflation rate throughout the projection period.
- Fee is multiplicative (proportional to the invested balance), not a flat dollar amount.
- Deflation (negative inflation) is valid as long as inflationPercent > −100.




### Test cases



| Gross return | Fee | Inflation | Exact real return | Linear approx |
| --- | --- | --- | --- | --- |
| 8% | 0.5% | 3% | 4.33% | 4.50% (approx) |
| 5% | 0% | 5% | 0.00% | 0.00% |
| 3% | 0% | 0% | 3.00% | 3.00% |




### Limitations



- The assumed inflation rate may not match actual experienced inflation, which varies year by year.
- Does not model taxes on nominal gains, which further reduce purchasing-power return.
- The linear approximation grows less accurate as rates increase; use the exact Fisher result for rates above roughly 5%.








## Loan Amortization Calculator



**Canonical tool:** [Loan Amortization Calculator](https://www.getswoopr.com/tools/loan-amortization-calculator/) 
 **Core module:** `public/loan-amortization-core.js` 
 **Formula version:** 1.0
 **Last verified:** 2026-09-29
 **Validation status:** Method documented, internally verified




### Purpose



Computes the level monthly payment on a fixed-rate installment loan and produces the full period-by-period amortization schedule showing how each payment splits between interest and principal. Optionally models the effect of an extra monthly payment.




### Formula



Level payment (level-payment mortgage formula):



payment = principal × [i × (1 + i)n] / [(1 + i)n − 1]



Where i = APR / 12 (periodic monthly rate) and n = loan term in months. Period-by-period schedule:



interestt = balancet × i



principalt = payment − interestt



balancet+1 = balancet − principalt



All arithmetic runs in integer cents (via `public/money-core.js`) to prevent floating-point drift across hundreds of periods.




### Inputs



| Input | Type | Constraint |
| --- | --- | --- |
| principal | number | finite, > 0 |
| annualRatePercent | number | finite, ≥ 0 |
| termMonths | number | integer, ≥ 1 |
| extraMonthlyPayment | number | optional; ≥ 0, defaults to 0 |




### Assumptions



- Fixed rate throughout the loan term; adjustable-rate loans require period-by-period recalculation.
- Monthly payment frequency only; weekly or biweekly schedules are not modeled.
- The extra payment is added to every regular payment for the life of the loan.
- No origination fees, PMI, property taxes, or insurance are included.




### Test cases



| Principal | APR | Term | Monthly payment | Total interest |
| --- | --- | --- | --- | --- |
| 10,000 | 6% | 60 months | 193.33 | 1,599.68 |
| 200,000 | 4% | 360 months (30 yr) | 954.83 | 143,739.01 |
| 10,000 | 0% | 24 months | 416.67 | 0.00 |




### Limitations



- The final payment is clamped to the remaining balance plus last-period interest, so it is typically smaller than earlier payments; the schedule is deterministic.
- A payment below the period's interest charge produces an error; the calculator does not model negative-amortization loans.
- Extra payments are assumed to reduce principal immediately; actual servicer behavior may vary.








## Investment Fee Compounding Study



**Canonical tool:** [Investment Fee Compounding Study](https://www.getswoopr.com/tools/investment-fee-compounding-study/) 
 **Core module:** `public/fee-compounding-core.js` 
 **Formula version:** 1.0
 **Last verified:** 2026-09-29
 **Validation status:** Method documented, internally verified




### Purpose



Models how a recurring annual fee percentage reduces a portfolio over time and decomposes the total shortfall between (1) the dollars actually paid in fees and (2) the additional growth those dollars would have produced had they stayed invested (foregone compounding).




### Formula



Within each year: contribution C is added at the start, the combined balance grows at gross return g, and fee f is assessed at the end on the grown balance.



Fee-free baseline: At = (At−1 + C) × (1 + g)



Fee-paying balance: Bt = (Bt−1 + C) × (1 + g) × (1 − f)



Fee paid in year t: feet = (Bt−1 + C) × (1 + g) × f



Total shortfall DN = AN − BN decomposes exactly as:



DN = (fees paid) + (foregone compounding)



Where foregone compounding = DN − SUM(feet), and this decomposition is an identity, not an approximation.




### Inputs



| Input | Type | Constraint |
| --- | --- | --- |
| initialBalance | number | finite, ≥ 0 |
| annualContribution | number | finite, ≥ 0 |
| grossReturnPercent | number | finite |
| annualFeePercent | number | finite, ≥ 0 |
| years | number | integer, 1-100 |




### Assumptions



- Fee is assessed end-of-year on the grown balance, not daily or quarterly. This produces a modest upper bound versus daily accrual.
- Constant gross return and constant fee throughout the projection.
- No taxes, trading costs, cash drag, or inflation adjustment.




### Test cases



| Balance | Contribution | Gross return | Fee | Years | Fee-free end balance | After-fee end balance |
| --- | --- | --- | --- | --- | --- | --- |
| 10,000 | 0 | 7% | 1% | 1 | 10,700.00 | 10,593.00 (fee: $107.00, foregone compounding: $0) |
| 10,000 | 0 | 7% | 1% | 30 | 76,122.55 | ~52,673 (fee total: ~$14k, foregone compounding: ~$9k) |




### Limitations



- End-of-year fee assessment overstates the cost compared to daily or quarterly accrual; the shape of the arithmetic is accurate, the magnitude is an upper bound.
- Whether the fee purchases something valuable (better diversification, behavioral coaching, advice) is outside the model's scope.








## Retirement Savings Projector



**Canonical tool:** [Retirement Savings Calculator](https://www.getswoopr.com/tools/retirement-savings-calculator/) 
 **Core module:** `public/retirement-savings-core.js` 
 **Formula version:** 1.0
 **Last verified:** 2026-09-29
 **Validation status:** Method documented, internally verified




### Purpose



Projects a retirement account balance from today to a future date, given a current balance, a monthly contribution (with optional annual step-up), a gross return assumption, and a fee assumption.




### Formula



Net monthly rate: r = (1 + grossReturn) × (1 − fee) − 1, then converted monthly: rmonthly = (1 + r)1/12 − 1



Future value (ordinary annuity, end-of-month contributions):



FV = P(1 + rmonthly)n + C × [((1 + rmonthly)n − 1) / rmonthly]



When rmonthly = 0: FV = P + C × n (avoids division by zero).



When annualContributionGrowthPercent ≠ 0, contributions step up at the start of each year and the module models each month individually rather than applying the closed-form growing-annuity formula, to preserve exact integer-month matching with the simple-contribution path.




### Inputs



| Input | Type | Constraint |
| --- | --- | --- |
| currentBalance | number | finite, ≥ 0 |
| monthlyContribution | number | finite, ≥ 0 |
| grossReturnPercent | number | finite |
| annualFeePercent | number | finite, ≥ 0 |
| years | number | integer, ≥ 1 |
| annualContributionGrowthPercent | number | optional; finite, defaults to 0 |




### Assumptions



- Constant annual return and fee throughout the projection.
- End-of-month contributions (ordinary annuity convention).
- No taxes, required minimum distributions, Social Security, or plan-specific rules.
- Employer match is not modeled separately; include it in the contribution input if relevant.




### Test cases



| Balance | Monthly contribution | Return | Fee | Years | Projected FV |
| --- | --- | --- | --- | --- | --- |
| 0 | 500 | 7% | 0% | 30 | ~567,748 |
| 50,000 | 1,000 | 6% | 0.5% | 20 | ~436,000 (approx) |




### Limitations



- A constant return assumption does not model sequence-of-returns risk, which can significantly affect actual outcomes near retirement.
- Contribution limits, catch-up contributions, and plan-specific rules are not enforced.








## Sequence-of-Returns Risk Simulator



**Canonical tool:** [Sequence-of-Returns Risk Simulator](https://www.getswoopr.com/tools/sequence-of-returns-simulator/) 
 **Core module:** `public/sequence-of-returns-core.js` 
 **Formula version:** 1.0
 **Last verified:** 2026-09-29
 **Validation status:** Method documented, internally verified




### Purpose



Simulates a portfolio taking a fixed-dollar annual withdrawal across a user-supplied sequence of annual returns. Demonstrates that withdrawal timing interacts with return order: a portfolio depleted by early losses must sell more shares at depressed prices to meet the same withdrawal, permanently impairing recovery. A portfolio with no withdrawals is unaffected by return order (compounding is commutative).




### Formula



For each simulated year t, with withdrawal timing "start" (withdrawal taken before returns are applied):



balance after withdrawal = balancet − annualWithdrawal



balancet+1 = (balancet − annualWithdrawal) × (1 + returnPercentt / 100)



With withdrawal timing "end" (withdrawal taken after returns are applied):



balancet+1 = balancet × (1 + returnPercentt / 100) − annualWithdrawal



Simulation stops when the balance reaches zero or the return sequence is exhausted.




### Inputs



| Input | Type | Constraint |
| --- | --- | --- |
| startingBalance | number | finite, > 0 |
| annualWithdrawal | number | finite, ≥ 0 |
| returnPercents | number[] | non-empty; each > −100 |
| withdrawalTiming | string | "start" (default) or "end" |




### Assumptions



- Fixed-dollar withdrawals only; inflation-adjusted spending is not modeled.
- No taxes, fees, or rebalancing.
- The return sequence is deterministic and user-supplied; this is not a Monte Carlo simulation.




### Test cases



| Balance | Withdrawal | Returns | Timing | Year-1 end balance |
| --- | --- | --- | --- | --- |
| 100,000 | 5,000 | [8%, 8%, 8%] | start | 100,440 (100k − 5k = 95k × 1.08) |
| 100,000 | 5,000 | [−30%, 30%, 8%] | start | 66,500 (100k − 5k = 95k × 0.70) |




### Limitations



- Results depend entirely on the return sequence supplied. Real-world outcomes depend on future returns that are unknown in advance.
- Does not model partial-year depletion, taxes, Social Security income, or variable spending strategies.








## Credit Card Payoff Calculator



**Canonical tool:** [Credit Card Payoff Calculator](https://www.getswoopr.com/tools/credit-card-payoff-calculator/) 
 **Core module:** `public/credit-card-payoff-core.js` 
 **Formula version:** 1.0
 **Last verified:** 2026-09-29
 **Validation status:** Method documented, internally verified




### Purpose



Models credit card payoff under two payment strategies: (1) the minimum payment, which is recomputed from the declining balance each month so the required payment shrinks as the balance shrinks, and (2) a fixed payment. Calculates total interest paid and months to zero under each strategy.




### Formula



Periodic monthly interest (integer-cent arithmetic):



interestt = balancet × (APR / 100 / 12)



Default minimum payment model ("interest-plus-percent", common U.S. issuer formula):



minimumt = max(floor, interestt + ceil(balancet × minimumPercent / 100))



Where minimumPercent defaults to 1% and floor defaults to $25. The balance is reduced by the principal portion (payment − interest) each month.




### Inputs



| Input | Type | Constraint |
| --- | --- | --- |
| balance | number | finite, > 0 |
| annualRatePercent | number | finite, ≥ 0 |
| fixedPayment | number | optional; must exceed monthly interest if supplied |
| minimumPercent | number | optional; 1 (default), applied to principal only |
| minimumFloor | number | optional; $25 (default) |




### Assumptions



- No new purchases, fees, or balance transfers during the payoff period.
- Interest compounds monthly on the outstanding principal balance.
- The "interest-plus-percent" model always amortizes the balance at any APR, unlike a pure "percent-of-statement" model which can produce negative amortization above roughly 24% APR.




### Test cases



| Balance | APR | Payment strategy | Month-1 interest | Month-1 payment |
| --- | --- | --- | --- | --- |
| 5,000 | 20% | Minimum (1% + interest, $25 floor) | 83.33 | ~133.33 (83.33 + 50) |
| 5,000 | 20% | Fixed $200 | 83.33 | 200.00 |




### Limitations



- There is no single U.S. industry standard for minimum payment calculations; issuers vary in percentage, floor, and whether interest is included. The method, percentage, and floor are all inputs.
- Late fees, annual fees, penalty APR, and cash-advance rates are not modeled.








## DCF Valuation Calculator



**Canonical tool:** [DCF Valuation Tool (Research)](https://www.getswoopr.com/research/valuation/dcf-analysis/) 
 **Core module:** `public/dcf-valuation-core.js` 
 **Formula version:** 1.0
 **Last verified:** 2026-09-29
 **Validation status:** Method documented, internally verified




### Purpose



Estimates the intrinsic value of a company as the sum of its discounted projected free cash flows plus a discounted terminal value based on the Gordon Growth Model. Companion to the Reverse DCF Expectations Calculator, which solves the same model for the implied growth rate.




### Formula



FCF projection (baseYear 1 convention, where baseFcf is the year-1 FCF):



FCFt = baseFcf × (1 + g)t − 1



Present value of each projected year's FCF:



PVt = FCFt / (1 + discountRate)t



Terminal value (Gordon Growth, discounted back at the final forecast year):



TV = [FCFN × (1 + terminalGrowthRate) / (discountRate − terminalGrowthRate)] / (1 + discountRate)N



Intrinsic value = SUM(PV1..PVN) + TV



The same `projectCashFlows()` function is shared by the forward DCF and the Reverse DCF so the two tools cannot drift onto different growth-timing conventions.




### Inputs



| Input | Type | Constraint |
| --- | --- | --- |
| baseFcf | number | > 0 (year-1 FCF when baseYear = 1) |
| growthPercent | number | finite |
| discountRatePercent | number | finite, > terminalGrowthPercent |
| terminalGrowthPercent | number | finite, < discountRatePercent |
| forecastYears | number | integer, ≥ 1 |




### Assumptions



- Constant FCF growth rate throughout the forecast period.
- Terminal value uses the Gordon Growth Model, which requires discountRate > terminalGrowthRate.
- The discount rate is the weighted-average cost of capital (WACC) or required return; its choice dominates the output.




### Test cases



| Base FCF | Growth | Discount rate | Terminal growth | Years | Intrinsic value (approx) |
| --- | --- | --- | --- | --- | --- |
| 100 | 10% | 12% | 3% | 5 | ~1,313 (sum of PVs + TV) |
| 100 | 0% | 10% | 0% | 10 | ~1,000 (FCF stays 100/yr at 10% discount = perpetuity) |




### Limitations



- DCF output is highly sensitive to the discount rate and terminal growth rate; small input changes produce large valuation changes.
- Free cash flow projections are assumptions; actual cash flows depend on factors outside the model.
- Does not model debt, share count dilution, or non-recurring items.








## Municipal Tax-Equivalent Yield Calculator



**Canonical tool:** [Municipal Bonds](https://www.getswoopr.com/fixed-income-bonds/municipal-bonds/) 
 **Core module:** `public/muni-tax-equivalent-core.js` 
 **Formula version:** 1.0
 **Last verified:** 2026-09-29
 **Validation status:** Method documented, internally verified




### Purpose



Converts a tax-exempt municipal bond yield into the taxable equivalent yield (TEY) needed to match it after-tax for a holder in a given federal marginal tax bracket. Because the TEY depends entirely on the holder's bracket, a single "muni yields look low" judgment is meaningless without this calculation.




### Formula



Tax-equivalent yield = tax-exempt yield / (1 − marginal federal rate)



This is the gross-up formula: it asks what taxable yield, reduced by taxes at the marginal rate, would leave the same after-tax income as the tax-exempt yield. State tax treatment is modeled separately when a state-specific rate is included.




### Inputs



| Input | Type | Constraint |
| --- | --- | --- |
| taxExemptYieldPercent | number | finite, ≥ 0 |
| marginalRatePercent | number | finite, ≥ 0 and < 100 |




### Assumptions



- Federal exemption only; many munis are also exempt from state tax for in-state holders, which increases the effective gross-up.
- The marginal rate applies to the full income increment; interaction with NIIT (3.8% on net investment income above thresholds) or AMT is not modeled.




### Test cases



| Tax-exempt yield | Marginal rate | Tax-equivalent yield |
| --- | --- | --- |
| 3.20% | 32% | 4.71% |
| 3.20% | 12% | 3.64% |
| 4.00% | 37% | 6.35% |
| 3.00% | 0% | 3.00% (no gross-up at 0% bracket) |




### Limitations



- Tax-exempt status varies by issuer and holder; not all municipal bonds are exempt from state or federal tax in all circumstances (e.g., private-activity bonds may trigger AMT).
- The formula applies to coupon income only; capital gains on muni bonds are taxable at normal capital-gains rates.








## Real Estate Cap Rate Calculator



**Canonical tool:** [Real Estate Cap Rate Calculator](https://www.getswoopr.com/tools/real-estate-cap-rate-calculator/) 
 **Core module:** `public/real-estate-cap-rate-core.js` 
 **Formula version:** 1.0
 **Last verified:** 2026-09-29
 **Validation status:** Method documented, internally verified




### Purpose



Calculates net operating income (NOI), capitalization rate, and cash-on-cash return for a real estate investment. Follows the conventions used in Swoopr's REIT and sector-analysis education, where NOI is defined as property revenue minus operating expenses before financing costs and capital expenditures.




### Formula



NOI = gross income − operating expenses (before debt service and capex)



Cap Rate = NOI / property value



Annual pre-tax cash flow = NOI − annual debt service



Cash-on-Cash Return = annual pre-tax cash flow / total cash invested



Debt service (when financed) is computed from the standard level-payment amortization formula in `public/money-core.js`.




### Inputs



| Input | Type | Constraint |
| --- | --- | --- |
| grossIncome | number | finite, ≥ 0 |
| operatingExpenses | number | finite, ≥ 0 |
| propertyValue | number | finite, > 0 |
| loanAmount | number | optional; ≥ 0, defaults to 0 (all-cash) |
| annualRatePercent | number | optional; ≥ 0 |
| termMonths | number | optional; integer, ≥ 1 |




### Assumptions



- NOI excludes debt service and capital expenditures (standard property-level operating income definition).
- Cap rate is a snapshot metric; it does not capture appreciation, leverage, or tax treatment.
- Cash-on-cash return is pre-tax; income taxes on rental income and depreciation recapture are not included.




### Test cases



| Gross income | Expenses | Property value | NOI | Cap rate |
| --- | --- | --- | --- | --- |
| 60,000 | 20,000 | 500,000 | 40,000 | 8.00% |
| 100,000 | 40,000 | 1,200,000 | 60,000 | 5.00% |




### Limitations



- Cap rate is meaningful only when compared to similar properties in the same market; it is not an absolute measure of return.
- Does not model vacancy rates, capital expenditure reserves, rent growth, or property appreciation.








## Leveraged ETF Volatility-Decay Simulator



**Canonical tool:** [Leveraged ETF Decay Simulator](https://www.getswoopr.com/etf-investing/leveraged-etf-decay-simulator/) 
 **Core module:** `public/leveraged-etf-decay-simulator-core.js` 
 **Formula version:** 1.0
 **Last verified:** 2026-09-29
 **Validation status:** Method documented, internally verified




### Purpose



Simulates a leveraged or inverse ETF over a user-specified number of trading days using a daily-reset compounding model with pseudo-random daily returns drawn from a normal distribution. Compares the actual ETF result against the "naive multiple" (what L times the index return would look like without daily-reset compounding) to illustrate volatility decay.




### Formula



Daily return: rt ~ Normal(mu, sigma), generated via the Box-Muller transform from a deterministic linear-congruential generator seeded by the caller. Daily drift conversion: mu = annualDrift / 252, sigma = dailyVolatility / 100.



Index level: Indext = Indext−1 × (1 + rt)



ETF level (daily-reset, actual mechanism): ETFt = ETFt−1 × (1 + L × rt − dailyER)



Where dailyER = annualExpenseRatioPct / 100 / 252.



Naive multiple (what an investor might expect): naivet = 1 + L × (Indext − 1)



Volatility decay = ETFt − naivet. A repeating sequence of +r / −r daily returns is the clearest deterministic illustration: (1 + L×r)(1 − L×r) = 1 − (L×r)2 < 1.




### Inputs



| Input | Type | Constraint |
| --- | --- | --- |
| leverage | number | nonzero; 1 to 10 (long) or -10 to -1 (inverse) |
| dailyVolatilityPct | number | 0.1 to 10 |
| annualDriftPct | number | -50 to 100 |
| days | number | integer, 1 to 5000 |
| annualExpenseRatioPct | number | 0 to 5 |
| seed | number | integer; determines the pseudo-random sequence |




### Assumptions



- Daily returns are drawn from a normal distribution; real return distributions have fat tails and are not normal.
- The linear-congruential generator produces a deterministic sequence from the seed; same seed always produces the same simulation path.
- Expense ratio is a proportional daily deduction; it does not model rebalancing friction, bid-ask spread, or intraday NAV deviation.




### Deterministic example



Two-day alternating sequence, +r / −r, no expense ratio: ETF factor = (1 + L×r)(1 − L×r) = 1 − (L×r)2. At L = 2, r = 1% daily: ETF factor = 1 − (0.02)2 = 0.9996. Index factor = (1.01)(0.99) = 0.9999. Volatility decay is small per round-trip but compounds daily.




### Limitations



- This is a statistical illustration, not a forecast. Actual ETF performance depends on the real return path, intraday volatility, and fund-specific management.
- Leveraged and inverse ETFs are not designed for buy-and-hold periods longer than one trading day; this simulator is intended to illustrate the mathematical mechanism, not recommend a strategy.








## CD Ladder Builder



**Canonical tool:** [CD Ladder Builder](https://www.getswoopr.com/tools/cd-ladder-builder/) 
 **Core module:** `public/cd-ladder-core.js` 
 **Formula version:** 1.0
 **Last verified:** 2026-09-29
 **Validation status:** Method documented, internally verified




### Purpose



Splits a total capital amount evenly across a chosen number of CD "rungs" and projects one year of illustrative interest per rung at a single assumed flat APY. Designed as a planning illustration, not a maturity-by-maturity quote.




### Formula



Rung amount = totalAmount / numberOfRungs (rounded to cents; any rounding remainder goes to the final rung and is reported separately)



Illustrative one-year interest per rung = rung amount × (assumedApyPercent / 100)



Total illustrative interest = SUM of interest across all rungs




### Inputs



| Input | Type | Constraint |
| --- | --- | --- |
| totalAmount | number | finite, > 0 |
| numberOfRungs | number | integer, ≥ 2 |
| assumedApyPercent | number | finite, ≥ 0 |




### Assumptions



- All rungs use the same assumed APY; real CD ladders typically use different maturities and different rates per rung.
- One-year interest only; rollover behavior, maturing rung reinvestment, and early-withdrawal penalties are not modeled.
- Deposit insurance coverage per institution and per account ownership category is not enforced.




### Test cases



| Total amount | Rungs | APY | Rung amount | Total interest |
| --- | --- | --- | --- | --- |
| 50,000 | 5 | 4.5% | 10,000.00 | 2,250.00 |
| 10,000 | 3 | 5% | 3,333.33 (final rung: 3,333.34) | 500.00 |




### Limitations



- A flat APY across all rungs does not reflect the actual rate difference between short and long maturities (the yield curve).
- Interest is illustrative for one year; compounding and reinvestment are not modeled across the full ladder horizon.








## Savings Goal Calculator



**Canonical tool:** [Savings Goal Calculator](https://www.getswoopr.com/tools/savings-goal-calculator/) 
 **Core module:** `public/savings-goal-core.js` 
 **Formula version:** 1.0
 **Last verified:** 2026-09-29
 **Validation status:** Method documented, internally verified




### Purpose



Solves the compound-growth equation in reverse: given a savings target and a deadline, calculate the required monthly contribution; or given a savings target and a fixed monthly contribution, calculate the required months. Uses the same ordinary-annuity identity as the Compound Growth Calculator, so both tools agree on the forward projection.




### Formula



Underlying identity (end-of-month contributions, monthly compounding):



FV = P(1 + i)n + C × [((1 + i)n − 1) / i]



Solve for monthly contribution C (deadline mode, i > 0):



C = (FV − P(1 + i)n) × i / ((1 + i)n − 1)



Solve for months n (contribution mode, i > 0):



n = ln((FV × i + C) / (P × i + C)) / ln(1 + i)



When i = 0: C = (FV − P) / n or n = (FV − P) / C.



The solved answer is rounded UP (contribution to the next cent; months to the next whole month) so the plan lands at or above the target.




### Inputs



| Input | Type | Constraint |
| --- | --- | --- |
| mode | string | "contribution" or "date" |
| targetAmount | number | > 0 |
| currentSavings | number | optional; ≥ 0, defaults to 0 |
| annualRatePercent | number | ≥ 0 |
| months | number | integer ≥ 1 (contribution mode only) |
| monthlyContribution | number | > 0 (date mode only) |




### Assumptions



- End-of-month contributions (ordinary annuity convention), matching the Compound Growth Calculator.
- Constant rate throughout the saving period; early-withdrawal penalties and taxes are not modeled.
- The solved contribution is immediately verified by running the forward formula; if the verification misses the target, the implementation is in error.




### Test cases



| Mode | Target | Current savings | Rate | Months / Contribution | Result |
| --- | --- | --- | --- | --- | --- |
| contribution | 10,000 | 0 | 0% | 12 months | $833.34/month (rounded up from 833.33) |
| date | 10,000 | 0 | 0% | $500/month | 20 months |
| contribution | 50,000 | 10,000 | 5% | 60 months | ~$531/month (approx) |




### Limitations



- The rate is an assumption; real savings accounts have variable rates that change over time.
- Maximum savings period is capped at 720 months (60 years); an input combination that cannot reach the target within this period returns an error.








## Formula versioning policy



A new formula version is created when Swoopr changes:



- the equation;
- a required regulatory input (such as a new IRS table);
- a default assumption that materially affects output;
- input interpretation or validation;
- rounding behavior;
- a boundary condition;
- the implementation in a way that changes results.



Cosmetic changes to display labels, UI controls, or page layout do not require a formula-version change.



When a regulatory input changes (such as an IRS table update), the registry entry is updated to reflect the new effective date and source. The prior version and effective date range are recorded in the change log for that entry.








## Source policy



When a calculator depends on a rule that can change, the registry entry records the strongest current source: the IRS for federal tax and retirement limits, SEC or FINRA for securities rules, Federal Reserve or Treasury for official rates, exchange or index-provider methodology for market mechanics, and issuer filings for reported company figures.



A blog or secondary explainer is not accepted as the sole authority when the responsible institution publishes the rule directly.



Time-sensitive entries record a last-verified date. Regulators and agencies revise limits, tables, and rules; an entry verified in a prior tax year may not reflect a subsequent change. See [Primary Financial Sources](https://www.getswoopr.com/research/primary-sources/) for the full source hierarchy Swoopr uses.








## Registry limitations notice



This registry documents method; it does not guarantee accuracy for every input combination or real-world scenario.



Limitations common to all tools in this registry:



- Return and rate assumptions are not forecasts.
- Historical data does not predict future behavior.
- Tax treatment depends on facts not captured in any calculator (jurisdiction, account type, income, filing status).
- Regulatory rules change; the last-verified date reflects the most recent verification, not a guarantee of current accuracy.
- Browser floating-point arithmetic may introduce rounding differences of ±0.01 in the last displayed decimal place.








## Frequently asked questions






What does the Swoopr Formula Registry document?




The Swoopr Formula Registry documents the mathematical formulas, input definitions and units, rounding rules, assumptions, known limitations, authoritative sources, test vectors, and version history for each Swoopr calculator and analytical tool. Its goal is reproducibility: any user entering the same valid inputs into the same formula version should receive the same output and be able to verify it independently.










How does Swoopr calculate CAGR?




Swoopr calculates Compound Annual Growth Rate using the standard geometric-mean formula: CAGR = (ending value / beginning value)1/years − 1. Both values must be positive finite numbers and the holding period must be greater than zero. Example: $10,000 growing to $12,100 over 2 years gives CAGR = (12100/10000)0.5 − 1 = 10.00%.










How does the position size calculator determine share count?




The calculator computes the dollar amount at risk (account balance × risk percent / 100), then divides by the true stop distance (|entry price − stop price|) using unrounded prices to avoid floating-point distortion. Shares = floor(account risk / stop distance). The floor ensures the position never exceeds the risk budget.










What table does the RMD Estimator use?




The RMD Estimator uses the IRS Uniform Lifetime Table from IRS Publication 590-B (Appendix B, Table III), as updated under Treasury Decision T.D. 9930, effective January 1, 2022. RMD = prior year-end account balance / distribution period factor from the table for the owner's age. This is an estimate; actual obligations depend on account type, beneficiary designations, and other factors.










Does a documented formula constitute financial advice?




No. A documented calculator is not personalized financial advice. A formula can be mathematically correct and still be unsuitable for a particular decision. Calculators simplify taxes, fees, future returns, inflation, market behavior, and other uncertain inputs. Documentation makes those limitations visible; it does not eliminate them.












## References



- [IRS: Publication 590-B, Distributions from Individual Retirement Arrangements (IRAs)](https://www.irs.gov/publications/p590b)
- [Federal Register: T.D. 9930, Updated Life Expectancy and Distribution Period Tables Used for Purposes of Determining Minimum Required Distributions](https://www.govinfo.gov/content/pkg/FR-2020-11-12/pdf/2020-24723.pdf)











**[Swoopr Editorial Team](https://www.getswoopr.com/authors/swoopr-editorial-team/)**



The Swoopr Editorial Team produces independent investment education and research tools at Swoopr Investment. Content is reviewed for accuracy against primary regulatory and authoritative sources. We follow the [editorial policy](https://www.getswoopr.com/legal/editorial-policy/) and [corrections policy](https://www.getswoopr.com/legal/corrections-policy/) published on this site.



Swoopr Investment is not a registered investment adviser. Nothing on this site constitutes personalized financial advice. See [legal disclaimer](https://www.getswoopr.com/legal/disclaimer/).
