R-Squared Calculator

Enter your observed and predicted (or X and Y) values to instantly calculate R², SS_res, SS_tot, and RMSE.

Data Input

Enter your data on the left and click Calculate R²

Copied!

Summary

Enter your observed and predicted (or X and Y) values to instantly calculate R², SS_res, SS_tot, and RMSE.

How it works

  1. Enter your observed (actual) values in the left column, one per line.
  2. Enter your predicted (model output) values in the right column, one per line.
  3. Click Calculate to get R², SS_res, SS_tot, and RMSE.
  4. R² ranges from 0 to 1; values closer to 1 indicate a better model fit.
  5. Use the sample data button to see an example before entering your own numbers.

Use cases

  • Evaluate how well a linear regression model fits your data.
  • Compare two regression models to pick the better predictor.
  • Assess forecast accuracy in finance and sales projections.
  • Validate machine learning model predictions against ground truth.
  • Grade the fit of a trend line drawn through a scatter plot.
  • Report goodness-of-fit in academic research or data science projects.

Frequently Asked Questions

Last updated: 2026-06-09 · Reviewed by Nham Vu