Methodology
The exact math behind every calculator on this site, the assumptions we make, and the things we deliberately leave out.
Last updated May 27, 2026
We believe the math behind a financial calculator should be as easy to read as the calculator itself. This page documents every formula we use, the conventions we follow (APR vs APY, annuity-due vs ordinary annuity), and the limitations of each model. If you find an error, tell us.
1. Dividend reinvestment (DRIP) calculator
The DRIP calculator runs a month-by-month forward simulation. For each month from 1 to years × 12, it applies actions in this order:
- Add the monthly contribution to the portfolio.
- Compute the gross dividend for the month:
portfolio × yield ÷ 12. - Apply the dividend tax rate to get the net dividend.
- If DRIP is on, add the net dividend back to the portfolio (this is what compounds over time).
- Apply one month of stock-price growth:
portfolio × (1 + monthly_price_growth), wheremonthly_price_growth = (1 + annual_price_growth)^(1/12) − 1. - Ratchet the yield forward for next month:
yield = yield × (1 + monthly_div_growth).
The starting yield, dividend growth rate, and price growth rate are treated as independent annual rates. This matches how dividend investors usually reason about a stock: “4 % yielder with 5 % annual dividend growth and 6 % expected price appreciation.”
Conventions used in the DRIP model
- Yield-to-monthly: APR-style (annual rate ÷ 12). This matches how stocks actually pay dividends — typically as a per-share amount each quarter, prorated.
- Price growth to monthly: APY-style (
(1 + r)^(1/12) − 1). The user enters an effective annual growth rate, so we compound monthly to match it exactly. - Dividend growth to monthly: APY-style, same reasoning.
- Contribution timing: annuity-due — the contribution is added at the start of each month and earns that month’s dividend and price growth.
2. Compound interest calculator
Compound interest follows the standard bank convention: an annual rate quoted as APR with monthly compounding. The monthly rate is simply annual_rate ÷ 12.
For each month the simulator (a) adds the monthly contribution, (b) applies interest on the new balance, and (c) records the timeline. Because the contribution is added before interest is computed, the first month’s deposit earns one full month of interest — the annuity-due variant.
For a one-time deposit with no monthly contribution, this reduces to the familiar future-value formula:
FV = P × (1 + r/12)^(12 × t)For a recurring contribution with zero initial deposit, the annuity-due future value is:
FV = PMT × (1 + r/12) × ((1 + r/12)^n − 1) ÷ (r/12)3. Stock profit calculator
Stock profit is closed-form. Given shares, buy_price, sell_price, and optional commissions:
- Total cost = shares × buy_price + buy_commission
- Total proceeds = shares × sell_price − sell_commission
- Net P&L = total_proceeds − total_cost
- Return %= net_P&L ÷ total_cost
- Annualized return(if holding days > 0): use the standard period-return formula
(proceeds ÷ cost)^(365 ÷ days) − 1.
4. Capital gains tax calculator
The capital gains calculator uses a 366-day boundary to distinguish short-term from long-term holdings, aligned with US tax convention (held more than one year qualifies for long-term treatment). The user supplies their own short-term and long-term tax rates — we do not try to look up your bracket for you, because bracket math depends on filing status, total income, and state, and a generic calculator would be more wrong than helpful.
Losses produce a negative gain but zero tax owed in our model. In reality, capital losses can offset gains and (in the US) up to $3,000 of ordinary income per year — that offset is not modeled here.
5. Dollar-cost averaging (DCA) calculator
DCA is mathematically the same engine as compound interest: a fixed amount invested at fixed intervals at an assumed return rate. The only conceptual difference is framing — DCA is typically described as “investing the same dollar amount each month regardless of price,” which under a constant assumed return reduces to the same annuity-due formula above.
A more honest DCA simulator would model price volatility (so the same dollar buys more shares in down months). We have that on the roadmap; the current calculator treats returns as constant.
Common limitations
- Inflation is not modeled. All outputs are nominal (future dollars). To get an inflation-adjusted view, subtract an inflation rate from your assumed growth rate before entering it.
- Sequence-of-returns risk is not modeled. We use constant growth and dividend rates. In reality, a few bad early years can permanently change retirement outcomes — a Monte Carlo model would capture this, and that’s on our roadmap.
- Tax law is simplified. The capital gains tool ignores wash sales, state tax, AMT, qualified vs ordinary dividend rates, and net investment income tax. The DRIP tool treats dividend tax as a flat percentage.
- Fees and expense ratios are ignored. If you’re modeling an ETF, subtract its expense ratio from the price-growth rate to approximate the effect.
- Currency is single-currency. All inputs and outputs are in the same currency. A multi-currency mode (e.g., for non-US investors holding US ETFs) is planned.
How we report annualized return
For tools with recurring contributions (DRIP, compound interest, dollar-cost averaging), the “Annualized return” figure is a money-weighted return (internal rate of return). It discounts every contribution by how long it was actually invested, rather than the naïve (final value ÷ total contributed)^(1/years) − 1, which would wrongly treat a deposit made in the final year as if it had compounded for the whole horizon. For a single lump sum with no further contributions, the money-weighted return reduces exactly to the familiar compound annual growth rate.
Verification
Every formula on this page is covered by automated tests that compare each simulation’s output to an independent closed-form result. More than 60 tests run on every deploy, covering all seven calculators plus the shared money-weighted-return and currency-formatting helpers, including edge cases like zero growth, dividends without reinvestment, and losses.
Editorial standards & maintenance
Any Dividend Calculator is built and maintained by an independent team of software engineers — not licensed financial advisors. Our commitment is narrow and honest: the math is correct against its stated model, the assumptions are documented on this page, and the limitations are spelled out rather than hidden.
Every formula change ships with an automated test that pins the output to an independent closed-form result, so a regression can’t reach production silently. Tax figures (such as the capital-gains brackets) are dated and cross-checked against primary sources like the IRS and Tax Foundation, and we note that inflation-adjusted numbers should be re-verified each tax year. This methodology page carries a “last updated” date; when the math or the documented assumptions change, that date and this section change with them.
Found an error or disagree with an assumption? Tell us — corrections are a priority, and we’ll credit you if you’d like.
Educational use only
These calculators produce estimates, not advice. Real-world returns vary, dividends can be cut or eliminated, and tax law changes. Always consult a licensed advisor before making investment decisions.