Back to blog
methodology

How to calculate rolling returns

25 November 2026 4 min read

Quick answer

A rolling return is the annualized return over a fixed window, recalculated as the window slides forward one period at a time: (index[t] / index[t-n]) ^ (1/years) - 1, computed on a total return index. Compound, never average, and report the whole set of windows. For the S&P 500 with dividends since 1950, 20.9% of one-year windows and 2.9% of ten-year windows lost money.

A rolling return is the annualized return over a fixed window, recalculated as the window slides forward one period at a time. The formula is (index[t] / index[t-n]) ^ (1/years) - 1, run on a total return index. Compound, never average, and report the whole set of windows instead of one. For the S&P 500 with dividends since 1950, 20.9% of one-year windows lost money and 2.9% of ten-year windows did.

Rolling returns vs trailing returns

A trailing return is a single window: the one that ends today. The 1, 3, 5 and 10-year figures on a factsheet are trailing returns, and they share an end date, so one strong or weak recent year moves all four at once.

A rolling return series is every such window in the history. As of September 2026 the S&P 500's trailing total returns were 17.80%, 21.80%, 13.08% and 15.36% a year over 1, 3, 5 and 10 years. Each of those is just the last point of a rolling series. The rest of the series tells you whether that last point is typical.

The rolling return formula

Start from a total return index, the same series you would draw as a growth of $10,000 chart. For a window of n periods covering a number of years:

rolling[t] = (index[t] / index[t - n]) ^ (1 / years) - 1

With monthly data, n is 12 times the years. For a one-year window the exponent is 1 and the result is the plain percentage change. For windows shorter than a year, leave the figure unannualized: annualizing a three-month return compounds noise into a number nobody earned.

The averaging mistake

Some guides say to add up the yearly returns inside the window and divide by the number of years. That is an arithmetic mean, and it overstates what an investor kept whenever returns vary.

Take the three years to March 2009 on the series below. The three one-year returns were +10.73%, -4.64% and -40.91%. Their average is -11.61% a year. The compounded figure, the one the formula gives, is -14.55% a year. Three points a year of difference, on real data, and the gap widens as returns get more volatile. Dividing index levels makes the error impossible.

Worked example: the S&P 500 since 1950

The data is Robert Shiller's monthly file, one of the free S&P 500 sources with dividends included. Dividends in the file run to September 2026, so that is where the example stops. This script builds the total return index and prints, for each window length, the number of windows, the share that were negative, and the worst, median and best annualized return:

import pandas as pd

# ie_data.xls from shillerdata.com; the headers sit on row 8 of the "Data" sheet
raw = pd.read_excel("ie_data.xls", sheet_name="Data", skiprows=7)
df = raw[["Date", "P", "D"]].apply(pd.to_numeric, errors="coerce").dropna()
# Dates are stored as 2026.09 for September and 2026.1 for October
df["Date"] = pd.to_datetime(
    df["Date"].map(lambda d: f"{int(d)}-{round((d - int(d)) * 100):02d}-01")
)
df = df.set_index("Date")

# monthly total return factor, compounded into a total return index
factor = (df["P"] + df["D"] / 12) / df["P"].shift(1)
index = factor.fillna(1).cumprod().loc["1950-01-01":]

def rolling_return(index, years):
    n = 12 * years
    return ((index / index.shift(n)) ** (1 / years) - 1).dropna()

for years in (1, 3, 5, 10, 20):
    r = rolling_return(index, years)
    print(years, len(r), f"{(r < 0).mean():.1%}",
          f"{r.min():.2%}", f"{r.median():.2%}", f"{r.max():.2%}")

The output, with the window end dates added:

window  windows  negative  worst (window end)    median   best (window end)
1y      909      20.9%     -40.91%  (Mar 2009)   13.88%   60.18%  (Jul 1983)
3y      885      10.4%     -15.06%  (Mar 2003)   11.80%   32.48%  (Apr 1998)
5y      861       7.5%      -5.76%  (Mar 2009)   12.05%   29.71%  (Aug 1987)
10y     801       2.9%      -3.50%  (Mar 2009)   11.18%   19.30%  (Sep 2000)
20y     681       0.0%       5.07%  (Mar 2020)    9.86%   17.95%  (Apr 2000)

All 23 losing ten-year windows end between November 2008 and September 2010. The worst, March 1999 to March 2009, turned $10,000 into $7,000. The best, ending September 2000, turned it into $58,396. No 20-year window lost money, and the weakest still returned 5.07% a year.

One caveat on the source: Shiller's prices are monthly averages of daily closes, not month-end closes. Averaging smooths the series, so month-end data will give somewhat different extremes.

Three ways a rolling return chart misleads

Overlap. There are 801 ten-year windows since 1950, but only seven that do not overlap. Neighboring windows share 119 of their 120 months, so the line looks like far more evidence than it is. Do not run a significance test that treats each point as independent.

Price or total return. On price alone, 7.4% of ten-year windows since 1950 were negative. With dividends it is 2.9%. State the basis, and put the fund and its benchmark on the same one.

The exit effect. A rolling figure changes when a new month enters the window and when an old month leaves it. A jump in today's five-year number can be a bad month from five years ago dropping out, with nothing happening now. Check both ends before you write the commentary.

How to chart rolling returns

Draw the annualized rolling return as a line against the window end date, with a zero line, and say in the subtitle that each point is a window ending on that date. Overlay the benchmark on the same window and basis. If the question is how often and how badly a horizon has lost money, a distribution answers it better than a line: a box plot per window length works well. Pair either with an underwater curve, since rolling returns hide the path inside each window.

Where Quadesto fits

The calculation is a few lines, and then someone has to rerun it and redraw the chart every month-end. Quadesto takes a price or return file, from a CSV or Excel upload or a connected source, builds the rolling view you describe in plain words, and gives you a chart you can embed on your own site. Start free.

Ready to try Quadesto?

Connect your data. AI builds the charts. Embed anywhere.

Get Started Free
rolling returnsperformancetotal returnfactsheetpython