Methodology
Every number on If-Bought comes from daily closing prices and a few fixed rules. This page lists them, so you can check a result or reproduce it.
Prices
Prices are daily closes from Yahoo Finance, from January 3, 2000, or the first day a stock traded if that is later, up to the latest close in New York. Search covers stocks and ETFs listed on US exchanges. Intraday prices aren't used.
Buying
A one-time buy invests the whole amount at the close on the start date. If the market was closed that day, it uses the next trading day's close. Fractional shares are assumed, so the full amount is always invested.
Monthly buys invest the same amount on the first trading day on or after the start date, then on the first trading day of every following month. They stop after the Keep buying until date, or run up to the latest close if it is empty.
Dividends
On each ex-dividend date, the dividend per share is multiplied by the shares held going into that day. With Reinvest dividends on, that cash buys more shares at the same day's close. With it off, the cash is kept and counted in the value, but earns nothing.
Splits
Yahoo's closing prices are split-adjusted, so a split never changes a position's value. Dividend amounts need to be on the same basis. For NVDA they are: the 2012 dividend of $0.075 comes back as $0.001875, which is $0.075 divided by the 40-for-1 of later splits. That hasn't been confirmed for every ticker yet, so a stock with both splits and dividends can be slightly off until it is.
Selling
With a sell date, the whole position is sold at that day's close, or the next trading day's. From then on it is cash: no more buys and no more dividends. The cash stays in the total up to the latest close.
Several purchases
Each purchase is simulated on its own. The portfolio value and the total put in on any day are the sums across purchases.
Returns
The gain is the value minus the total put in, and the percentage is the gain divided by the total put in.
IRR is the yearly rate that makes every dated buy and the final value balance out, counting a year as 365 days. It accounts for when each dollar went in, so monthly buys and a single buy can be compared. For a single buy held to the end, it is the same as the compound annual growth rate (CAGR). Because a sold position's cash stays in the total, IRR counts the time the cash sat idle. IRR is shown once the first buy is at least a year old.
Comparing with the S&P 500
The comparison repeats every purchase in SPY, an ETF that tracks the S&P 500: the same amounts, dates, dividend setting and sell date. The difference between the two is what picking that stock added or cost compared with the index over the same period.
What isn't included
Taxes, trading fees, bid-ask spreads, interest on idle cash, and inflation. Real returns would usually be lower.
How the numbers compare
Checked on October 12, 2026 against other calculators. Their start and end dates differ by a few days, which explains most of the gaps.
| Scenario | If-Bought | Published elsewhere |
|---|---|---|
| $1,000 of NVDA from 2016-10-12, dividends reinvested | $138,989 | Stock Titan $140,301, ChartRow $139,278, Wealth Awesome $140,007 |
| $1,000 of SPY from 2016-10-12, dividends reinvested | $4,269 | ChartRow $4,218, Yield Theory $4,215 |
| $100 a month into SPY from January 2010, dividends kept as cash | $71,922 on $20,200 put in | whatifyouinvested.com $77,567 (month-end buys, price only: a different method) |
Not advice
Past returns don't predict future results. For education only, not financial advice. Questions about the calculator itself are answered on the about page.