Skip to content
Omnikalc

R-squared calculator: R², adjusted R² and the F test

Enter the residual and total sums of squares, the number of observations and the number of predictors to get R², adjusted R², F and its p-value.

Updated on
Your inputs

Value out of range

Value out of range

Value out of range

Value out of range

Results

Adjusted R²

0.675

A moderate fit: a good part of the variation is explained
R² (coefficient of determination)
0.700
Share of the variation explained
70.0%
Multiple correlation R
0.837
F statistic of the whole model
28.00
p-value of the F test
1.6 × 10⁻⁹
Standard error of the regression
1.826

R-squared tells you how much of the variation in an outcome a model explains, on a scale from 0 to 1. This calculator takes the sums of squares from a regression output and returns R², adjusted R², the F statistic and its p-value, so you can judge a model without redoing the regression.

How the calculation works

  • R² = 1 − SSE ÷ SST, where SSE is the residual sum of squares and SST the total sum of squares
  • Adjusted R² = 1 − (1 − R²) × (n − 1) ÷ (n − k − 1)
  • F = (R² ÷ k) ÷ ((1 − R²) ÷ (n − k − 1)), tested against the F distribution with k and n − k − 1 degrees of freedom
  • Standard error = √(SSE ÷ (n − k − 1))

Here n is the number of observations and k the number of predictors, not counting the intercept.

Example

A regression on 40 observations with 3 predictors has SSE = 120 and SST = 400. R² = 1 − 120 ÷ 400 = 0.700, so 70 % of the variation is explained. The adjusted R² is 1 − 0.3 × 39 ÷ 36 = 0.675. The F statistic is 28.0 and the p-value is far below 0.001, so the model as a whole is significant. The standard error of the regression is 1.826.

Why it matters

R-squared is the first number people read in a regression table, and it is easy to misread. The adjusted version is the fair one when you compare models with different numbers of predictors, because it stops you from rewarding a model for being bigger. The F test answers a different question: whether the predictors together explain more than chance would.

Good to know

A high R² does not mean the relationship is causal, and a low one does not mean it is unimportant: a predictor can matter even when the outcome is noisy. Outliers can inflate or deflate R² a lot, and with few observations per predictor the adjusted value is more reliable than the plain one. Check the residual plot as well. This tool is for education.

The linear regression calculator fits a line to your data, the correlation significance calculator tests a single r, and the standard deviation calculator measures spread.

Frequently asked questions

What is R-squared?

R-squared, or the coefficient of determination, is the share of the variation in the outcome that the model explains. It is 1 minus the residual sum of squares divided by the total sum of squares, so 0.70 means that 70 % of the variation is explained.

Why use adjusted R-squared?

Plain R-squared never goes down when you add a predictor, even a useless one. Adjusted R-squared penalizes each extra predictor, so it only rises when a new variable improves the fit by more than chance would.

What is a good R-squared?

It depends on the field. Physical experiments often reach 0.95 or more, while models of human behavior or markets can be useful at 0.2 or 0.3. A high value alone does not prove the model is right, so check the residuals too.

Can R-squared be negative?

A plain R-squared on the fitted data cannot be negative when the model has an intercept. The adjusted version can fall below zero when the model is worse than just using the mean, and so can R-squared computed on new data.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.