What is the stock's beta?
Paste a stock's returns and the market's returns for the same periods, for example 36 months of each. The calculator fits the straight line through them and gives the slope, which is the stock's beta, with the correlation, R² and the intercept.
- Beta (β)
- 1.45
Over these 5 periods, the stock’s beta against the market is 1.45.
- Correlation (r)
- 0.984
- R²
- 0.969
- Intercept (return when the market is flat)
- −0.05%
- Covariance of the returns (sample)
- 3.625
- Variance of the market returns (sample)
- 2.5
- Periods
- 5
Beta (β): 1.45. Over these 5 periods, the stock’s beta against the market is 1.45.
The results are estimates for information only. They are not financial, tax, or legal advice. Check the numbers with your lender or a qualified professional before you decide. Terms of use
How to calculate
Computes the beta of a stock from its returns and the market’s returns over the same periods: the slope of the regression line, with the correlation, R² and the intercept.
Example with the default inputs (Stock returns (%) [1.5, 3, −2, 4, 0.5], Market returns (%) [1, 2, −1, 3, 0]): Over these 5 periods, the stock’s beta against the market is 1.45.
Method: β = Σ(xₜ − x̄)(yₜ − ȳ) ÷ Σ(xₜ − x̄)², where xₜ are the market’s returns and yₜ the stock’s; intercept = ȳ − β × x̄; r = Σ(xₜ − x̄)(yₜ − ȳ) ÷ √(Σ(xₜ − x̄)² × Σ(yₜ − ȳ)²).
- Both lists cover the same periods, in the same order, at the same frequency (for example monthly).
- Returns are typed as percents; no price or index level is looked up.
- Arithmetic is exact on the typed decimals; only the correlation uses a floating-point square root.
Worked examples
Each example is checked against the calculator on every build.
- Stock returns (%) 1.5, 3, -2, 4, 0.5, Market returns (%) 1, 2, -1, 3, 0 gives Beta (β) 1.45, Intercept (return when the market is flat) -0.05%, Correlation (r) 0.984324, R² 0.968894, Covariance of the returns (sample) 3.625, Variance of the market returns (sample) 2.5, Periods 5.Source: OpenStax, Introductory Statistics 2e, 12.3 The Regression Equation (b = Σ(x − x̄)(y − ȳ) ÷ Σ(x − x̄)², a = ȳ − b × x̄). https://openstax.org/books/introductory-statistics-2e/pages/12-3-the-regression-equation; OpenStax, Principles of Finance, 15.3 The Capital Asset Pricing Model (CAPM) (beta measures how much a stock moves with the market: the slope of the line through its monthly returns against the market’s; Delta Air Lines 1.39). https://openstax.org/books/principles-finance/pages/15-3-the-capital-asset-pricing-model-capm
- Stock returns (%) -2, 4, 1, 6, Market returns (%) -1, 2, 0.5, 3 gives Beta (β) 2, Intercept (return when the market is flat) 0%, Correlation (r) 1, R² 1.Source: OpenStax, Principles of Finance, 15.3 The Capital Asset Pricing Model (CAPM) (beta measures how much a stock moves with the market: the slope of the line through its monthly returns against the market’s; Delta Air Lines 1.39). https://openstax.org/books/principles-finance/pages/15-3-the-capital-asset-pricing-model-capm (a beta of 2: a 10% market rise means a 20% rise in the stock); OpenStax, Introductory Statistics 2e, 12.3 The Regression Equation (b = Σ(x − x̄)(y − ȳ) ÷ Σ(x − x̄)², a = ȳ − b × x̄). https://openstax.org/books/introductory-statistics-2e/pages/12-3-the-regression-equation
- Stock returns (%) 2, -1, 1, 0, Market returns (%) -2, 2, 0, 0 gives Beta (β) -0.75, Intercept (return when the market is flat) 0.5%, Correlation (r) -0.948683.Source: OpenStax, Introductory Statistics 2e, 12.3 The Regression Equation (b = Σ(x − x̄)(y − ȳ) ÷ Σ(x − x̄)², a = ȳ − b × x̄). https://openstax.org/books/introductory-statistics-2e/pages/12-3-the-regression-equation
How it works
With n periods, the market's returns x₁ … xₙ and the stock's returns y₁ … yₙ (in percent), and their means x̄ and ȳ:
- Beta β = Σ(xₜ − x̄)(yₜ − ȳ) ÷ Σ(xₜ − x̄)²
- Intercept = ȳ − β × x̄, in percent per period
- Correlation r = Σ(xₜ − x̄)(yₜ − ȳ) ÷ √(Σ(xₜ − x̄)² × Σ(yₜ − ȳ)²), and R² = r²
- Covariance = Σ(xₜ − x̄)(yₜ − ȳ) ÷ (n − 1) and market variance = Σ(xₜ − x̄)² ÷ (n − 1), both sample measures in percent squared. Their ratio is β, since the n − 1 cancels.
Rules:
- Enter 2 to 500 returns in each box, the same number in both, separated by spaces, commas or new lines. A comma inside a number such as 1,000 is refused; type 1000.
- If the market returns are all equal there is no slope, so no answer. If the stock returns are all equal, β is 0 and there is no correlation or R².
- The arithmetic is exact on the decimals you type; only the correlation uses a floating-point square root. It is r = ±√R², with the sign of Σ(xₜ − x̄)(yₜ − ȳ), from the exact R², never from R² first rounded to a float, so an R² that is the square of a fraction has an exact root. Beta shows to 3 decimals, the correlation and R² to 3, the intercept to 3 and the covariance and variance to 4, with halves rounded up (away from 0).
- A result too large for a 64-bit floating-point number gives no answer and a message. So does a result that is not 0 but too close to 0 for one (about 2.5 × 10⁻³²⁴ or less), R² included, so no output is ever a silent 0.
Assumptions
- Both lists are for the same periods, in the same order and at the same frequency.
- The returns are typed; nothing is looked up.
- A beta from past returns describes the past. It changes with the period, the frequency and the index you choose.
Worked examples by hand
Five periods. Market returns 1, 2, −1, 3, 0 (mean x̄ = 1) and stock returns 1.5, 3, −2, 4, 0.5 (mean ȳ = 1.4).
| t | x − x̄ | y − ȳ | (x − x̄)(y − ȳ) | (x − x̄)² |
|---|---|---|---|---|
| 1 | 0 | 0.1 | 0 | 0 |
| 2 | 1 | 1.6 | 1.6 | 1 |
| 3 | −2 | −3.4 | 6.8 | 4 |
| 4 | 2 | 2.6 | 5.2 | 4 |
| 5 | −1 | −0.9 | 0.9 | 1 |
| Sum | 14.5 | 10 |
β = 14.5 ÷ 10 = 1.45. Intercept = 1.4 − 1.45 × 1 = −0.050%. Σ(y − ȳ)² = 21.7, so r = 14.5 ÷ √(10 × 21.7) = 0.984 and R² = 210.25 ÷ 217 = 0.969. Covariance = 14.5 ÷ 4 = 3.625 and market variance = 10 ÷ 4 = 2.5.
Twice the market. Market −1, 2, 0.5, 3 and stock −2, 4, 1, 6: every stock return is twice the market's, so β = 2.00, the intercept is 0 and r = 1.
Against the market. Market −2, 2, 0, 0 (mean 0) and stock 2, −1, 1, 0 (mean 0.5): Σ(x − x̄)(y − ȳ) = −2 × 1.5 + 2 × (−1.5) + 0 + 0 = −6 and Σ(x − x̄)² = 8, so β = −6 ÷ 8 = −0.75 and the intercept is 0.5 − (−0.75) × 0 = 0.500%.
Other questions people ask
What is beta?
Beta measures how much a stock moves with the market. A beta of 1 means it tends to move as much as the market; 2 means twice as much, so a 10% market rise goes with about a 20% rise in the stock; 0.5 means half as much.
How do I calculate beta?
Put the market’s returns on the x axis and the stock’s on the y axis, and fit the least-squares line. Beta is its slope: β = Σ(x − x̄)(y − ȳ) ÷ Σ(x − x̄)², which is the covariance of the two return series divided by the variance of the market’s returns.
Which returns should I use?
Returns for the same periods and in the same order, such as several years of monthly returns against a broad index (OpenStax uses three years of monthly returns against the S&P 500). A monthly return is (this month’s price − last month’s price) ÷ last month’s price, with dividends added if you have them.
Why do websites show different betas for the same stock?
They use different periods, return frequencies and market indexes. OpenStax found 1.39 for Delta Air Lines from 2018 to 2020 monthly returns, while two finance sites showed 1.46 and 1.29 at about the same time.
What do the correlation and R² tell me?
How well the line fits. A correlation near 1 or −1 means the points lie close to the line; R², the correlation squared, is the share of the stock’s ups and downs that the market’s moves explain. A beta from a fit with a low R² is less reliable.
Can beta be negative?
Yes. A negative beta means the investment tended to move against the market: up when the market fell and down when it rose.
Is the intercept the same as alpha?
Not quite. The intercept here is the stock’s average return in a period when the market return is 0. Jensen’s alpha compares the stock’s return with what CAPM predicts from the risk-free rate, so it needs the risk-free rate as well.