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

## What Is the Coefficient of Determination?

The coefficient of determination is a statistical measurement that examines how differences in one variable can be explained by the difference in a second variable when predicting the outcome of a given event. In other words, this coefficient, more commonly known as r-squared (or r2), assesses how strong the linear relationship is between two variables and is heavily relied on by investors when conducting trend analysis.

This coefficient generally answers the following question: If a stock is listed on an index and experiences price movements, what percentage of its price movement is attributed to the index's price movement?

### Key Takeaways

• The coefficient of determination is a complex idea centered on statistical analysis of data and financial modeling.
• The coefficient of determination is used to explain the relationship between an independent and dependent variable.
• The coefficient of determination is commonly called r-squared (or r2) 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. Thus, it is a reliable model for future forecasts, while a value of 0.0 suggests that asset prices are not a function of dependency on the index.
1:58

## Understanding the Coefficient of Determination

The coefficient of determination is a measurement 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 (0% to 100%).

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

So, a value of 0.20 suggests that 20% of an asset's price movement can be explained by the index, while a value of 0.50 indicates that 50% of its price movement can be explained by it, and so on.

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 because r-squared is the result of "r" multiplied by itself (or squared), r2 cannot result in a negative number—regardless of what is found on the internet—the square of a negative number is always a positive value.

## Calculating the Coefficient of Determination

To calculate the coefficient of determination. This is done by creating a scatter plot of the data and a trend line.

For instance, if you were to plot the closing prices for the S&P 500 and Apple stock (Apple is listed on the S&P 500) for trading days from Dec. 21, 2022, to Jan. 20, 2023, you'd collect the prices as shown in the table below.

Then, you'd create a scatter plot. On a graph, how well the data fits the regression model is called the goodness of fit, which measures the distance between a trend line and all of the data points that are scattered throughout the diagram.

Most spreadsheets use the same formula to calculate the r2 of a dataset. So, if the data reside in columns A and B on your sheet:

= RSQ ( A1 : A10 , B1 : B10 )

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

### Manual Calculation

Calculating the coefficient of determination by hand involves several steps. First, you gather the data as in the previous table. Second, you need to calculate all the values you need, as shown in this table, where:

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

Next, use this formula and substitute the values for each row of the table, where n equals the number of samples taken, in this case, 20:

\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}

So 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}

Then, 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, especially, 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. In the Apple and S&P 500 example, the coefficient of determination for the period was 0.347.

Because 1.0 demonstrates a high correlation and 0.0 shows no correlation, 0.357 shows that Apple stock price movements are somewhat correlated to the index.

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

One aspect to consider is that r-squared doesn't tell analysts whether the coefficient of determination value is intrinsically good or bad. It is 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 how correlated one dependent and one independent variable are. Also called r2 (r-squared), the value should be between 0.0 and 1.0. The closer to 0.0, the less correlated the dependent value is. The closer to 1.0, the more correlated the value is.

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

It tells you whether there is 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 cannot be more than one because the formula always results in a number between 0.0 and 1.0. If it is greater or less than these numbers, something is not correct.

## The Bottom Line

The coefficient of determination is a ratio that shows how dependent one variable is on another variable. Investors use it to determine how correlated an asset's price movements are with its listed index.

When an asset's r2 is closer to zero, it does not demonstrate dependency on the index; if its r2 is closer to 1.0, it is more dependent on the price moves the index makes.

Article Sources
Investopedia requires writers to use primary sources to support their work. These include white papers, government data, original reporting, and interviews with industry experts. We also reference original research from other reputable publishers where appropriate. You can learn more about the standards we follow in producing accurate, unbiased content in our editorial policy.
1. Nasdaq. "APPL Historical Data."

2. Nasdaq. "SPX Historical Data."

Open a New Bank Account
×
The offers that appear in this table are from partnerships from which Investopedia receives compensation. This compensation may impact how and where listings appear. Investopedia does not include all offers available in the marketplace.