Home › Templates › Stock beta spreadsheet

Stock Beta Spreadsheet

A free beta calculator for Excel and Google Sheets. Paste the prices of a benchmark index and up to 5 stocks or funds. It works out each stock's beta with SLOPE and with COVARIANCE.S/VAR.S (and shows they match), plus correlation, R², alpha, adjusted beta, a 2-year vs 5-year beta, a rolling beta chart, a scatter chart and your portfolio's beta.

Download Excel template (.xlsx) 513 KB · no macros · Excel 2016+ and Google Sheets · v1.0, 9 Nov 2026

Use it in Google Sheets: choose File → Import → Upload in Sheets and pick the .xlsx, or upload it to Google Drive and open it with Google Sheets. No sign-up, no email gate, no add-in and no paid data feed: you paste prices from any source.

Preview: the Example tab. Index X, the five stocks and every price are fictional (seeded random numbers) and say nothing about any real security.
1.30Stock A beta, 5 years weekly
1.20Stock A adjusted beta (0.67/0.33)
1.47Stock A beta, last 2 years
47%Stock A R²
0.85portfolio beta (5 stocks)
Example (fictional)WeightBetaAdjusted betaBeta, last 2 yearsCorrelationR²Alpha / yearStd error
Stock A30%1.301.201.470.6847%5.2%0.09
Stock B25%1.081.050.950.7252%−1.3%0.06
Stock C20%0.780.850.690.6745%2.2%0.05
Stock D15%0.310.540.310.3411%−6.4%0.05
Stock E10%−0.130.24−0.12−0.111%−15.6%0.07
Portfolio100%0.850.900.850.8573%−0.9%0.03
−10%−5%0%5%10%−20%−10%0%10%20%Stock A vs Index X, weekly returns (fictional)fitted line: slope (beta) 1.30, R² 47%Index X weekly return
0.51.01.52.0Jan 2023Jan 2024Jan 20255-year beta 1.30Rolling 52-week beta: Stock A vs Index X (fictional)

What beta measures

Beta compares a stock's returns with a benchmark's returns. FINRA puts it this way:

"Beta compares the movements of an individual security against those of a benchmark index, which is assigned a beta of 1." "For example, a stock with a beta value of 1.2 has historically moved 120 percent for every 100 percent move in a benchmark index, such as the S&P 500."FINRA, Volatility

The same page adds a point many beta guides skip: "Beta measures how a stock moves relative to the market movement, not the total volatility of a stock," and "a stock can have high volatility but a low beta if its movements don’t correlate with market moves." That is why this template shows correlation and R² next to every beta.

What's inside the spreadsheet

TabWhat you typeWhat it calculates
Start hereNothingSteps, formulas in plain words, data conventions, how to read beta, colour key, limits, sources, disclaimer
SummaryNothingYour key results next to the Example's, per-stock tables, a guide to reading beta and a table of provider conventions
PricesBenchmark name (B6) and up to 5 stock names (C6:G6); dates in column A and closing prices from row 7 (up to 1,300 rows); periods per year, recent window, rolling window, chart stock, risk-free rate, adjusted-beta weight; optional portfolio weightsA check per price column; returns; beta three ways and the gap between them; correlation; R²; alpha per period and per year; adjusted beta; standard error of beta; beta over the last N returns; volatility; portfolio beta two ways; rolling beta; a scatter chart with the fitted line and a rolling beta chart
ExampleAlready filled: 261 weekly closes (5 years) for Index X and Stocks A to E, with weightsThe same tab with every result visible

Preview of the Example's input (first rows):

DateIndex XStock AStock BStock CStock DStock E
2021-01-081,000.0048.20112.5063.4027.8081.10
2021-01-151,012.1350.45111.9263.1728.4084.83
2021-01-221,064.7150.14118.6166.4829.2683.63
2021-01-291,040.5446.53113.7868.0828.6485.80
2021-02-051,021.4344.90109.4363.9228.8189.48

How to use it

  1. Download closing prices for the benchmark and the stocks at one frequency (daily, weekly or monthly), ideally adjusted for splits and dividends. Five years of monthly data is 61 prices; two years of weekly data is 105.
  2. Open Prices. Type the benchmark name in B6 and up to 5 stock names in C6:G6. Paste the dates in column A from row 7, oldest first, and each series under its name. Keep one row per shared date.
  3. Set periods per year (J5: 12 monthly, 52 weekly, 252 daily), the recent window (J6, for example 104 weekly returns = 2 years), the rolling window (J7) and the stock for the charts (J8). Optional: an annual risk-free rate for alpha (J9) and the adjusted-beta weight (J10, default 0.67).
  4. Check that the Status in J13 says OK. If not, it names the problem: no benchmark name, no stock, too few rows, a gap or wrong order in the dates, a missing price, a column with prices but no name, a duplicate name or a price that never changes.
  5. Read the beta table (rows 35 to 51). Type weights in J37:N37 in any scale (30 or 30%) to see the portfolio beta in column O and in J23:J24.

How to calculate beta in Excel: three formulas, one answer

Beta is the slope of the line that best fits the stock's returns (y) against the benchmark's returns (x). Excel's SLOPE "returns the slope of the linear regression line through data points in known_y's and known_x's" (Microsoft Support); Google Sheets' version "calculates the slope of the line resulting from linear regression of a dataset" (Google Docs Editors Help). The same slope can be written two other ways:

β = SLOPE(stock returns, benchmark returns)

β = COVARIANCE.S(stock, benchmark) / VAR.S(benchmark)

β = CORREL(stock, benchmark) × STDEV.S(stock) / STDEV.S(benchmark)

COVARIANCE.S "returns the sample covariance" (Microsoft Support) and VAR.S "estimates variance based on a sample" (Microsoft Support). Both divide by n − 1, so the n − 1 cancels and the ratio equals SLOPE exactly. Mixing COVARIANCE.P with VAR.S does not cancel and gives a slightly wrong beta. The template computes all three for every stock and shows the largest gap between them; in the Example it is below 0.000000000001 for every stock, which is rounding noise.

A quick test against a published example: a McGraw-Hill Education note on estimating beta gives three months of stock returns (4.0, 5.3 and −2.4%) and market returns (6.1, 5.7 and −3.0%) and says =SLOPE "should get an estimated beta of .786" (Estimating Beta, PDF). Typed into the Prices tab as prices, the template returns 0.786. The same note warns that the order matters ("You will get different and wrong estimates if you reverse the two series") and that regressing price levels instead of returns "gives nonsense results."

Exact formulas from the Example tab (the IF wrappers keep cells blank until the inputs pass the checks):

FieldFormula
Weekly return of Stock A (AB8)=IF(AND(C$5="OK",ISNUMBER(C8),ISNUMBER(C7)),C8/C7-1,"")
Beta, method 1: SLOPE (J39)=IF(AND($J$13="OK",C$5="OK"),SLOPE($AB$8:$AB$1306,$AA$8:$AA$1306),"")
Beta, method 2: COVARIANCE.S / VAR.S (J40)=IF(AND($J$13="OK",C$5="OK"),COVARIANCE.S($AB$8:$AB$1306,$AA$8:$AA$1306)/VAR.S($AA$8:$AA$1306),"")
Beta, method 3: correlation × volatility ratio (J41)=IF(AND($J$13="OK",C$5="OK"),CORREL($AB$8:$AB$1306,$AA$8:$AA$1306)*STDEV.S($AB$8:$AB$1306)/STDEV.S($AA$8:$AA$1306),"")
R-squared (J44)=IF(AND($J$13="OK",C$5="OK"),RSQ($AB$8:$AB$1306,$AA$8:$AA$1306),"")
Alpha per period, after risk-free (J45)=IF(AND($J$13="OK",C$5="OK"),INTERCEPT($AB$8:$AB$1306,$AA$8:$AA$1306)-($J$9/$J$5)*(1-J39),"")
Alpha, annualised (J46)=IF(AND($J$13="OK",C$5="OK"),J45*$J$5,"")
Adjusted beta (J47)=IF(AND($J$13="OK",C$5="OK"),$J$10*J39+(1-$J$10)*1,"")
Standard error of beta (J48)=IF(AND($J$13="OK",C$5="OK"),STEYX($AB$8:$AB$1306,$AA$8:$AA$1306)/SQRT(DEVSQ($AA$8:$AA$1306)),"")
Beta over the last N returns (J49)=IF(AND(AND($J$13="OK",C$5="OK"),$J$32="OK"),SLOPE(INDEX($AB$8:$AB$1306,$J$15-$J$6+1):INDEX($AB$8:$AB$1306,$J$15),INDEX($AA$8:$AA$1306,$J$15-$J$6+1):INDEX($AA$8:$AA$1306,$J$15)),"")
Portfolio return per week (AG8)=IF(AND($J$22="OK",ISNUMBER(AA8)),SUMPRODUCT($J$38:$N$38,AB8:AF8),"")
Rolling beta, row 59 (AI59)=IF(AND($J$27="OK",(ROW()-7)>=$J$7,(ROW()-7)<=$J$15),SLOPE(INDEX($AH$8:$AH$1306,(ROW()-7)-$J$7+1):AH59,INDEX($AA$8:$AA$1306,(ROW()-7)-$J$7+1):AA59),"")

Alpha and R²: how well the line fits

RSQ returns the square of the correlation, and Microsoft notes that "the r-squared value can be interpreted as the proportion of the variance in y attributable to the variance in x" (Microsoft Support). In the Example, Stock A's beta of 1.30 comes with an R² of 47%; Stock D's beta of 0.31 comes with an R² of only 11%, so the index explains little of its moves.

Alpha is where the fitted line crosses zero: the average return not explained by the benchmark. INTERCEPT "calculates the point at which a line will intersect the y-axis" (Microsoft Support). Morningstar's methodology for its MPT statistics regresses a fund's monthly excess returns over Treasury bills on the benchmark's, and states that "the slope of the resulting regression line is the estimate of beta and the intercept (multiplied by 12 to express it as an annual figure) is the estimate of alpha" (Morningstar, Modern Portfolio Theory (MPT) Statistics, 2007).

The template follows the same idea without a risk-free column: subtracting a constant rate rf from both series does not change the slope, and the excess-return intercept equals INTERCEPT − rf × (1 − β). Leave J9 at 0% for the plain intercept. Annual alpha = alpha per period × periods per year. check.py confirms this matches a regression run directly on excess returns. The Example uses a fictional 4% rate.

Adjusted beta (Blume)

A raw beta is an estimate. The McGraw-Hill note explains: "If your estimated beta is very high, then there is a good chance that you have an overestimate and that the true beta is lower," so "your best estimate of beta is therefore closer to 1.0 than the raw beta that comes out of the regression." It adds that "Bloomberg provides an adjusted beta that is (.67 x raw beta) + (.33 x 1.0)."

adjusted β = 0.67 × raw β + 0.33 × 1

KPMG's valuation team calls this weighting the Blume adjustment and writes it as "Adjusted beta = (Raw beta * 2/3) + (1 * 1/3)" (KPMG, Raw versus adjusted beta). The name refers to Marshall E. Blume's research on how estimated betas move toward 1 over time: "On the Assessment of Risk", The Journal of Finance 26(1), 1971, pp. 1–10 (doi 10.1111/j.1540-6261.1971.tb00584.x) and "Betas and Their Regression Tendencies", The Journal of Finance 30(3), 1975, pp. 785–795 (doi 10.1111/j.1540-6261.1975.tb01850.x).

A 2009 IESE working paper by Pablo Fernández and Vicente Bermejo tested Dow Jones stocks with betas from monthly (5 and 2 years), weekly and daily data and found that "Adjusted betas (0.67 calculated beta + 0.33) have higher correlation than calculated betas, but Adjusted betas have lower correlation than beta = 1" (IESE WP-825, PDF). In plain terms: on their sample, shrinking toward 1 helped. The weight is a setting (J10), so you can use 0.67, another weight, or 1 for no adjustment.

Daily, weekly or monthly? 2 years or 5?

Data providers do not agree, so the same stock can show several betas:

SourceReturns and periodWhere it is documented
Yahoo FinanceMonthly, 5 years: quote pages label the figure "Beta (5Y Monthly)"Yahoo Finance quote page (label checked 9 Nov 2026)
Morningstar MPT statisticsMonthly excess returns over T-bills, "the trailing 36-month period"; alpha = intercept × 12Morningstar methodology (PDF)
Bloomberg"two years of weekly returns"; adjusted beta 0.67 × raw + 0.33As described in the McGraw-Hill Education note
This template's ExampleWeekly, 5 years, plus a 2-year (104-week) beta and a 52-week rolling betaSettings J5:J7

The trade-off, in the McGraw-Hill note's words: "Where the sample includes illiquid stocks, it may make sense to use up to 5 years of monthly data. Where the sample consists of large-company stocks, there may be an advantage to using a couple years of daily or weekly data." More frequent data gives more observations, but for thinly traded stocks "the effect of such thin-trading is to underestimate the true beta." A longer period gives more data but "you run the risk that the true relationship between stock and market may have changed." The same note says Yahoo used three years of monthly returns; Yahoo's pages now say 5Y Monthly. Conventions change, so read the label.

The template handles this two ways: the recent window (J6) shows the beta over the last N returns next to the full-sample beta, and the rolling beta shows how it moved. In the Example, Stock A's 5-year weekly beta is 1.30 but its last-2-year beta is 1.47. The fictional data were generated with Stock A's sensitivity to the index raised halfway through (from 2023-07-07), to show what a change in beta looks like.

Rolling beta

The rolling beta recalculates SLOPE over the last W returns on every row (W = 52 weeks in the Example) for the stock picked in J8, and the chart plots it. The range is built as INDEX(column, k − W + 1):cell, which works in Excel, Google Sheets and LibreOffice without OFFSET. In the Example, Stock A's 52-week beta runs from 0.82 to 1.74; the latest window gives 1.19. A one-year beta is noisy: Stock A's standard error over the full five years is 0.09, and a 52-week window has a fifth of the data.

Portfolio beta

A portfolio's beta is the weighted average of its holdings' betas:

βportfolio = Σ wi × βi = SUMPRODUCT(weights, betas)

Because covariance is linear, this equals the beta of the portfolio's own return series when the weights are held constant (rebalanced every period). The template does both: the weighted sum in J23 and a SLOPE on the weighted portfolio returns (column AG) in J24. In the Example, with weights 30/25/20/15/10%, both give 0.8483. Column O also shows the portfolio's correlation (0.85), R² (73%) and adjusted beta (0.90). Mixing stocks raises R² because their own news partly cancels out.

Worked example from the sample data

The Example tab holds 261 weekly prices (260 returns) from 2021-01-08 to 2026-01-02 for fictional Index X (annualised volatility 16.3%) and Stocks A to E, with 52 periods per year and a 4% risk-free rate.

Common mistakes

Limits

FAQ

How do you calculate beta in Excel?

Turn prices into returns first (=C8/C7-1 for the stock and =B8/B7-1 for the index, filled down). Then =SLOPE(stock returns, index returns) gives beta. The same number comes from =COVARIANCE.S(stock, index)/VAR.S(index). Put the stock first: SLOPE takes the y values (stock) before the x values (index). This template does all of it for up to 5 stocks and shows the methods agree.

Should I use daily, weekly or monthly returns for beta?

There is no single rule. Yahoo Finance labels its figure Beta (5Y Monthly), Morningstar's MPT statistics use 36 months of monthly returns, and a McGraw-Hill Education note says Bloomberg uses two years of weekly returns. The same note says weekly data is fine for large, frequently traded stocks, while thinly traded stocks can show a beta that is too low on short intervals. Pick one convention and compare like with like.

Why does my beta differ from Yahoo Finance?

Beta depends on the benchmark, the return interval, the period, the end date and whether prices include dividends. Yahoo's label says its figure uses 5 years of monthly returns. To get close, use monthly prices for the same 5 years, set periods per year to 12 and use the same index. Some providers also show an adjusted beta.

What is adjusted beta?

Adjusted beta = 0.67 × raw beta + 0.33 × 1. It pulls the estimate toward 1, the beta of the market, because unusually high or low raw betas tend to be partly estimation error. The 2/3 and 1/3 weights are known as the Blume adjustment, after Marshall Blume's research in the 1970s. The weight is a setting in the template.

What does R-squared mean next to beta?

R-squared is the share of the stock's return variance that the benchmark's moves explain, from 0% to 100%. A beta of 1.2 with an R-squared of 10% says little about how the stock will move with the market; the same beta with an R-squared of 70% is a much tighter link.

Does this beta spreadsheet work in Google Sheets?

Yes. In Google Sheets choose File → Import → Upload and pick the .xlsx, or upload it to Google Drive and open it with Google Sheets. It uses only SLOPE, INTERCEPT, RSQ, CORREL, COVARIANCE.S, VAR.S, STDEV.S, STEYX, DEVSQ, SQRT, SUMPRODUCT, SUM, MIN, MAX, INDEX, MATCH, COUNT, COUNTIF, COUNTIFS, IF, AND, OR, NOT, ISNUMBER, IFERROR, N, ROW, TEXT, ABS. No macros, LINEST array formulas, OFFSET or dynamic arrays.

Related tools and templates

Educational template only, not investment advice. Example data is fictional: the index, stocks, dates and prices are generated to show the formulas and say nothing about any real security or future result. Past betas can change. Sources: FINRA, Volatility; Microsoft Support, SLOPE, COVARIANCE.S, VAR.S, RSQ and INTERCEPT; Google Docs Editors Help, SLOPE; Morningstar, Modern Portfolio Theory (MPT) Statistics, 30 Nov 2007; McGraw-Hill Education, Estimating Beta; KPMG, Raw versus adjusted beta; P. Fernández and V. J. Bermejo, "β = 1 does a better job than calculated betas", IESE WP-825, 2009; M. E. Blume, The Journal of Finance 26(1), 1971 and 30(3), 1975; Yahoo Finance quote page (beta label). Retrieved 9 November 2026.