Regression and Correlation
Coefficient of Determination Calculator
R squared is computed from a correlation or from SSE and SST, and the page also reports the unexplained share left by one minus r squared.
Worksheet
Press Calculate to see the result.
R squared is computed from a correlation or from SSE and SST, and the page also reports the unexplained share left by one minus r squared.
What this calculator answers
The coefficient of determination is the share of the y variation that a straight-line fit lines up with, and it is also the square of Pearson r for a simple line. One minus that share is what the line does not explain. You can start from a published r, in which case the page squares it, or from an error sum of squares and a total sum of squares. The page does not build a prediction and it does not test a slope. It only splits the variation into the explained share and the unexplained share.
The page reports r squared and the unexplained fraction 1 minus r squared. In the correlation mode it squares r. In the sums mode it uses 1 minus SSE over SST. Supporting counts and intermediate terms sit under the headline so a reader can see what was divided by what. When a checkbox or a tail setting changes the divisor or the rejection region, that choice appears in the steps rather than vanishing into a silent default.
The formula, written out
Coefficient of determination uses this relationship.
From r: r^2 = r * r. From sums: r^2 = 1 - SSE / SST.
- r. A Pearson correlation, used only in that mode.
- SSE. The residual sum of squares.
- SST. The total sum of squares around the mean of y.
- 1 - r^2. The unexplained share of the total sum of squares.
For a simple linear fit, the squared correlation equals 1 minus SSE over SST. Squaring r drops the sign, so a correlation of minus 0.8 and a correlation of 0.8 share the same r squared. The algebra is the named textbook identity for this worksheet. Intermediate products and quotients appear in order so a calculator and a pencil can agree to the displayed rounding. If a neighbouring page uses a different divisor or a continuity correction, that page says so on its own ticket.
A full worked example
Example loaded in the worksheet
The form is prefilled with a small example so every arithmetic step can be checked by hand. Change one field after you finish the walkthrough and confirm the ticket moves the way the formula predicts.
The selected start is a correlation r. The correlation 0.8 squared is 0.64. SSE and SST were not used. R-squared is 0.64.
The unexplained share is 1 minus 0.64 = 0.36. As a percent, the unexplained part is 36 percent. As a percent, the explained part is 64 percent.
Squaring removes the sign, so this page does not recover whether r was negative. No new y is predicted from these inputs.
| R-squared | 0.64 |
|---|---|
| Unexplained share | 0.36 |
| Unexplained percent | 36% |
| Explained percent | 64% |
A second situation
Switch to SSE 20 and SST 100
The selected start is SSE and SST. SSE 20 divided by SST 100 is 0.2. R-squared is 0.8.
The unexplained share is 1 minus 0.8 = 0.2. As a percent, the unexplained part is 20 percent. As a percent, the explained part is 80 percent.
Squaring removes the sign, so this page does not recover whether r was negative. No new y is predicted from these inputs.
| R-squared | 0.8 |
|---|---|
| Unexplained share | 0.2 |
| Unexplained percent | 20% |
| Explained percent | 80% |
Switching from an r of 0.8 to the sums SSE 20 and SST 100 changes the definition that is evaluated. The sums give r squared of 0.80, while 0.8 squared is 0.64. The second example changes the feature that this formula is sensitive to, and the ticket shows the new figure beside the same definition. That contrast is the fastest way to see which input owns the movement.
What moves when the input moves
The correlation moved from 0.80 to 0.50. SSE and SST were left unused in this mode. The headline result went from 0.64 to 0.25.
The nudged inputs
The selected start is a correlation r. The correlation 0.5 squared is 0.25. SSE and SST were not used. R-squared is 0.25.
The unexplained share is 1 minus 0.25 = 0.75. As a percent, the unexplained part is 75 percent. As a percent, the explained part is 25 percent.
Squaring removes the sign, so this page does not recover whether r was negative. No new y is predicted from these inputs.
| R-squared | 0.25 |
|---|---|
| Unexplained share | 0.75 |
| Unexplained percent | 75% |
| Explained percent | 25% |
How to read the result
Read r squared as a share between 0 and 1 when the sums are well behaved. Multiply by 100 if you want a percent. The unexplained percent is the rest of that 100. Say the unit, the sample size or contract terms, and the formula name in the same sentence as the figure. A number without those three pieces invites a later reader to invent a definition that this page never used.
Write the result with its unit, the inputs that produced it, and the name of the formula. Write the result with its unit, the inputs that produced it, and the name of the formula. If the ticket shows a decision sentence, quote the alpha and the tail with it. If the ticket shows a money or dose figure, quote the rate and the schedule that produced it.
Assumptions that have to stay true
- In correlation mode, the typed r really is a correlation between minus 1 and 1.
- In sums mode, SST is positive and SSE is zero or positive.
- You want the simple coefficient of determination, not an adjusted R squared.
- You are not asking this page to predict a new y.
If an assumption above is false, do not average the discomfort away. Change the worksheet or change the question. A correct arithmetic step on the wrong model is still the wrong answer for the decision you are trying to make.
Mistakes that change the answer
- Taking the square root and keeping a positive sign when the original r was negative.
- Dividing SST by SSE instead of subtracting SSE over SST from 1.
- Calling 1 minus r squared the explained share.
- Using this page to forecast a new x. The line of best fit page does that.
Where a different calculator is the honest choice
Use the correlation coefficient calculator when you have pairs and want r itself. Use the line of best fit calculator to predict. Use the linear regression calculator when you also want a test and a confidence interval for the slope. Related links under the essay open pages that keep their own formulas instead of hiding a mode switch inside this ticket.
When the job changes, move to a page built for that job: Correlation Coefficient Calculator, Linear Regression Calculator, Line of Best Fit Calculator.
Check yourself
A correlation is 0.5. What are r squared and the unexplained share?
r squared is 0.25. The unexplained share is 1 minus 0.25, which is 0.75, or 75 percent.
Using the result in a sentence
A paper that prints r, or a regression table that prints SSE and SST, can be read here without rebuilding the fit. Keep the count, the unit, and the assumption list beside any copy of the number that leaves this browser tab.
A high r squared does not by itself justify a causal story or a prediction far outside the data. Adjusted R squared for extra predictors is a different formula. Pair the headline with the steps before you staff a route, set a grade boundary, or compare two contracts from a single number.
Questions people ask next
01What definition does the Coefficient of Determination Calculator commit to?
This page uses Coefficient of determination: From r: r^2 = r * r. From sums: r^2 = 1 - SSE / SST.. For a simple linear fit, the squared correlation equals 1 minus SSE over SST. Squaring r drops the sign, so a correlation of minus 0.8 and a correlation of 0.8 share the same r squared. If a textbook uses a different divisor, a different continuity correction, or a different rounding rule, the last digits can move, so the definition is printed above the result. The worksheet asks for Start from, Correlation r, Error sum of squares SSE, Total sum of squares SST, and it refuses a blank that the formula cannot interpret. Keep that printed definition in the sentence you write next to the figure so a later reader can rebuild the arithmetic without guessing which convention you chose.
02How should the worked example be read out loud?
In the loaded example the r-squared is 0.64. Read r squared as a share between 0 and 1 when the sums are well behaved. Multiply by 100 if you want a percent. The unexplained percent is the rest of that 100. Say the unit and the count before you say whether the number is large or small. Read the steps in order rather than jumping to the headline, because the intermediate terms are where a swapped percent and proportion usually hide. If the ticket shows both a primary figure and a comparison figure, name which one you are quoting.
03What is the fastest way to get a misleading result?
Taking the square root and keeping a positive sign when the original r was negative. A high r squared does not by itself justify a causal story or a prediction far outside the data. Adjusted R squared for extra predictors is a different formula. A second common failure is leaving a checkbox or tail setting in the wrong state and then treating the number as if the default had matched your plan. Reset the example, change one input, and confirm the ticket moves in the direction the formula predicts before you trust a live run.
04When should I leave this page for a different calculator?
Use the correlation coefficient calculator when you have pairs and want r itself. Use the line of best fit calculator to predict. Use the linear regression calculator when you also want a test and a confidence interval for the slope. The related links under the essay go to those worksheets, which keep their own formulas instead of hiding them in a mode switch. If the question changed from a summary to a test, from a payment to a refinance, or from a raw score to a percentile, switch pages rather than forcing this ticket to answer a job it was not built for.
05What belongs in the sentence next to the number?
r squared is 0.25. The unexplained share is 1 minus 0.25, which is 0.75, or 75 percent. Name the formula, the sample size or the inputs, and the unit before you compare the figure with someone else's. A bare number without those three pieces cannot be audited when a score, a rate, or a lab value is challenged later. Store the inputs beside the result whenever the figure will travel into a report.