CalcWorldHub
Free online calculator · no signup

Coefficient of determination calculator

Calculate the coefficient of determination from paired observed and predicted values, preserving negative and undefined cases.

Coefficient of determination calculator — Observed values, Predicted values and calculation method
Coefficient of determination calculator: inputs and calculation method.

How to use this calculator

Calculate the coefficient of determination from paired observed and predicted values, preserving negative and undefined cases.

  1. Enter Observed values, Predicted values. Match the units shown beside each field and review the result together with the assumptions below.
  2. Read the worked example below to check the expected input format and result.
  3. Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Calculation guide

How the Coefficient of determination calculator works

Calculate the coefficient of determination from paired observed and predicted values, preserving negative and undefined cases.

Inputs and units

  • Observed values: Observed outcome values in case order.
  • Predicted values: Matching predictions in exactly the same case order and units.

Formula and method

R² = 1 − SSE/SST; SSE=Σ(yi−predictioni)²; SST=Σ(yi−mean y)²

Worked example

Observed 2,4,5,7 and predicted 2.5,3.5,5.5,6.5 give SSE=1 and SST=13. R²=1−1/13=0.92307692.

Interpreting the result

A negative R² means squared prediction error exceeds that of predicting the observed mean. It is not automatically squared correlation.

Assumptions and limits

Lists must match and have at least two observations. Constant observed values make SST zero and R² undefined; the calculator reports that explicitly rather than a numeric score.

Sources and method

  • Documents negative R² and constant-target nonfinite cases. This calculator preserves an explicit undefined result for constant observed values. scikit-learn: R² score

Frequently asked questions

Can R² be negative?

Yes. Arbitrary predictions can be worse in squared error than the observed-mean baseline.

Why not report one for perfect predictions of a constant series?

The standard expression divides zero by zero when observed spread is zero. This tool preserves the undefined result.

How do I use the Coefficient of determination calculator?

Enter Observed values, Predicted values. Match the units shown beside each field and review the result together with the assumptions below.

What is a worked example of Coefficient of determination?

Observed 2,4,5,7 and predicted 2.5,3.5,5.5,6.5 give SSE=1 and SST=13. R²=1−1/13=0.92307692.

What does the Coefficient of determination calculator calculate?

Calculate the coefficient of determination from paired observed and predicted values, preserving negative and undefined cases.