Home Calculators R-Squared Calculator
Regression Analysis Tool

R-Squared Calculator

Calculate the coefficient of determination, R², from actual and predicted values. This calculator also shows SSE, SST, SSR, sample size, unexplained variation, and an easy interpretation of how well your regression model fits the observed data.

R² Percentage SSE, SST & SSR Instant Result No Data Stored

Enter Regression Data

Provide actual and predicted values for each observation.

Separate numbers using commas, spaces, semicolons, or new lines. Both fields must contain the same number of observations. Each predicted value should correspond to the actual value in the same position.
Regression Guide

What Is R-Squared?

R-squared, also called the coefficient of determination, is a statistical measure used to describe how much of the variation in an observed dependent variable is accounted for by a regression model.

R² is often expressed as either a decimal or a percentage. For example, an R² value of 0.80 corresponds to 80%, meaning that the fitted model accounts for 80% of the total variation in the observed outcome relative to the baseline mean model.

What Does a Higher R-Squared Mean?

In many standard regression settings, a higher R² indicates that the model's predictions are closer to the observed data relative to simply predicting the mean of the observations.

However, a high R² does not automatically mean that the model is useful, unbiased, correctly specified, or capable of making accurate predictions on new data.

How It Works

How to Use the R-Squared Calculator

01

Enter Actual Values

Enter the observed values from your dataset in the Actual Values field.

02

Enter Predictions

Add the corresponding values predicted by your regression model in the Predicted Values field.

03

Calculate R²

The calculator computes error sums of squares, total variation, R², and the percentage of variation explained by the model.

Important: The first predicted value must correspond to the first actual value, the second predicted value to the second actual value, and so on.
R-Squared Formula

How Is R-Squared Calculated?

A common definition of the coefficient of determination is: R² = 1 − SSE / SST

SSE is the sum of squared residual errors between the observed values and the predicted values. SST is the total sum of squares measuring variation in the observed values around their mean.

Sum of Squared Errors (SSE)

SSE is calculated using: SSE = Σ(y − ŷ)²

Smaller residual errors generally produce a smaller SSE and, all else equal, a larger R².

Total Sum of Squares (SST)

SST is calculated using: SST = Σ(y − ȳ)²

Here, y represents each observed value and ȳ represents the mean of all observed values.

Interpretation

How to Interpret an R-Squared Value

There is no universal R² value that defines a good model. Acceptable values depend heavily on the type of data, field of study, purpose of the model, noise level, and whether the model is intended for explanation or prediction.

R² Range General Fit Label Simple Interpretation
Below 0 Poor Worse than predicting the observed mean
0.00 – 0.24 Weak Explains a small portion of variation
0.25 – 0.49 Moderate Explains some variation
0.50 – 0.74 Good Explains a substantial portion of variation
0.75 – 0.89 Very Good Strong fit to observed data
0.90 – 1.00 Excellent Explains most observed variation
These labels are only a simple interpretation aid. A lower R² can still be useful in noisy real-world fields, while a very high R² does not guarantee good future predictions.
Important Concept

Can R-Squared Be Negative?

Yes. When R² is calculated from arbitrary predicted values using the formula 1 − SSE/SST, the result can be negative. This happens when the model performs worse than a simple baseline that always predicts the mean of the observed values.

For ordinary least-squares regression fitted with an intercept to the same data used for estimation, R² is typically between 0 and 1. Other model setups and out-of-sample predictions can produce negative values.

Comparison

R-Squared vs Correlation

R-squared and correlation are related concepts, but they are not always interchangeable. Correlation describes the strength and direction of association between variables, while R² commonly summarizes model fit in regression.

Feature R-Squared Correlation
Main Purpose Measure regression fit Measure association
Typical Symbol R² r
Direction Does not show positive/negative direction Sign shows direction
Typical Range Often 0 to 1, but may be negative −1 to +1
Common Questions

R-Squared Calculator FAQs

R-squared describes how much of the variation in the observed dependent variable is explained by the fitted values relative to a mean-based baseline.
An R² of 0.80 means the model accounts for approximately 80% of the total variation in the observed outcome under the standard coefficient-of-determination interpretation.
No. R² can be negative when predictions perform worse than the mean-only baseline. Values above 1 are not expected with the standard formula used by this calculator.
Not necessarily. A high R² can coexist with overfitting, misspecified relationships, influential outliers, or poor out-of-sample prediction. Other diagnostics should also be considered.
SSE is the sum of squared errors. It measures the squared differences between the actual observations and the values predicted by the model.
SST is the total sum of squares. It measures how much the observed values vary around their overall mean.
Yes. If you already have the actual and predicted values, this calculator can directly calculate R² along with SSE, SST and other useful information.