Skip to content
LoveToCalc

Definition — what does that mean?

Coefficient of determination (R²)

How much of the variation in y a model explains. 1 means every point sits on the line; 0 means the line explains nothing.

In Swedish: Determinationskoefficient

Coefficient of determination

The relation

R²=1−SSresSStot

How much of the total variation a fitted line accounts for: 1 minus the residual sum of squares over the total sum of squares.

Solve for

R²=0.8

R² equals 1 minus (2 divided by 10), equals 1 minus 0.2, equals 0.8

Working3 steps

Practice questions

You are given

  • R²=0.6
  • SSres=6

What the formula says

SStot is the total sum of squares, how far the y-values lie from their mean, squared and added up. SSres is the residual sum of squares, how far they lie from the model’s line. R² is the share of the total that the model removes.

Worked example

Five points: (1, 2), (2, 3), (3, 5), (4, 4), (5, 6). The mean of y is 4, and the least squares line is y = 1.3 + 0.9x.

The line explains 81% of the variation in y.

R² and the correlation coefficient

For a straight line fitted by least squares, R² is the square of the correlation coefficient: here r = 0.9 and 0.9² = 0.81. R² loses the sign, so a strongly falling relationship and a strongly rising one both give an R² close to 1.

How to read it

Frequently asked questions

Can R² be negative? Not for a least squares line with a constant term. For a model forced through the origin, or tested on new data, it can: the model then does worse than simply guessing the mean.

Looking for another letter? The formula solved for each one
Solved for each letter
Solve forRearrangedWith the numbersComes to
R²1−SSresSStot1−2100.8
SSresSStot(1−R²)10(1−0.8)2
SStotSSres1−R²21−0.810

Last reviewed October 6, 2026 ·How pages are reviewed

Statistics and probabilityAll formulas

Put this formula on your site

Copy the code into your page where the formula card should appear. It loads from lovetocalc.com, so it stays current on its own — all we ask is that the credit line comes with it.