Any current S&P 500 stock, or one of these index funds: SPY, VOO, IVV, QQQ, DIA, IWM, VTI.

3 years is preselected. A period longer than the history the stock and SPY share starts at their first shared close, and the answer says so.

More options: the amount in the growth chart

Leave it empty for $1,000. It changes the growth chart's dollars only; every percentage and ratio stays the same.

Examples: Apple, 3 years, Nvidia, 10 years, SPY, 5 years

About this calculation

What it calculates
One stock or fund against SPY, a fund that tracks the S&P 500, on the same dates: returns, calendar years, holding periods, months, days and weeks, volatility, falls, tail risk, risk-adjusted ratios, how it moved with SPY, and where it stood at the last close in the dates. Every figure is shown for the stock and for SPY, except the measures of how it moved with the market, which are for the stock against SPY (not shown for SPY itself).
Inputs
A current S&P 500 stock, or one of seven index funds: SPY, VOO, IVV, QQQ, DIA, IWM and VTI. A period of 1, 3, 5, 10 or 20 years, since both started, or From and To dates. An optional amount for the growth chart, $1,000 if left empty.
Dates
Only the days both the stock and SPY have a close are used. The last close is your To date's, or the latest shared close. A period starts on the shared trading day nearest the same date that many years before it; since both started uses the first shared close. A period longer than the shared history starts at the first shared close. A From or To date that isn't a trading day moves to the nearest one. At least 61 closes are needed.
Returns
Total return is the last close divided by the first, minus 1. The yearly rate is that ratio raised to the power 365 divided by the days between, minus 1; under a year it isn't shown. Each period in the returns table ends at the last close and starts on the shared trading day nearest the same date that long before. Year to date starts at the last close of the year before. The gap is the stock's return minus SPY's, in percentage points.
Calendar years
From the last close of one year to the last close of the next. A year the dates start or end partway through isn't full, so it is left out of the table and the counts.
Holding periods
Every span from one month-end close to the month end 1, 3 or 5 years later, so they overlap; the last ends at the last close. One year is a total return; 3 and 5 years are yearly rates. The median is the middle value, or the average of the two middle values.
Months
From one month-end close to the next. A month still running at the last close is left out of the counts, the averages and the medians, but shown in the grid. The median in each calendar month is the middle of that month's full-month returns across the years.
Days and weeks
A day's return runs from one close to the next. A week is a Monday-to-Friday calendar week; its return runs from one week's last close to the next week's. A week still running at the last close is left out, as a month is.
Volatility
The spread of daily returns around their average, using the sample formula, times the square root of 252. Volatility in each full year uses that year's daily returns. Downside deviation is the square root of the average squared daily fall, with rises and flat days counted as 0, times the square root of 252. The last 20 trading days use the same formula on every close up to the last one. Their median is that of every 20-day spell ending in the 5 years to the last close.
Skew and kurtosis
From the moments of the daily returns around their average, each divided by the number of returns. Skew is the third moment over the second to the power 1.5. Excess kurtosis is the fourth moment over the second squared, minus 3.
Falls
A fall runs from a closing high until it recovers, at the first close at or above that high, and is counted once at its lowest close. Highs count from the first close in the dates. The longest time to recover counts calendar days from the high to that close. The deepest falls' times are whole calendar months, counted once the day of the month is reached. The distance below the highest close uses every close in our data up to the last close.
Ulcer Index
The square root of the average squared percentage distance below the highest close so far, on every close in the dates, with highs counted from the first close in the dates.
Value at Risk
Historical and one day: the 5th and 1st percentile of the daily returns in the dates, read between neighbouring values, shown as a fall. Expected Shortfall is the average of the daily returns at or below the 5th percentile.
Risk-free rate
A fixed 5% a year, the same for every stock and every date. It is not a dated Treasury yield.
Risk-adjusted ratios
The yearly return in each ratio is the steady yearly rate over the dates. Sharpe: the yearly return minus 5%, divided by the volatility. Sortino: the same, divided by the downside deviation, which counts the days below 0, not below 5%. Calmar: the yearly return divided by the deepest fall. Martin: the yearly return minus 5%, divided by the Ulcer Index. Information ratio: the stock's yearly return minus SPY's, divided by the tracking error. None is shown under a year.
With the market
Beta is the covariance of the stock's and SPY's daily returns divided by the variance of SPY's, on the days both traded, with at least 60. Correlation is their covariance over the product of their spreads; R-squared is the correlation squared. Alpha is Jensen's alpha, in percentage points a year: the stock's yearly return minus 5%, less beta times the same for SPY. Under a year it isn't shown. Tracking error is the spread of the daily difference between the two, times the square root of 252. The monthly averages are plain averages of the stock's return in the months SPY rose, and in the months it fell. They start with the month after the first close's month and end with the month of the last close, which runs to that close. They need at least 6 months SPY rose and 6 it fell.
Moving averages
The simple average of the last 20, 50, 100 or 200 closes up to the last close, from every close in our data. The last crossing is the latest close on the other side of its average from the close before. Days above count, of the last 252 trading days, those that closed above that day's 200-day average.
52-week high and low
The highest and lowest close from the same date a year before the last close, to the last close. These are closes, not prices traded during a day.
RSI
The 14-day relative strength index with Wilder's smoothing, from every close in our data up to the last close. The first average gain and average loss are plain averages of the first 14 daily changes. Each later one is 13 times the one before, plus that day's gain (or loss), divided by 14. RSI is 100 minus 100 divided by 1 plus the average gain over the average loss. With no gain and no loss, such as a halted stock, there is no reading. A number about past closes, not a signal.
Data
Daily closing prices for today's supported stocks and funds, from each one's first close in our data to the latest close.
Adjustments
Split-adjusted, with dividends reinvested, as supplied by SmartFin's price data. A later split or dividend can rescale earlier dollar levels, while percentages over the same dates hold.
Rounding
Percentages to one decimal, except returns and gaps of 100% or more in the tables, At a glance and the answer's total returns, which are whole percents. Ratios, beta and correlation to two decimals; RSI and the Ulcer Index to one. Dollar levels to the cent; the growth chart's values to the dollar.
Exclusions
Taxes, fees, trading costs, currency conversion and prices during the day. Only today's S&P 500 companies and the supported funds are covered; companies that left the S&P 500 earlier are not.
Freshness
As of the last close: your To date's, or the latest close. An answer can be up to about two hours old, and it always names the close it uses.
Reproduce
Copy link, and the link under Questions about this result, reopen the same stock, the exact From and To dates and the amount.

Common questions

Which dates does the analysis use?

The days both the stock and SPY traded, from the first close in your dates to the last. The preselected 3 years end at the latest close. A weekend or holiday moves to the nearest trading day, and the answer names the dates used.

What is SPY, and why is it the comparison?

SPY is a fund that tracks the S&P 500, with prices in our data from 29 Jan 1993. Its daily closes, with dividends reinvested, stand in for the S&P 500 on the same dates as the stock, so no comparison starts before 29 Jan 1993.

What does the amount change?

Only the dollars in the growth chart. Every return, ratio and count is for one buy on the start date, so it stays the same at any amount.

How do I share or repeat a result?

Use Copy link, under the growth chart. It reopens the same stock, the exact From and To dates and the amount, so anyone gets the same dates and percentages.