Methodology

We show our work. Below are the core formulas and assumptions behind each calculator. All money math keeps full floating-point precision internally and rounds only for display.

These are standard, widely used finance formulas — there is nothing proprietary here. Each section states the equation, what every term means, and the assumptions behind it, so you can reproduce any result by hand or check it against another reputable calculator. The formulas below match the code in src/lib/finance.ts and are kept in sync with it.

Loan & mortgage amortization

Fixed-payment (amortizing) loans use the standard annuity payment formula:

Payment = P · r / (1 − (1 + r)−n)

where P is principal, r is the monthly rate (annual rate ÷ 12), and n is the number of payments. Schedules are simulated month by month so extra and one-time payments are handled exactly, with the final payment trimmed to land the balance on zero.

Bi-weekly payments

Paying half the monthly amount every two weeks yields 26 half-payments — 13 full monthly payments per year. We model this as one extra (monthly ÷ 12) of principal each month, which is algebraically equivalent and avoids calendar drift.

Refinance break-even

Break-even months = closing costs ÷ monthly payment savings. Lifetime savings compares remaining interest on the current loan against total interest on the new loan, net of closing costs.

Debt snowball & avalanche

Both simulate month by month: interest accrues on each balance, minimums are paid, then all remaining budget targets one debt — the smallest balance (snowball) or the highest APR (avalanche). Freed-up minimums roll forward (the "snowball"). We always show the side-by-side interest and time difference.

FIRE number & Coast FIRE

The FIRE number is the portfolio that can sustain your spending indefinitely: FIRE number = annual spending ÷ withdrawal rate. At a 4% withdrawal rate this is equivalent to 25× annual spending (1 ÷ 0.04 = 25). The 4% figure comes from the safe-withdrawal-rate literature — William Bengen's 1994 analysis and the 1998 "Trinity study" (Cooley, Hubbard & Walz, Retirement Spending: Choosing a Sustainable Withdrawal Rate) — which found that a portfolio supporting an inflation-adjusted 4% first-year withdrawal historically survived a 30-year retirement with high probability. It is a historical heuristic, not a guarantee: it is based on past U.S. market data, assumes a stock-and-bond portfolio, and may understate the safe rate for very long retirements, which is why some planners prefer 3–3.5%. We let you set the withdrawal rate so you can apply your own assumption.

The Coast FIRE number is the present value of that target, discounted to today at your expected real return: Coast FIRE number = FIRE target ÷ (1 + real return)years to retirement. It is the amount that, invested today, grows to your target with no further contributions. Time to financial independence inverts the future-value-with-contributions annuity to solve for the number of years. Use real (inflation-adjusted) returns throughout so results are expressed in today's dollars.

Rent vs buy

We track the true economic cost of each path year by year. Buying's net cost subtracts home equity (appreciated value − selling costs − remaining loan). Renting's net cost subtracts investment gains on the cash a renter keeps liquid (the down payment and closing costs they didn't spend). Break-even is the first year buying's net cost falls below renting's.

Lease vs buy (car)

Total cost of ownership over your horizon. Leasing = down + payments + end fees. Buying = down + payments made + remaining balance − resale value. Both paths are credited the opportunity cost of their up-front cash at your chosen return.

Salary ↔ hourly

Effective hourly = annual pay ÷ hours actually worked, where worked weeks = working weeks − (PTO days ÷ 5). Because PTO is paid but not worked, it raises your real per-hour rate. All figures are gross (pre-tax).

Assumptions & limits