How Is Beta Calculated? Formula, Regression & CAPM

Beta is calculated by dividing the covariance between a stock’s returns and the market’s returns by the variance of the market’s returns. The result tells you how much a stock tends to move relative to the broader market. A beta of 1.0 means the stock moves roughly in line with the market, while a beta above 1.0 suggests it swings more dramatically, and a beta below 1.0 suggests it’s less volatile.

The Core Formula

At its heart, beta is a ratio of two statistics:

  • Covariance measures how two sets of returns move together. If a stock tends to rise when the market rises and fall when it falls, covariance is positive. If they move in opposite directions, it’s negative.
  • Variance measures how spread out the market’s returns are on their own, capturing the market’s overall volatility.

Put together: Beta = Covariance(stock returns, market returns) / Variance(market returns). What this formula really asks is: for every 1% the market moves, how much does this stock tend to move? If the answer is 1.3%, the beta is 1.3.

What the Inputs Look Like

To plug numbers into that formula, you need two sets of historical return data: one for the stock you’re analyzing and one for a market benchmark. The S&P 500 is the most common benchmark, and by definition it carries a beta of 1.0. Most calculations use monthly or weekly returns over a period of three to five years, though shorter windows and daily returns are sometimes used when a more recent picture of risk matters.

Each return is simply the percentage change in price from one period to the next. If a stock closed at $100 last month and $103 this month, that’s a 3% return. You build a column of these returns for the stock and a matching column for the index, then run the covariance and variance calculations across both columns.

The Regression Approach

Another way to arrive at the same number is through linear regression. You plot each period’s stock return on the vertical axis and the corresponding market return on the horizontal axis, then fit a straight line through the data points. The slope of that line is beta.

This method is mathematically identical to the covariance/variance formula. The slope of a regression line is, by definition, the covariance of the two variables divided by the variance of the independent variable (the market). But the regression approach gives you a bonus: you also get an R-squared value, which tells you how much of the stock’s movement is actually explained by the market. A high R-squared means beta is doing a good job describing the stock’s behavior. A low R-squared means other forces are driving most of the price action, and beta alone doesn’t tell the full story.

How Beta Fits Into the CAPM

Beta is a key input in the Capital Asset Pricing Model, which estimates the return an investor should expect from a stock given its risk level. The CAPM formula is:

Expected Return = Risk-Free Rate + Beta × (Expected Market Return − Risk-Free Rate)

The risk-free rate is typically the yield on short-term Treasury bills. The gap between the expected market return and the risk-free rate is called the equity risk premium, essentially the extra return investors demand for putting money into stocks instead of ultra-safe government bonds. Beta scales that premium up or down. A stock with a beta of 1.5 should, in theory, deliver 1.5 times the equity risk premium, compensating investors for taking on 50% more systematic risk than the market as a whole.

Calculating Beta in a Spreadsheet

You don’t need specialized software. A standard spreadsheet handles this in two ways.

The first approach uses the covariance and variance functions directly. Set up one column of periodic returns for the stock and another for the index. Then enter a formula like COVAR(stock returns range, market returns range) / VAR(market returns range). That single cell gives you beta.

The second approach uses the SLOPE function, which performs a linear regression behind the scenes. Enter SLOPE(stock returns range, market returns range), and the result is the slope of the best-fit line through your data, which is beta. Both methods produce the same answer. SLOPE is faster to type, while the covariance/variance method makes each step visible if you want to inspect the intermediate numbers.

When pulling historical price data, make sure the dates align perfectly between the stock and the index. Missing or mismatched dates will skew the result. Also confirm you’re using adjusted closing prices, which account for dividends and stock splits, rather than raw closing prices.

Levered vs. Unlevered Beta

The beta you see quoted on financial websites is “levered” beta, meaning it reflects the company’s current mix of debt and equity. Debt amplifies risk: when a company carries more debt, a larger share of its earnings goes toward interest payments, making future cash flows less predictable. That added uncertainty shows up as a higher beta, even though the underlying business risk hasn’t changed.

To strip out the effect of debt and isolate the pure business risk, analysts calculate “unlevered” beta (sometimes called asset beta) using this formula:

Unlevered Beta = Levered Beta / (1 + (1 − Tax Rate) × Debt / Equity)

This is especially useful when comparing companies in the same industry that carry very different amounts of debt, or when estimating what a company’s risk would look like under a different capital structure. If you’re evaluating an acquisition target, for example, you’d unlever the target’s beta, then relever it using the acquiring company’s debt-to-equity ratio to see how the combined entity’s risk profile might shift.

What Different Beta Values Mean

Interpreting beta is straightforward once you anchor it to the market’s beta of 1.0:

  • Beta above 1.0: The stock is more volatile than the market. A beta of 1.4 suggests that when the market rises 10%, the stock tends to rise about 14%, and it falls roughly 14% when the market drops 10%.
  • Beta of 1.0: The stock moves in step with the market.
  • Beta between 0 and 1.0: The stock is less volatile than the market. Utility companies and consumer staples often fall here.
  • Beta of 0: No correlation with the market. Cash or a fixed-rate instrument behaves this way.
  • Negative beta: The stock tends to move opposite the market. Gold stocks and certain inverse funds occasionally show negative betas.

Keep in mind that beta is backward-looking. It describes how a stock behaved relative to the market over a specific past window, and there’s no guarantee that relationship will hold going forward. A company that shifts its business model, takes on significant debt, or enters a new industry can see its beta change substantially.