R-Squared Calculator
Calculate R-squared: how well your model explains the variance in the data.
This tool is for informational and educational purposes only. It is not a substitute for professional financial, medical, legal, or engineering advice. See Terms of Service.
Can't find what you need?
Request a ToolHow to Use the R-Squared Calculator
Enter the observed (actual) values and the predicted (model) values, separated by commas or spaces. Both lists must have the same length. The calculator computes R-squared = 1 - SS_res / SS_tot, where SS_res is the sum of squared residuals and SS_tot is the total sum of squares.
An R-squared of 1 means the model perfectly predicts the data. An R-squared of 0 means the model is no better than predicting the mean.
About R-Squared
R-squared (the coefficient of determination) measures the proportion of variance in the dependent variable explained by the model. It ranges from 0 to 1 for well-fitted models, though it can be negative if the model fits worse than a horizontal line at the mean. R-squared is one of the most commonly reported statistics in regression analysis.
Frequently Asked Questions
What is a good R-squared value?
It depends on the field. In physics experiments, R-squared above 0.99 is common. In social sciences, 0.3 to 0.5 may be acceptable. A higher R-squared means the model explains more of the data variability.
Can R-squared be negative?
Yes. A negative R-squared means the model fits worse than simply using the mean of the observed values as the prediction. This usually indicates the model is inappropriate for the data.
What is adjusted R-squared?
Adjusted R-squared penalizes for the number of predictors in the model. It prevents overfitting by accounting for model complexity. It is always less than or equal to regular R-squared.