R-Squared Calculator
R-Squared is evaluated from Actual Y1, Predicted Ŷ1 and Actual Y2. The calculation reports R-Squared, Variance Explained and SS Residuals.
Results
About the R-Squared Calculator
The calculator uses a multi formula configuration. Each reported value is read as a direct evaluation of the stored rules with the declared field formats and units.
Formula basis:
R^2 = 1 - (residual sum of squares / total sum of squares)
Interpret the outputs in the order shown by the result fields. Optional inputs affect only the outputs that depend on those variables.
Formula & How It Works
The calculation applies the following relations exactly as recorded in the metadata: R^2 = 1 - (residual sum of squares / total sum of squares) Each output field is produced by substituting the supplied inputs into the relevant relation and then applying the declared rounding or text format.
Worked Examples
Example 1: House price model: Actual vs. predicted prices ($K)
Inputs
With Actual Y1 = 250, Predicted Ŷ1 = 245, Actual Y2 = 320 and Predicted Ŷ2 = 330 as the stated inputs, the result is R-Squared = 0.998, Variance Explained = 99.8% and SS Residuals = 500. Each value corresponds to the declared output fields.
Example 2: Sales forecast vs. actuals ($M): Monthly data
Inputs
With Actual Y1 = 4.2, Predicted Ŷ1 = 3.9, Actual Y2 = 5.1 and Predicted Ŷ2 = 5.3 as the stated inputs, the result is R-Squared = 0.9926, Variance Explained = 99.26% and SS Residuals = 0.48. Each value corresponds to the declared output fields.
Example 3: Linear regression fit: Advertising spend vs. revenue
Inputs
With Actual Y1 = 100, Predicted Ŷ1 = 95, Actual Y2 = 150 and Predicted Ŷ2 = 140 as the stated inputs, the result is R-Squared = 0.9737, Variance Explained = 97.37% and SS Residuals = 475. Each value corresponds to the declared output fields.
Example 4: Weather vs. ice cream sales: Poor fit example
Inputs
With Actual Y1 = 50, Predicted Ŷ1 = 70, Actual Y2 = 80 and Predicted Ŷ2 = 60 as the stated inputs, the result is R-Squared = 0.8098, Variance Explained = 80.98% and SS Residuals = 1,714. Each value corresponds to the declared output fields.
Common Use Cases
- Calculate R-squared from actual and predicted values
- Evaluate regression model goodness of fit
- Compare explanatory power of different models