R Squared Calculator (Correlation r and R2)

Updated 5 Dec 2026 · By , HisaabHub · How we check

Quick answer: R squared is the correlation coefficient r multiplied by itself. If r = 0.9, R2 = 0.81, so the line explains 81% of the changes in y.

Advertisement

How to read R squared

R squaredMeaning
0.00 - 0.19Very weak fit
0.20 - 0.49Weak to moderate
0.50 - 0.79Moderate to strong
0.80 - 1.00Strong fit

How to calculate r and R squared

r = (n sum xy - sum x sum y) / sqrt((n sum x2 - (sum x)2)(n sum y2 - (sum y)2)). Square r to get R2. The slope is (n sum xy - sum x sum y) / (n sum x2 - (sum x)2) and the intercept is mean y - slope x mean x.

Advertisement

Correlation is not cause

A high R2 shows two things move together, not that one causes the other. Outliers can change R2 a lot, so plot the points first. For more maths tools see the percentile calculator.

Roman Urdu: X aur y ke numbers daal kar correlation (r) aur R squared nikalein.

Official sources

Questions people ask

How do you calculate R squared?
Find the correlation coefficient r and square it.
What is a good R squared value?
Above 0.7 is strong for many fields, but social data is often lower.
Can R squared be negative?
In simple linear regression no. It runs from 0 to 1.
What is the difference between r and R squared?
r shows direction and strength from -1 to 1. R squared shows the share of variation explained.
How many data points do I need?
At least 3 pairs, but 20 or more gives a more reliable result.
Advertisement