Coefficient of Determination Calculator

R² (Coefficient of Determination)

Measure how well a linear regression model fits your data.

Last updated: March 2026

Enter Your Data

n (Sample Size)
5
Mean X
3.0000
Mean Y
4.0000
r (Correlation)
0.7746
R² Statistic
0.6000
Adjusted R²
0.4667
Slope (b₁)
0.6000
Intercept (b₀)
2.2000
Residual Sum Sq
2.4000

R² Interpretation Guide

R² RangeRelationship StrengthInterpretationExample Use Case
0.00–0.30WeakModel explains <30% of varianceWeak predictor, seek other variables
0.30–0.70ModerateModel explains 30–70% of varianceDecent fit; useful with other factors
0.70–0.90StrongModel explains 70–90% of varianceGood predictive model for most use
0.90–1.00Very StrongModel explains >90% of varianceNearly perfect fit; check for overfitting

What is R² (Coefficient of Determination)?

The coefficient of determination, denoted R², is a statistical measure that represents the proportion of the variance in the dependent variable (Y) that is predictable from the independent variable (X) using a linear regression model. It answers the question: "How well does the model explain the data?"

R² ranges from 0 to 1, where: R² = 1 indicates a perfect fit (all variance explained), R² = 0 indicates no linear relationship, and R² = 0.75 indicates 75% of the variance is explained by the model. R² is the square of the Pearson correlation coefficient (r).

Adjusted R² accounts for the number of predictors in the model, penalizing the addition of unnecessary variables. It's particularly useful when comparing models with different numbers of predictors.

How to Calculate R²

The Formula:

Step 1: Calculate the means of X and Y (x̄, ȳ)
Step 2: Calculate covariance: Σ(x - x̄)(y - ȳ)
Step 3: Calculate sum of squares: Σ(x - x̄)², Σ(y - ȳ)²
Step 4: Calculate r = Cov(X,Y) / √(SS_X × SS_Y)
Step 5: Calculate R² = r²

Interpreting R²:

R² < 0.3: Weak relationship
0.3 ≤ R² < 0.7: Moderate relationship
R² ≥ 0.7: Strong relationship

Note: High R² doesn't guarantee a good model. Check residual plots and consider the context of your data.

Example: Predicting Sales from Advertising

Analyze the relationship between ad spending ($1000s) and sales ($1000s):

Data:
(1,2), (2,4), (3,5), (4,4), (5,5)
Calculation:
After computing correlations and sums of squares, we get r = 0.88
Result:
R² = 0.88² = 0.7744 or 77.44%
Interpretation:
77.44% of the variance in sales is explained by advertising spending. This indicates a strong linear relationship.

Frequently Asked Questions

Why square the correlation coefficient?

Squaring r produces R², which represents the proportion of variance explained. It's always non-negative and more interpretable as a percentage.

Can R² be negative?

Theoretically no, but adjusted R² can be negative if the model performs worse than a horizontal line (no predictive power).

What's the difference between r and R²?

r (correlation) measures the strength and direction of the linear relationship. R² (determination) measures the proportion of variance explained as a percentage.

When should I use adjusted R² instead?

Use adjusted R² when comparing models with different numbers of predictors, or when you suspect overfitting from adding unnecessary variables.

Does high R² mean the model is good?

Not necessarily. A high R² indicates good fit to the data, but doesn't guarantee the model is suitable or useful. Always plot residuals and check assumptions.

What if R² = 0?

An R² of 0 indicates no linear relationship between X and Y. The model performs no better than using the mean of Y for predictions.

Related Tools