R Squared Calculator
Calculate R squared from actual values and predictions, including negative results where appropriate.
Result for the values shown.
Calculations run in your browser.
What to enter
| Input | Meaning and units |
|---|---|
| Actual | Use paired lists of equal length, with at least two observations. Separate numbers with commas or line breaks. |
| Predicted | Use paired lists of equal length, with at least two observations. Separate numbers with commas or line breaks. |
Understanding your result
These are descriptive results for the observations you entered, not proof of causation, significance or a particular population distribution.
Common mistakes
- Misaligning the paired lists, or treating association as causation.
Check your calculation
- Try a small hand-checkable list; confirm the stated quartile/rank/denominator convention before comparing with another application.
Calculation checks, sources and review limits
How well do these predictions fit the observed values by R squared?
Calculate R squared from actual values and predictions, including negative results where appropriate.
Common uses
- Calculate R squared from actual values and predictions, including negative results where appropriate.
How it works
R²=1-sum((actual-predicted)^2)/sum((actual-meanActual)^2) Lists accept commas, semicolons, spaces or line breaks as separators; use a dot for decimals. At most 10,000 observations are supported. Calculations use floating-point arithmetic; displayed numeric results have up to 12 significant digits.
Worked example
Enter Actual: 1, 2, 3; Predicted: 1, 2, 3. The result is R squared: 1.
FAQ
How well do these predictions fit the observed values by R squared?
R²=1-sum((actual-predicted)^2)/sum((actual-meanActual)^2) Lists accept commas, semicolons, spaces or line breaks as separators; use a dot for decimals. At most 10,000 observations are supported. Calculations use floating-point arithmetic; displayed numeric results have up to 12 significant digits.
What assumptions and limits apply?
Reject constant actual values. May be negative; equals r² only for OLS with intercept on same dataset.