Add R-Squared Value to Chart in Excel

The importance of adding the R-Squared Value to a chart in Excel cannot be overstated. R-Squared, also known as the coefficient of determination, is a measure of how well a linear regression model fits the data. It is an important indicator of the accuracy of the model and provides an indication of how well the model is able to explain the variation in the data. By adding the R-Squared Value to a chart in Excel, users can quickly and easily evaluate the fit of their model and determine if the model is sufficiently accurate for their needs. This valuable data can then be used to make informed decisions about the model and the data being used.


In regression analysis, the R-squared value (R2) is the proportion of the variance in the that can be explained by the predictor variable.

Often you may want to display this R-squared value on a chart in Excel, similar to the chart below:

Excel add r-squared value to chart

The following step-by-step example shows how to do so.

Related:

Step 1: Enter the Data

First, let’s enter the following values for a predictor variable (x) and a response variable (y) in Excel:

Step 2: Create a Scatter Plot

Next, highlight the cell range A2:B15.

Then click the Insert tab along the top ribbon, then click the Insert Scatter icon in the Charts group and choose the first option to insert a scatter plot:

The following scatter plot will appear:

Step 3: Add R-Squared Value to Scatter Plot

Next, click anywhere on the scatterplot. Then click the plus (+) sign in the top right corner of the plot, then click the dropdown arrow next to Trendline, then click More Options:

The regression equation and the R-squared value will both now be shown in the scatter plot:

We can see that the R-squared value for this particular regression equation is 0.9302, which tells us that 93.02% of the variation in the response variable can be explained by the predictor variable.

Step 4: Customize the Chart (Optional)

Lastly, if you’d like to make the linear regression equation and the R-squared value easier to read, then you can make the font bold and remove the gridlines from the plot.

The final plot will look like this:

Excel add r-squared value to chart

In conclusion, it is possible to add the R-squared value to a chart in Excel. This can be done by entering data, creating a scatter plot, adding a trend line, and, optionally, customizing the chart. With this R-squared value, it is possible to determine the proportion of variance in the response variable that can be explained by the predictor variable. This can be a useful tool when analyzing the relationship between two variables.

x