Statistical

RSQ Formula

RSQ returns the R-squared value (coefficient of determination) of a linear regression, indicating what fraction of the variance in y is explained by x. It ranges from 0 to 1 — an RSQ of 0.85 means 85% of the variation in y can be explained by the linear relationship with x. Use it to evaluate how well a trend line fits your data.

Syntax

RSQ(known_y, known_x)
ParameterDescription
known_y Parameter of the RSQ function.
known_x Parameter of the RSQ function.
Try RSQ in Viztab — free, no signup

Examples

Model fit quality

Formula
=RSQ(B2:B50, C2:C50)
Returns 0.92 — 92% of the variance in B is explained by C. This is a strong linear relationship.

Advertising effectiveness

Formula
=RSQ(D2:D13, E2:E13)
If D is monthly sales and E is ad spend, an RSQ of 0.75 means 75% of sales variation is explained by ad spend variation.

Weak relationship

Formula
=RSQ(A2:A100, B2:B100)
An RSQ of 0.08 means x explains only 8% of the variation in y — the linear model is a poor fit.

Common Errors

#N/A

The arrays have different lengths.

#DIV/0!

Zero variance in one or both arrays (all values identical).

Tips

RSQ = CORREL squared

RSQ is simply the square of the Pearson correlation coefficient. CORREL of 0.9 gives RSQ of 0.81.

Interpreting the value

RSQ > 0.7 is generally considered a good fit, 0.4-0.7 moderate, below 0.4 weak. But thresholds vary by field — social sciences accept lower values than engineering.

Only measures linear fit

RSQ measures linear fit. A perfect quadratic relationship (y = x^2) may show low RSQ because it is not a straight line. Always visualize with a scatter plot.

Try RSQ in Viztab

Import your data and use RSQ with 370+ other formulas. No signup required.

Open Viztab

Related Formulas