R2 Score Calculator

Measure explained variance with R2 in seconds, safely. Paste values, set features, and check score. Download tables and PDFs for audits and sharing fast.

Calculator

Enter paired values of Actual (y) and Predicted (ŷ).
No data leaves your server.

Choose the fastest way to enter data.
Used for Adjusted R² only.
Accepted separators: comma, semicolon, tab, or two spaces.

Example Data Table

Use this sample to verify your setup.
# Actual (y) Predicted (ŷ) Residual
1 3 2.7 0.3
2 4 3.9 0.1
3 5 5.1 -0.1
4 6 5.6 0.4
5 7 7.2 -0.2

Formula Used

R² Score
R² = 1 − SSE / SST
It measures how much variance in the Actual values is explained by predictions.
Supporting terms
SSE = Σ( yᵢ − ŷᵢ )²
SST = Σ( yᵢ − ȳ )²
Adjusted R² = 1 − (1−R²)·(n−1)/(n−p−1)
Where n is rows, p is predictors, and ȳ is the mean of y.

How to Use This Calculator

  1. Choose an input method: paste, table, or CSV upload.
  2. Enter paired values of Actual and Predicted for the same rows.
  3. Set predictors (p) if you want Adjusted R².
  4. Click Compute R² to see results above the form.
  5. Use CSV or PDF export to save results for reports.

FAQs

1) What does R² represent?
R² is the fraction of variance in Actual values explained by predictions. Higher is better, but context matters and overfitting can still occur.
2) Can R² be negative?
Yes. A negative R² means your model performs worse than simply predicting the mean of the Actual values for every row.
3) When is Adjusted R² useful?
Use Adjusted R² when comparing models with different numbers of predictors. It penalizes unnecessary predictors and helps reduce misleading improvements.
4) What if all Actual values are identical?
Then SST becomes zero, and the usual R² formula is undefined. This tool shows R² as not defined and still reports error metrics.
5) What file format should my CSV have?
Two columns are needed: Actual and Predicted. Optional headers like actual,predicted or y_true,y_pred are accepted. Extra columns are ignored.
6) Are MAE and RMSE included?
Yes. MAE is the average absolute error, while RMSE penalizes large errors more. They complement R² when comparing models.
7) Why do I get an unusually high R²?
Check for data leakage, incorrect pairing of rows, or scaling issues. Also compare with MAE/RMSE and validate using a held-out dataset.

Related Calculators

Model Fit ScoreRegression R SquaredAdjusted Model FitMultiple R SquaredExplained Variance ScoreRegression Fit IndexModel Accuracy ScoreLinear Model FitRegression Performance ScoreR Squared Online

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.