# Coefficient of Determination: How to Calculate It and Interpret the Result

> **Definition**
>
> The coefficient of determination (r-squared) explains to investors the influence a specific index has on a certain stock listed on that index.

## What Is the Coefficient of Determination?

The coefficient of determination, also known as r-squared, quantifies the extent to which a stock’s price changes are influenced by movements in its associated stock index. Investors use this measure to understand what percentage of a stock’s price movement can be explained by broader movements of that index.

### Key Takeaways

*   The coefficient of determination is a complex idea centered on statistical analysis of data and financial modeling.
*   It's used to explain the relationship between an independent and dependent variable.
*   The coefficient of determination is commonly called r-squared (or r) for the statistical value it represents.
*   This measure is represented as a value between 0.0 and 1.0, where a value of 1.0 indicates a perfect correlation. This is a reliable model for future forecasts.
*   A value of 0.0 suggests that asset prices aren't a function of dependency on the index. 

![Coefficient of Determination](https://www.investopedia.com/thmb/Uyax2ubfz7RjSI_7RasUVn0hglU=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/coefficient-of-determination-Final-762167f70ba54951949f10ec0db3c33d.jpg)

*Financial analysts use the coefficient of determination to better understand stock price movement. — Investopedia / Julie Bang*

## Understanding the Coefficient of Determination

The coefficient of determination is a measurement that's used to explain how much the variability of one factor is caused by its relationship to another factor. This correlation is represented as a value between 0.0 and 1.0 or 0% and 100%.

A value of 1.0 indicates a 100% price correlation and is a reliable model for future forecasts. A value of 0.0 suggests that the model shows that prices aren't a function of dependency on the index.

A value of 0.20 suggests that 20% of an asset's price movement can be explained by the index. A value of 0.50 indicates that 50% of its price movement can be explained by it.

> **Important**
>
> The coefficient of determination is the square of the correlation coefficient, also known as "r" in statistics. The value "r" can result in a negative number, but r2 can't result in a negative number because r-squared is the result of "r" multiplied by itself or squared. The square of a negative number is always a positive value.

## Calculating the Coefficient of Determination

Calculating the coefficient of determination is achieved by creating a scatter plot of the data and a trend line.

For example, you could collect the prices as shown in this table to plot the closing prices for the S&P 500 and Apple ([AAPL](https://www.investopedia.com/markets/quote?tvwidgetsymbol=AAPL)) stock for trading days from Dec. 21, 2022, to Jan. 20, 2023 (Apple is listed on the S&P 500).

You'd then create a scatter plot. How well the data fits the regression model on a graph is referred to as the [goodness of fit](https://www.investopedia.com/terms/g/goodness-of-fit.asp). It measures the distance between a trend line and all the data points that are scattered throughout the diagram.

![APPL Daily Close vs. S&P Daily Close Coefficient of Determination](https://www.investopedia.com/thmb/n9EEe7SJdhG4dZvMmQr11r9h9fQ=/787x0/filters:no_upscale():max_bytes(150000):strip_icc()/SP500vsAPPLR2-afc91fea7dfd40b88994b32f61374d2e.jpg)

**

### Spreadsheets

Most spreadsheets use the same formula to [calculate the r](https://www.investopedia.com/terms/r/r-squared.asp) of a dataset. If the data reside in columns A and B on your sheet:

> \= RSQ ( A1 : A10 , B1 : B10 )  

You get an r2 of 0.347 using this formula and highlighting the corresponding cells for the S&P 500 and Apple prices, suggesting that the two prices are less correlated than if the r was between 0.5 and 1.0.  

### Manual Calculation

Calculating the coefficient of determination manually involves several steps. First, gather the data as in the previous table, then calculate all the values you need as shown in this table:

*   x= S&P 500 daily close
*   y = APPL daily close

Use this formula and substitute the values for each row of the table where _n_ equals the number of samples taken. That's 20 in this case:

$\begin{aligned}&r ^ 2 = \Big ( \frac {n ( \sum xy) - ( \sum x )( \sum y ) }{ \sqrt { [ n \sum x ^ 2 - ( \sum x ) ^ 2 ] } \times \sqrt { [ n \sum y ^ 2 - ( \sum y ) ^ 2 ] } } \Big ) ^ 2 \\\end{aligned}$  

Where √ represents the square root of the product in the brackets that follow it.

$\begin{aligned}&r ^ 2 = \Big ( \tiny { \frac {20 ( 10,262,772.73) - ( 77,781.69 )( 2,638.05 ) }{ \sqrt { [ 20 ( 302,584,424 ) - ( 77,781.69 ) ^ 2 ] } \times \sqrt { [ 20 ( 348,307.23 ) - ( 2,638.05 ) ^ 2 ] } } } \Big ) ^ 2 \\\end{aligned}$

You now have:

$\begin{aligned}&1. \tiny { ( 20 \times 10,262,772.73 ) - ( 77,781.69 \times 2,638.05 ) = 63,467.32 } \\&2. \tiny { (\sqrt { ( 20 \times 302,584,424 ) - ( 77,781.69 ) ^ 2 } = \sqrt { 1,697,180.74 } = 1,302.76 } \\&3. \tiny { (\sqrt { ( 20 \times 10,262,772.73 ) - ( 2,638.05 ) ^ 2 } = \sqrt { 6,836.85 } = 82.69 }\\\end{aligned}$

Now multiply steps two and three, divide step one by the result, and square it:

$\begin{aligned}&\Big ( \frac { 63,467.32 }{ 1,302.76 \times 82.69 } \Big ) ^ 2 = 0.347\end{aligned}$

You can see how this can become very tedious with lots of room for error, particularly if you're using more than a few weeks of trading data.  

## Interpreting the Coefficient of Determination

Once you have the coefficient of determination, you use it to evaluate how closely the price movements of the asset you're evaluating correspond to the price movements of an index or benchmark. The coefficient of determination for the period was 0.347 in the Apple and [S&P 500](https://www.investopedia.com/terms/s/sp500.asp) example.

> **Tip**
>
> Apple is listed on many indexes, so you can calculate the r2 to determine if it corresponds to any other index's price movements.

A coefficient of determination of 0.347 indicates that Apple stock price movements are somewhat correlated with the index, as 1.0 represents a high correlation and 0.0 indicates no correlation.  

One aspect to consider is that r-squared doesn't tell analysts whether the coefficient of determination value is intrinsically good or bad. It's at their discretion to evaluate the meaning of this correlation and how it may be applied in future trend analyses.

## How Do You Interpret a Coefficient of Determination?

The coefficient of determination shows the level of correlation between one dependent and one independent variable. It's also called r or r-squared. The value should be between 0.0 and 1.0. The closer it is to 0.0, the less [correlated](https://www.investopedia.com/terms/c/correlation.asp) the dependent value is. The closer to 1.0, the more correlated the value.

## What Does R-Squared Tell You in Regression?

R-squared in regression tells you whether there's a dependency between two values and how much dependency one value has on the other.

## What If the Coefficient of Determination Is Greater Than 1?

The coefficient of determination can't be more than one because the formula always results in a number between 0.0 and 1.0. Something is incorrect if it's greater or less than these numbers.

## The Bottom Line

The coefficient of determination is a ratio that shows how dependent one variable is on another. Investors use it to determine how [correlated an asset's price movements](https://www.investopedia.com/ask/answers/032315/how-do-i-calculate-correlation-between-market-indicators-and-specific-stocks.asp) are with its listed index.

It doesn't demonstrate dependency on the index when an asset's r is closer to zero. It's more dependent on the price moves the index makes if its r is closer to 1.0.

> **Article Sources**
>
> 1.  Pennsylvania State University Eberly College of Science. "[STAT 462 Applied Regression Analysis: 2.5 - The Coefficient of Determination, R-Squared](https://online.stat.psu.edu/stat462/node/95/)."
>     
> 2.  LibreTexts Statistics. "[10.6: The Coefficient of Determination](https://stats.libretexts.org/Bookshelves/Introductory_Statistics/Introductory_Statistics_%28Shafer_and_Zhang%29/10%3A_Correlation_and_Regression/10.06%3A_The_Coefficient_of_Determination)."
>     
> 3.  Nasdaq. "[APPL Historical Data](https://www.nasdaq.com/market-activity/stocks/aapl/historical)."
>     
> 4.  Nasdaq. "[SPX Historical Data](https://www.nasdaq.com/market-activity/index/spx/historical)."