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.
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.
| Example (fictional) | Weight | Beta | Adjusted beta | Beta, last 2 years | Correlation | R² | Alpha / year | Std error |
|---|---|---|---|---|---|---|---|---|
| Stock A | 30% | 1.30 | 1.20 | 1.47 | 0.68 | 47% | 5.2% | 0.09 |
| Stock B | 25% | 1.08 | 1.05 | 0.95 | 0.72 | 52% | −1.3% | 0.06 |
| Stock C | 20% | 0.78 | 0.85 | 0.69 | 0.67 | 45% | 2.2% | 0.05 |
| Stock D | 15% | 0.31 | 0.54 | 0.31 | 0.34 | 11% | −6.4% | 0.05 |
| Stock E | 10% | −0.13 | 0.24 | −0.12 | −0.11 | 1% | −15.6% | 0.07 |
| Portfolio | 100% | 0.85 | 0.90 | 0.85 | 0.85 | 73% | −0.9% | 0.03 |
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
| Tab | What you type | What it calculates |
|---|---|---|
| Start here | Nothing | Steps, formulas in plain words, data conventions, how to read beta, colour key, limits, sources, disclaimer |
| Summary | Nothing | Your key results next to the Example's, per-stock tables, a guide to reading beta and a table of provider conventions |
| Prices | Benchmark 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 weights | A 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 |
| Example | Already filled: 261 weekly closes (5 years) for Index X and Stocks A to E, with weights | The same tab with every result visible |
Preview of the Example's input (first rows):
| Date | Index X | Stock A | Stock B | Stock C | Stock D | Stock E |
|---|---|---|---|---|---|---|
| 2021-01-08 | 1,000.00 | 48.20 | 112.50 | 63.40 | 27.80 | 81.10 |
| 2021-01-15 | 1,012.13 | 50.45 | 111.92 | 63.17 | 28.40 | 84.83 |
| 2021-01-22 | 1,064.71 | 50.14 | 118.61 | 66.48 | 29.26 | 83.63 |
| 2021-01-29 | 1,040.54 | 46.53 | 113.78 | 68.08 | 28.64 | 85.80 |
| 2021-02-05 | 1,021.43 | 44.90 | 109.43 | 63.92 | 28.81 | 89.48 |
How to use it
- 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.
- 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.
- 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).
- 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.
- 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):
| Field | Formula |
|---|---|
| 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:
| Source | Returns and period | Where it is documented |
|---|---|---|
| Yahoo Finance | Monthly, 5 years: quote pages label the figure "Beta (5Y Monthly)" | Yahoo Finance quote page (label checked 9 Nov 2026) |
| Morningstar MPT statistics | Monthly excess returns over T-bills, "the trailing 36-month period"; alpha = intercept × 12 | Morningstar methodology (PDF) |
| Bloomberg | "two years of weekly returns"; adjusted beta 0.67 × raw + 0.33 | As described in the McGraw-Hill Education note |
| This template's Example | Weekly, 5 years, plus a 2-year (104-week) beta and a 52-week rolling beta | Settings 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.
- Stock A: beta 1.295 by all three formulas. Correlation 0.68, R² 46.9%. Adjusted beta = 0.67 × 1.295 + 0.33 = 1.198. Standard error 0.086, so a rough 95% range is 1.12 to 1.47. Alpha 0.100% per week, 5.2% a year.
- Stock B: beta 1.08, close to the index, with the highest R² of the five (52%).
- Stock E: beta −0.13. A negative beta means it tended to move against the index, but R² is 1.3%, so the link is weak.
- Portfolio: Σ weight × beta = 0.389 + 0.270 + 0.156 + 0.047 + −0.013 = 0.848.
Common mistakes
- Using prices instead of returns. Two rising price lines give a meaningless slope. Convert to returns first.
- Swapping x and y.
SLOPE(index, stock)is not beta. The stock goes first. - Mixing sample and population functions.
COVARIANCE.P/VAR.Sis off by a factor of (n − 1)/n. Use.Swith.S(or.Pwith.P). - Misaligned dates. A one-day shift between the stock and the index pushes beta toward 0. Use one row per shared date.
- Comparing betas built differently. A 2-year weekly beta, a 5-year monthly beta and an adjusted beta are different numbers. Note the setting with the result.
- Ignoring R² and the standard error. A beta from a loose fit or a short sample can be far from the true value.
- Using the wrong benchmark. Beta against a broad US index says little about a foreign stock or a bond fund. Use the index the holding is measured against.
Limits
- Beta is estimated from past returns. It describes the sample you paste, not the future, and it changes over time.
- Simple returns from the prices you paste; dividends count only if your prices are adjusted for them.
- Annualised alpha is arithmetic (× periods per year), as in Morningstar's 2007 methodology paper; volatility is annualised by √(periods per year).
- Up to 5 stocks and 1,300 rows per tab; every named column needs a price on every date row. Portfolio weights must be 0 or more and are rescaled to 100%.
- Recalculation was tested in LibreOffice against an independent numpy model on 18 Prices-tab input cases plus the Example. The file uses only functions that exist in Excel 2016+ and Google Sheets.
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
- Stock portfolio trackerHoldings, cost basis and gains
- Sharpe ratio calculatorReturn per unit of volatility
- Portfolio rebalancing spreadsheetGet back to your target weights
- Investment trackerAll accounts in one place
- CAGR calculatorAnnualised growth rate
- All templatesFree spreadsheets
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.