90+ stateless financial calculators for loans, investing, bonds, options, and taxes.
Captured live from the server via tools/list.
amortization
Monthly loan amortization schedule and summary. Supports dated extra principal payments and a rate-fixed period. detail controls output size: 'summary' (default) returns totals plus a per-year breakdown; 'monthly' returns the full schedule (paginate with offset/limit). Returns numbers and schedules; no advice.
Parameters (12)
amountnumberrequired
Loan principal.
ratenumberrequired
Annual interest rate in percent (6 = 6%).
modestringrequired
Fix the term (compute the payment) or fix the payment (compute the term).
termYearsnumber
Term in years, used when mode is 'term'.
paymentnumber
Monthly payment, used when mode is 'payment'.
startDatestringrequired
First payment month as an ISO date (YYYY-MM-DD).
fixedUntilstring
Optional. Rate is certain until this ISO date; beyond it the schedule is an estimate.
extraarray
Optional dated extra principal payments.
detailstring
Output size. summary (default): totals + yearly breakdown. monthly: full schedule (use offset/limit to paginate).
offsetnumber
Monthly schedule start index when detail=monthly (default 0).
limitnumber
Max monthly rows when detail=monthly (default all).
rateStepsarray
Optional rate changes (e.g. after a Zinsbindung). The installment is held; from each date the outstanding balance continues at the new annual rate.
loan-payoff
Time and interest saved by paying a fixed extra amount every month on a loan, versus the baseline schedule.
Parameters (9)
amountnumberrequired
Loan principal.
ratenumberrequired
Annual interest rate in percent (6 = 6%).
modestringrequired
Fix the term (compute the payment) or fix the payment (compute the term).
termYearsnumber
Term in years, used when mode is 'term'.
paymentnumber
Monthly payment, used when mode is 'payment'.
startDatestringrequired
First payment month as an ISO date (YYYY-MM-DD).
fixedUntilstring
Optional. Rate is certain until this ISO date; beyond it the schedule is an estimate.
extraarray
Optional dated extra principal payments.
extraMonthlynumberrequired
Extra principal paid each month.
future-value
Future value of a single lump sum compounded annually.
Parameters (3)
principalnumberrequired
Starting amount.
annualRatePctnumberrequired
Annual growth rate in percent.
yearsnumberrequired
Number of years.
contributions
Future value of a fixed monthly contribution, optionally stepping up each year.
Parameters (4)
monthlynumberrequired
Monthly contribution.
annualRatePctnumberrequired
Annual growth rate in percent.
monthsnumberrequired
Number of months.
contribGrowthPctnumber
Optional. Contribution step-up percent per year.
cagr
Compound annual growth rate between two values over a number of years. Returns a decimal (0.07 means 7%).
Parameters (3)
beginnumberrequired
Starting value.
endnumberrequired
Ending value.
yearsnumberrequired
Number of years.
savings-rate
Fraction of income saved (savings divided by income). Returns a decimal.
Parameters (2)
incomenumberrequired
Income.
savingsnumberrequired
Amount saved.
fx-convert
Convert an amount using a rate supplied by the caller (units of target currency per unit of source). No rate is ever looked up.
Parameters (2)
amountnumberrequired
Amount to convert.
ratenumberrequired
Rate: target units per source unit.
depreciate
Value after compounding down (or up) at a yearly percentage rate over a number of years. This is the method the app uses for long-term assets.
Parameters (4)
valuenumberrequired
Starting value.
annualRatePctnumberrequired
Annual rate in percent.
yearsnumberrequired
Number of years.
upboolean
false depreciates, true appreciates.
straight-line-depreciation
Straight-line depreciation: value falling evenly to a salvage value over a useful life.
Parameters (4)
valuenumberrequired
Starting value.
salvagenumberrequired
Salvage value.
usefulYearsnumberrequired
Useful life in years.
yearsElapsednumberrequired
Years elapsed.
fire-number
FIRE target nest egg from annual spend and a safe withdrawal rate (default 4%), plus the gap from today and the years to reach it given optional savings and growth. No advice.
Parameters (5)
annualSpendnumberrequired
Yearly spending the nest egg must cover.
withdrawalRatePctnumber
Safe withdrawal rate in percent (default 4 = the 4% rule).
currentNestEggnumber
Optional. Amount already saved (default 0).
annualContributionnumber
Optional. Amount saved per year (default 0).
annualRatePctnumber
Optional. Annual portfolio growth in percent (default 0).
required-contribution
Inverse of contributions: the fixed monthly amount needed to reach a target future value over a number of months, given an optional starting balance.
Parameters (4)
targetValuenumberrequired
Future value goal.
annualRatePctnumberrequired
Annual growth rate in percent.
monthsnumberrequired
Number of months.
presentValuenumber
Optional. Starting balance (default 0).
inflation-adjust
Convert a nominal amount to today's purchasing power (real), or with toNominal inflate a real amount forward, at a given annual inflation rate.
Parameters (4)
amountnumberrequired
Amount to adjust.
inflationRatePctnumberrequired
Annual inflation rate in percent.
yearsnumberrequired
Number of years.
toNominalboolean
false (default) deflates nominal to real; true inflates real to nominal.
effective-rate
Convert a nominal annual rate to the effective annual rate (APY) for a compounding frequency, or with toNominal recover the nominal rate from an APY.
Parameters (3)
ratePctnumberrequired
The rate in percent (nominal, or effective when toNominal is true).
periodsPerYearnumberrequired
Compounding periods per year (12 monthly, 365 daily).
toNominalboolean
false (default) returns the effective rate; true returns the nominal rate.
npv
Net present value of a cashflow series (index 0 is today; outflows negative) discounted at a per-period rate.
Parameters (2)
cashflowsarrayrequired
Cashflows by period, starting at period 0. Outflows are negative.
discountRatePctnumberrequired
Discount rate per period in percent.
irr
Internal rate of return: the per-period rate that zeroes the NPV of a cashflow series. Returns a percent, or null when the series never crosses zero.
Parameters (1)
cashflowsarrayrequired
Cashflows by period, starting at period 0. Outflows are negative.
refi-breakeven
Refinance break-even: monthly saving, whole months to recoup closing costs, and (if remainingMonths given) the net saving over the remaining term.
Parameters (4)
closingCostsnumberrequired
Upfront cost to refinance.
currentPaymentnumberrequired
Current monthly payment.
newPaymentnumberrequired
New monthly payment after refinancing.
remainingMonthsnumber
Optional. Months left on the loan, for the lifetime saving.
emergency-fund
Months of runway: liquid savings divided by monthly expenses.
Parameters (2)
liquidSavingsnumberrequired
Cash and liquid savings on hand.
monthlyExpensesnumberrequired
Total monthly expenses.
mortgage-affordability
Maximum loan and home price the income supports: the DTI cap on gross monthly income (less existing debts) sets the payment, whose present value at the rate and term is the loan.
Parameters (6)
annualIncomenumberrequired
Gross annual income.
dtiPctnumberrequired
Max share of gross monthly income for the payment, in percent (e.g. 36).
Optional. Cash down payment, added to the loan for the home price (default 0).
debt-payoff
Multi-debt payoff plan under a fixed monthly budget. method 'avalanche' (highest rate first) minimizes interest; 'snowball' (smallest balance first) clears accounts soonest. Returns months, total interest, and payoff order; flags insolvent budgets.
Parameters (3)
debtsarrayrequired
The debts to pay off.
monthlyBudgetnumberrequired
Total amount available across all debts each month.
methodstring
Payoff strategy (default avalanche).
portfolio-longevity
How many years a balance lasts while withdrawing from it: the balance grows each year, then the withdrawal (optionally stepping up) is taken. Returns the depletion year, or sustainable=true when it outlasts 200 years.
Parameters (4)
balancenumberrequired
Starting balance.
annualWithdrawalnumberrequired
Amount withdrawn in the first year.
annualRatePctnumberrequired
Annual portfolio growth in percent.
withdrawalGrowthPctnumber
Optional. Yearly step-up of the withdrawal in percent (default 0).
present-value
Present value of a single future amount discounted annually. The inverse of future-value.
Parameters (3)
futureAmountnumberrequired
Amount received in the future.
annualRatePctnumberrequired
Annual discount rate in percent.
yearsnumberrequired
Number of years until the amount is received.
required-return
Annual return needed to grow a starting value to a target over a number of years, optionally with a fixed annual contribution. With no contribution this equals CAGR. Returns a percent, or null when unreachable.
Parameters (4)
beginnumberrequired
Starting value.
endnumberrequired
Target ending value.
yearsnumberrequired
Number of years.
annualContributionnumber
Optional. Amount added each year (default 0).
yield-to-maturity
Bond yield to maturity: the nominal annual yield that prices a bond at the given price, with periodic coupons and face returned at maturity. Solved numerically. Returns a percent, or null.
Parameters (5)
pricenumberrequired
Current bond price.
faceValuenumberrequired
Face (par) value repaid at maturity.
couponRatePctnumberrequired
Annual coupon rate in percent of face.
yearsnumberrequired
Years to maturity.
periodsPerYearnumber
Coupon periods per year (default 2 = semiannual).
tax-from-brackets
Progressive tax from caller-supplied brackets. No jurisdiction, year, or rates are baked in: pass the brackets yourself. Returns total tax, effective rate, and marginal rate.
Parameters (2)
incomenumberrequired
Taxable income.
bracketsarrayrequired
Ordered tax bands. The final band may omit upTo to run to infinity.
margin-markup
Convert between margin and markup. Supply any one of cost/price plus one of marginPct/markupPct (or both cost and price); returns cost, price, profit, marginPct, and markupPct.
Parameters (4)
costnumber
Unit cost.
pricenumber
Selling price.
marginPctnumber
Profit as a percent of price.
markupPctnumber
Profit as a percent of cost.
compound-interest
Compound growth at any frequency, with an optional contribution each period (paid at period end). Generalizes future-value (periodsPerYear 1) and contributions (periodsPerYear 12).
Parameters (5)
principalnumberrequired
Starting amount.
annualRatePctnumberrequired
Annual growth rate in percent.
yearsnumberrequired
Number of years.
periodsPerYearnumber
Compounding periods per year (default 1).
contributionPerPeriodnumber
Optional. Amount added each period (default 0).
de-gross-to-net
German net (Netto) salary from gross (Brutto). No tax tables are baked in: look up the current year's statutory figures and pass them in. Income tax (Lohnsteuer) and Soli are amounts; church tax is a percent of the income tax; the four employee social rates and the two contribution ceilings are inputs. Use consistent units (e.g. all annual).
Parameters (10)
grossnumberrequired
Gross salary (Brutto).
incomeTaxnumber
Income tax (Lohnsteuer) amount for the period — look up via the §32a / Steuerklasse tables.
solinumber
Solidarity surcharge (Solidaritätszuschlag) amount (often 0 below the threshold).
churchTaxPctnumber
Church tax (Kirchensteuer) rate in percent of income tax (8 or 9, 0 if none).
pensionPctnumber
Employee pension (Rentenversicherung) rate in percent (e.g. 9.3).
unemploymentPctnumber
Employee unemployment (Arbeitslosenversicherung) rate in percent (e.g. 1.3).
healthPctnumber
Employee health (Krankenversicherung incl. Zusatzbeitrag) rate in percent.
carePctnumber
Employee long-term care (Pflegeversicherung) rate in percent.
pensionCeilingnumber
Contribution ceiling (Beitragsbemessungsgrenze) for pension and unemployment.
healthCeilingnumber
Contribution ceiling for health and care.
vat
Value-added tax (MwSt/USt, sales tax) on a price. By default adds the tax to a net price; with inclusive=true treats the amount as gross and extracts the tax. The rate is always an input (19 or 7 for Germany, etc.).
Parameters (3)
amountnumberrequired
The price.
ratePctnumberrequired
VAT rate in percent (e.g. 19 or 7).
inclusiveboolean
false (default): amount is net, add the tax. true: amount is gross, extract the tax.
roi
Return on investment: total percent gain, plus the annualized rate when a holding period in years is given.
Parameters (3)
initialnumberrequired
Amount invested.
finalValuenumberrequired
Ending value.
yearsnumber
Optional. Holding period in years, for the annualized rate.
real-return
Real (inflation-adjusted) return from a nominal rate via the Fisher relation: (1+nominal)/(1+inflation) - 1.
Parameters (2)
nominalRatePctnumberrequired
Nominal annual rate in percent.
inflationRatePctnumberrequired
Annual inflation in percent.
return-stats
Mean, sample variance, and sample standard deviation (n-1) of a series of returns. Pass percents to get a percent stdev (volatility).
Parameters (1)
returnsarrayrequired
The return series (e.g. yearly percents).
sharpe-ratio
Sharpe ratio: excess mean return per unit of volatility, (mean - riskFree) / stdev. Null when volatility is undefined or zero.
Parameters (2)
returnsarrayrequired
The return series (percents).
riskFreePctnumber
Risk-free rate in the same unit (default 0).
max-drawdown
Maximum drawdown of a value series: the largest peak-to-trough decline, as a positive percent.
Parameters (1)
seriesarrayrequired
Sequence of values (e.g. portfolio levels).
holding-period-return
Holding-period return: (income + capital gain) / starting value, in percent.
Parameters (3)
incomenumberrequired
Income received over the period.
endValuenumberrequired
Ending value.
beginValuenumberrequired
Starting value.
fee-drag
Effect of an annual fee: the compounded balance at the gross rate vs net of the fee, and the amount lost to fees.
Parameters (4)
principalnumberrequired
Starting amount.
grossAnnualPctnumberrequired
Gross annual return in percent.
feePctnumberrequired
Annual fee in percent.
yearsnumberrequired
Number of years.
dollar-cost-averaging
Dollar-cost averaging: buying a fixed amount each period at the given prices. Returns units accumulated, total invested, average cost, and final value at the last price.
Parameters (2)
pricesarrayrequired
Price at each purchase period.
periodicInvestmentnumberrequired
Fixed amount invested each period.
bond-price
Price of a coupon bond given a yield: present value of the coupons plus the face at maturity.
Parameters (5)
faceValuenumberrequired
Face (par) value.
couponRatePctnumberrequired
Annual coupon rate in percent of face.
yearsnumberrequired
Years to maturity.
yieldPctnumberrequired
Annual yield in percent.
periodsPerYearnumber
Coupon periods per year (default 2).
current-yield
Current yield: the annual coupon as a percent of the bond's current price.
Parameters (3)
pricenumberrequired
Current bond price.
faceValuenumberrequired
Face value.
couponRatePctnumberrequired
Annual coupon rate in percent of face.
bond-duration
Macaulay duration (PV-weighted average time of cashflows, in years) and modified duration (price sensitivity to yield).
Parameters (5)
faceValuenumberrequired
Face value.
couponRatePctnumberrequired
Annual coupon rate in percent.
yearsnumberrequired
Years to maturity.
yieldPctnumberrequired
Annual yield in percent.
periodsPerYearnumber
Coupon periods per year (default 2).
convexity
Bond convexity (years^2): the curvature of price with respect to yield, used alongside duration.
Parameters (5)
faceValuenumberrequired
Face value.
couponRatePctnumberrequired
Annual coupon rate in percent.
yearsnumberrequired
Years to maturity.
yieldPctnumberrequired
Annual yield in percent.
periodsPerYearnumber
Coupon periods per year (default 2).
zero-coupon-price
Price of a zero-coupon bond: face value discounted to today at the yield.
Parameters (4)
faceValuenumberrequired
Face value.
yearsnumberrequired
Years to maturity.
yieldPctnumberrequired
Annual yield in percent.
compoundingPerYearnumber
Compounding periods per year (default 1).
accrued-interest
Accrued interest since the last coupon: the annual coupon pro-rated by days elapsed over the day-count basis.
Parameters (4)
faceValuenumberrequired
Face value.
couponRatePctnumberrequired
Annual coupon rate in percent.
daysSinceLastCouponnumberrequired
Days since the last coupon.
dayCountBasisnumber
Day-count basis (default 360).
black-scholes
Black-Scholes price of a European call or put option, plus d1/d2. Volatility and rates in percent; optional continuous dividend yield.
Parameters (7)
spotnumberrequired
Current underlying price.
strikenumberrequired
Strike price.
yearsnumberrequired
Time to expiry in years.
volatilityPctnumberrequired
Annualized volatility in percent.
riskFreePctnumberrequired
Risk-free rate in percent.
dividendYieldPctnumber
Continuous dividend yield in percent (default 0).
typestring
Option type (default call).
option-greeks
Black-Scholes greeks for a European option: delta, gamma, vega (per 1% vol), theta (per day), rho (per 1% rate).
Parameters (7)
spotnumberrequired
Current underlying price.
strikenumberrequired
Strike price.
yearsnumberrequired
Time to expiry in years.
volatilityPctnumberrequired
Annualized volatility in percent.
riskFreePctnumberrequired
Risk-free rate in percent.
dividendYieldPctnumber
Continuous dividend yield in percent (default 0).
typestring
Option type (default call).
put-call-parity
Put-call parity: given one option price, returns both. Provide call or put, plus spot, strike, years, and the rate.
Parameters (7)
callnumber
Call price (provide call or put).
putnumber
Put price (provide call or put).
spotnumberrequired
Underlying price.
strikenumberrequired
Strike price.
yearsnumberrequired
Time to expiry in years.
riskFreePctnumberrequired
Risk-free rate in percent.
dividendYieldPctnumber
Continuous dividend yield in percent (default 0).
option-breakeven
Break-even underlying price at expiry: strike + premium for a call, strike - premium for a put.
Parameters (3)
strikenumberrequired
Strike price.
premiumnumberrequired
Option premium paid.
typestring
Option type (default call).
intrinsic-time-value
Split an option premium into intrinsic value (in-the-money amount) and time value.
Parameters (4)
spotnumberrequired
Underlying price.
strikenumberrequired
Strike price.
premiumnumberrequired
Option premium.
typestring
Option type (default call).
annuity-pv
Present value of an ordinary annuity (level payment at each period end). rate is the per-period rate in percent.
Parameters (3)
paymentnumberrequired
Payment per period.
ratePctnumberrequired
Rate per period in percent.
periodsnumberrequired
Number of periods.
annuity-fv
Future value of an ordinary annuity. rate is the per-period rate in percent.
Parameters (3)
paymentnumberrequired
Payment per period.
ratePctnumberrequired
Rate per period in percent.
periodsnumberrequired
Number of periods.
annuity-payment
The level payment that amortizes a present value over n periods (the loan-payment formula). rate is per period.
Parameters (3)
presentValuenumberrequired
Present value / principal.
ratePctnumberrequired
Rate per period in percent.
periodsnumberrequired
Number of periods.
perpetuity
Present value of a level or growing perpetuity: payment / (rate - growth). Null when growth is not below the rate.
Parameters (3)
paymentnumberrequired
Periodic payment.
ratePctnumberrequired
Discount rate in percent.
growthPctnumber
Optional. Payment growth rate in percent (default 0).
rule-of-72
Years to double: the rule-of-72 estimate (72/rate) and the exact figure (ln2 / ln(1+rate)).
Parameters (1)
ratePctnumberrequired
Growth rate in percent.
payback-period
Simple payback period: periods until cumulative cashflows recover the initial cost, interpolated within the crossing period. Null if never.
Parameters (2)
initialCostnumberrequired
Upfront cost.
cashflowsarrayrequired
Inflow each period.
discounted-payback
Discounted payback period: like payback-period but each cashflow is discounted at the per-period rate.
Parameters (3)
initialCostnumberrequired
Upfront cost.
cashflowsarrayrequired
Inflow each period.
ratePctnumberrequired
Discount rate per period in percent.
mirr
Modified internal rate of return: negatives financed at financeRate, positives reinvested at reinvestRate. Percents in and out.
Parameters (3)
cashflowsarrayrequired
Cashflows by period (index 0 today; outflows negative).
financeRatePctnumberrequired
Finance rate in percent.
reinvestRatePctnumberrequired
Reinvestment rate in percent.
xnpv
Date-aware net present value: each amount discounted by its fractional years (act/365) from the first cashflow's date. Annual rate in percent.
Parameters (2)
cashflowsarrayrequired
Dated cashflows; the first date is the valuation date.
annualRatePctnumberrequired
Annual discount rate in percent.
xirr
Date-aware internal rate of return: the annual rate that zeroes the XNPV of irregular dated cashflows. Null if no rate fits.
Parameters (1)
cashflowsarrayrequired
Dated cashflows; the first date is the valuation date.
loan-apr
Effective APR including upfront fees: the note-rate payment priced against the net proceeds (amount - fees). Annual percent.
Parameters (4)
amountnumberrequired
Loan amount.
ratePctnumberrequired
Note (nominal) annual rate in percent.
termMonthsnumberrequired
Term in months.
feesnumber
Optional. Upfront fees / points in currency (default 0).
interest-only-payment
Interest-only monthly payment on a balance.
Parameters (2)
amountnumberrequired
Outstanding balance.
ratePctnumberrequired
Annual rate in percent.
balloon-loan
Balloon loan: payment based on a long amortization, with the balloon being the balance still due after the shorter balloon term.
Months to clear a credit-card balance at a fixed monthly payment, plus interest paid. Null when the payment can't cover the first month's interest.
Parameters (3)
balancenumberrequired
Current balance.
aprPctnumberrequired
Annual percentage rate in percent.
monthlyPaymentnumberrequired
Fixed monthly payment.
points-breakeven
Mortgage points break-even: the upfront cost to buy down the rate, the monthly payment saving, and the whole months to recoup it.
Parameters (5)
loanAmountnumberrequired
Loan amount.
ratePctnumberrequired
Base annual rate in percent.
termMonthsnumberrequired
Term in months.
pointsPctnumberrequired
Points paid, percent of the loan.
reducedRatePctnumberrequired
Reduced annual rate after buying points.
biweekly-payoff
Biweekly mortgage acceleration: paying half the monthly payment every two weeks. Returns the biweekly payment and the months and interest saved.
Parameters (3)
amountnumberrequired
Loan amount.
ratePctnumberrequired
Annual rate in percent.
termMonthsnumberrequired
Original term in months.
cap-rate
Capitalization rate: net operating income as a percent of property value.
Parameters (2)
noinumberrequired
Net operating income.
propertyValuenumberrequired
Property value.
cash-on-cash
Cash-on-cash return: annual pre-tax cash flow as a percent of the cash invested.
Parameters (2)
annualCashFlownumberrequired
Annual pre-tax cash flow.
cashInvestednumberrequired
Cash invested.
noi
Net operating income: gross rental income less vacancy and operating expenses.
Parameters (3)
grossRentalIncomenumberrequired
Gross annual rental income.
vacancyPctnumberrequired
Vacancy rate in percent.
operatingExpensesnumberrequired
Annual operating expenses.
gross-rent-multiplier
Gross rent multiplier: price divided by gross annual rent.
Parameters (2)
pricenumberrequired
Purchase price.
grossAnnualRentnumberrequired
Gross annual rent.
dscr
Debt service coverage ratio: net operating income divided by annual debt service.
Parameters (2)
noinumberrequired
Net operating income.
annualDebtServicenumberrequired
Annual debt service.
wacc
Weighted average cost of capital: equity and after-tax debt weighted by the capital structure. Percents in and out.
Parameters (5)
equitynumberrequired
Market value of equity.
debtnumberrequired
Market value of debt.
costEquityPctnumberrequired
Cost of equity in percent.
costDebtPctnumberrequired
Cost of debt in percent.
taxRatePctnumberrequired
Tax rate in percent.
break-even-units
Break-even volume: fixed costs divided by the per-unit contribution (price - variable cost), plus the revenue at that volume.
Parameters (3)
fixedCostsnumberrequired
Total fixed costs.
pricePerUnitnumberrequired
Selling price per unit.
variableCostPerUnitnumberrequired
Variable cost per unit.
contribution-margin
Contribution margin per unit and as a percent of price.
Parameters (2)
pricePerUnitnumberrequired
Selling price per unit.
variableCostPerUnitnumberrequired
Variable cost per unit.
current-ratio
Current ratio: current assets over current liabilities.
Parameters (2)
currentAssetsnumberrequired
Current assets.
currentLiabilitiesnumberrequired
Current liabilities.
quick-ratio
Quick (acid-test) ratio: (current assets - inventory) over current liabilities.
Parameters (3)
currentAssetsnumberrequired
Current assets.
inventorynumberrequired
Inventory.
currentLiabilitiesnumberrequired
Current liabilities.
roe
Return on equity, percent: net income over shareholders' equity.
Parameters (2)
netIncomenumberrequired
Net income.
equitynumberrequired
Shareholders' equity.
roa
Return on assets, percent: net income over total assets.
Parameters (2)
netIncomenumberrequired
Net income.
totalAssetsnumberrequired
Total assets.
declining-balance-depreciation
Declining-balance depreciation: a fixed percent of the reducing book value, for a given year. Returns that year's depreciation and the remaining book value.
Parameters (3)
valuenumberrequired
Initial cost.
ratePctnumberrequired
Annual depreciation rate in percent.
yearnumberrequired
Year (1-based).
double-declining-depreciation
Double-declining-balance depreciation: 2/usefulYears of the book value each year, not falling below salvage.
Parameters (4)
valuenumberrequired
Initial cost.
usefulYearsnumberrequired
Useful life in years.
yearnumberrequired
Year (1-based).
salvagenumber
Salvage value (default 0).
sum-of-years-digits
Sum-of-the-years'-digits depreciation: the depreciable base weighted toward the early years.
Parameters (4)
valuenumberrequired
Initial cost.
salvagenumberrequired
Salvage value.
usefulYearsnumberrequired
Useful life in years.
yearnumberrequired
Year (1-based).
units-of-production-depreciation
Units-of-production depreciation: the depreciable base spread over total expected units, charged by the units used this period.
Parameters (4)
valuenumberrequired
Initial cost.
salvagenumberrequired
Salvage value.
totalUnitsnumberrequired
Total expected units over the life.
unitsThisPeriodnumberrequired
Units produced this period.
net-worth
Net worth: assets minus liabilities.
Parameters (2)
assetsnumberrequired
Total assets.
liabilitiesnumberrequired
Total liabilities.
budget-50-30-20
The 50/30/20 budget split of monthly income into needs, wants, and savings.
Parameters (1)
monthlyIncomenumberrequired
Monthly take-home income.
tip-split
Tip and split: the tip amount, the total, and the per-person share.
Parameters (3)
billAmountnumberrequired
Bill amount.
tipPctnumberrequired
Tip in percent.
peoplenumber
Number of people (default 1).
discount
A single percentage discount: the amount off and the final price.
Parameters (2)
pricenumberrequired
Original price.
discountPctnumberrequired
Discount in percent.
successive-discounts
Stacked discounts applied in order: the final price and the effective single discount rate.
Parameters (2)
pricenumberrequired
Original price.
discountsPctarrayrequired
Discounts in percent, applied in order.
percentage-change
Percentage change from one value to another. Null when the starting value is zero.
Parameters (2)
fromnumberrequired
Starting value.
tonumberrequired
Ending value.
unit-price
Unit price: price divided by quantity (for comparing pack sizes). Null when quantity is zero.
Parameters (2)
pricenumberrequired
Price.
quantitynumberrequired
Quantity / size.
hourly-to-salary
Annualize an hourly rate (and the monthly equivalent).
Parameters (3)
hourlyRatenumberrequired
Hourly rate.
hoursPerWeeknumber
Hours per week (default 40).
weeksPerYearnumber
Weeks per year (default 52).
salary-to-hourly
Hourly rate implied by an annual salary.
Parameters (3)
annualSalarynumberrequired
Annual salary.
hoursPerWeeknumber
Hours per week (default 40).
weeksPerYearnumber
Weeks per year (default 52).
after-tax-yield
After-tax yield: a yield reduced by the tax rate. Percents in and out.
Parameters (2)
yieldPctnumberrequired
Pre-tax yield in percent.
taxRatePctnumberrequired
Tax rate in percent.
tax-equivalent-yield
Tax-equivalent yield: the taxable yield that matches a tax-free (e.g. muni) yield. Percents in and out.
Parameters (2)
taxFreeYieldPctnumberrequired
Tax-free yield in percent.
taxRatePctnumberrequired
Marginal tax rate in percent.
coast-fire
Coast FIRE: whether the current nest egg, left to grow untouched to retirement, already reaches the FIRE target. Returns the target, the projected balance, whether it coasts, and any shortfall.
Parameters (5)
currentNestEggnumberrequired
Amount invested today.
annualRatePctnumberrequired
Expected annual growth in percent.
yearsToRetirementnumberrequired
Years until retirement.
annualSpendnumberrequired
Yearly spending in retirement.
withdrawalRatePctnumber
Safe withdrawal rate in percent (default 4).
barista-fire
Barista FIRE: the nest egg needed when part-time income covers part of the spending, so the portfolio only funds the remainder at the safe withdrawal rate.
<p align="center">
<img src="public/assets/icon-512.png" width="96" alt="nestegg.money logo">
</p>
<h1 align="center">nestegg.money</h1>
<p align="center">
A private, zero-knowledge net worth & salary tracker.<br>
Encrypted in your browser. No email, no password, just an account number.
</p>
<p align="center">
<a href="https://nestegg.money"><b>Live app</b></a>
</p>
<p align="center">
<a href="https://github.com/VladimirWrites/nestegg.money/actions/workflows/ci.yml"><img src="https://github.com/VladimirWrites/nestegg.money/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
<a href="LICENSE"><img src="https://img.shields.io/badge/License-Apache_2.0-blue.svg" alt="License: Apache 2.0"></a>
</p>
Screenshots
<p align="center">
<img src="public/assets/screenshots/dashboard.png" width="820" alt="nestegg.money dashboard: net worth over time, allocation donut, and per-year breakdown">
</p>
Overview
A deliberately simple, zero-knowledge personal ledger. Single Cloudflare Worker
serving a static frontend (no framework, no bundler) plus three small API
routes, with D1 for storage. Login is a Mullvad-style account number; data is
encrypted in your browser before it's sent, so the server only ever stores
ciphertext.
What it does
Over time: a stacked bar chart of net worth per year, one colour per
asset (or category), with a net-worth line when liabilities exist.
Allocation: a donut of your most recent year.
Entry: tap a year to open its editor; each row is one asset (name,
currency, value). Add/remove assets, copy the previous year, rename the year.
Categories: assets can be tagged into a category (e.g. several holdings
under "Stocks"). The editor shows each category as a section with a
subtotal; charts roll a category up into one segment.
Long-term assets & loans: a car or house can depreciate/appreciate
continuously and carry a loan with a real amortization schedule — extra
payments, rate-fixed periods, payment-or-term entry. Its net value is
injected into every year you own it.
Multi-currency: each row carries its own currency; everything is shown
in your chosen display currency at ECB rates (/api/fx). Past years use
that year's year-end rates.
Ticker/crypto rows: shares × live price via /api/price (Yahoo proxy).
Past years freeze to that year's closing price. Only the public symbol is
sent upstream — never an account or user identifier.
Salary: monthly pay per person (gross or net — your choice), with events (raises, job changes),
a dual-axis chart, and paste-from-spreadsheet import.
Forecast & retirement: project net worth forward (contributions,
growth, scenario band, FIRE goal) and simulate drawdown with a state
pension (flat amount or German Rentenpunkte).
Sync: zero-knowledge. The account number derives an account hash (the
only thing the server sees) and an AES-GCM key (never leaves the browser).
Multi-device edits merge per record with tombstones, newest wins.
No recovery — keep the number safe; Export JSON is the real backup.
Layout
code
nestegg.money/
├── src/index.js # the Worker: /api/fx, /api/price, /api/vault + routing
├── public/
│ ├── index.html # marketing landing (root domain)
│ ├── dashboard.html # the app — loads one <script type="module" src="js/main.js">
│ ├── css/ # base, landing, app styles
│ └── js/ # native ES modules (no bundler); layers point ui → io → domain
│ ├── domain/ # pure logic, no DOM/network: money, dates, schema, ids,
│ │ # loan, asset-value, model, forecast, retirement, merge, store
│ ├── io/ # effects: crypto (encrypt), storage (localStorage/sync/fetch)
│ ├── ui/ # DOM: dom, chart-kit, charts, networth, assets, salary, gate
│ └── main.js # entry point: cross-cutting wiring + boot
├── tests/ # node --test over the pure domain modules
├── schema.sql # D1: one row per account (hash → encrypted blob)
└── wrangler.toml
The Worker runs first (run_worker_first) so it can route the landing page vs
the app by hostname and handle /api/*; everything else falls through to the
static assets binding. The frontend is a plain ES-module graph — the browser
loads it directly, no build step.
Deploy
Requires a Cloudflare account and npm i -g wrangler (then wrangler login).
wrangler d1 create networth-db → copy the database_id into wrangler.toml.
Local dev: wrangler dev (serves the app with live API + local D1).
Cut a release with npm version patch|minor|major — a version hook stamps the
new number into the service-worker cache name (public/sw.js) so clients pick up
the new build.
Tests (loan/asset/forecast/retirement math, migrate, multi-device merge, crypto):
npm test (runs node --test tests/*.mjs — the pure domain modules import directly,
no browser needed).
Calculators & MCP
The finance math is also exposed as stateless calculators any client — including AI
agents — can call. They are pure functions of their inputs: no user data, no live prices, no
FX or tax lookups (you pass the rate / statutory figures in), no auth. This is a remote
service, so your inputs are sent to the server — but it stores nothing and logs no request
bodies: each call is computed in memory and discarded.
JSON API:POST https://nestegg.money/api/calc/<name> (JSON in, JSON out).
GET /api/calc lists them. See public/docs/calculators.md.
MCP server (Streamable HTTP):https://nestegg.money/mcp — the same calculators as MCP
tools, with typed outputSchema, read-only annotations, the docs as resources/*, and
canned workflows as prompts/* (mortgage-plan, fire-check, brutto-netto).
Install in an MCP client:
code
claude mcp add --transport http nestegg https://nestegg.money/mcp
Example (an agent keeps responses small by default, then drills in):
New accounts start empty with the current year. Tap the year to add asset
rows, use "+ Year" for more, or "Reset" to start over.
In a plain preview with no backend it runs local-only via localStorage with
fallback FX rates; sync, live FX and prices activate once deployed.
The server can't read your figures, but it can see the size of the
encrypted blob, sync times, and your IP — stated plainly in the app footer.
Contributing
Issues and pull requests welcome. The domain logic (public/js/domain/) is pure
and covered by tests — run npm test before sending a PR, and add tests for new
behaviour there. The ui/ and io/ layers are thin and browser-facing; keep DOM
work out of domain/. (package.json version and the service-worker cache name
must match — a test enforces it; run npm run sync-version if it complains.)