Compare two investments
Apple
$ ···
Vanguard S&P 500
$ ···
How it works
Both investments get exactly the same money on the same dates. Each purchase buys at the first price on or after its date, and the shares are kept until today.
Prices are adjusted for stock splits and dividends, so dividends count as if they were reinvested. Taxes, fees and inflation are left out.
Whichever is worth more today comes out ahead.