DataToolsLab
Statistics & Probability Calculators

R-Squared Calculator

Compute R², the share of variation in y explained by the best-fit line.

Loading tool…

What is R-Squared?

R², the coefficient of determination, is the fraction of the variation in y that the fitted line accounts for: 1 − SS_res ÷ SS_tot. It is the square of the correlation for a simple linear fit, so a correlation of 0.5 corresponds to an R² of just 0.25.

How it works

The sums of squared residuals and of squared deviations from the mean both come out of the single least-squares pass, and R² is their complement. The correlation is shown beside it because R² alone hides the direction of the relationship, and the percentage phrasing is included to stop the number being read as a proportion of the correlation.

  1. Enter your input. Type or paste your input into the field above — the tool responds instantly.
  2. Review the result. Output updates live as you type. Everything runs entirely in your browser.
  3. Copy or download. Use the Copy button to grab the result, or Download to save it as a file.

Examples

Realistic sample

Type or paste any realistic input — the tool computes the result locally and instantly.

Common mistakes

Expecting a server round-trip

Nothing is uploaded — every tool in this category runs entirely in your browser.

Online