AP Stats R-Squared Calculator

R-squared (r²) is the proportion of the variation in y that is explained by the linear relationship with x. If r² = 0.64, about 64% of the variation in y is explained by the least-squares line — and 36% is left in the residuals.

R-Squared Calculator

Enter at least 3 pairs of x and y values, then press Calculate.

Interactive visual: Live preview

Press Show live preview to redraw this chart from your calculator inputs.

What Is R-Squared?

R-squared is the proportion of the variation in the response variable that is explained by the regression model. An r-squared of 0.72 means the model explains about 72% of the variation in y. R-squared is the square of the correlation coefficient r for a simple linear regression, and it is always between 0 and 1.

Interactive visual: See the idea

Example: r = 0.80, so r-squared = 0.64 — about 64% of the variation in y is explained.

How to Use This Calculator

Interactive visual: Walk through it

Step 1: Open the AP Stats R-Squared Calculator calculator at the top and enter the values it asks for.

1. Enter the x list and the y list, in the same order, separated by commas. 2. Make sure both lists have the same count and at least 3 pairs. 3. Press Calculate. 4. Read r, r², the regression equation, and the scatter plot with the least-squares line.

How to Calculate R-Squared

Interactive visual: See it on a chart

Press Update visual to redraw this chart from your calculator inputs.

First find the correlation r: r = Σ(x − x̄)(y − ȳ) / √[Σ(x − x̄)² × Σ(y − ȳ)²]. Then square it: r² = r × r. The slope is b = Σ(x − x̄)(y − ȳ) / Σ(x − x̄)² and the intercept is a = ȳ − b × x̄.

Worked example: x = 0, 1, 2, 3, 4 and y = 1, 3, 2, 5, 4. The means are x̄ = 2 and ȳ = 3. Then Σ(x − x̄)(y − ȳ) = 8, Σ(x − x̄)² = 10, and Σ(y − ȳ)² = 10, so r = 8 / √(10 × 10) = 0.80. Therefore r² = 0.80² = 0.64: about 64% of the variation in y is explained by the linear relationship with x. The line is ŷ = 1.4 + 0.8x.

Tips and Common Mistakes

Interactive visual: Mistake vs correct

Mistake: Saying R-squared is the correlation.

Frequently Asked Questions

Interactive visual: FAQ

Tap any question below to show or hide its answer.

What does r² = 0 mean?

It means the least-squares line explains none of the variation in y beyond the mean. The line is flat, and knowing x does not help predict y linearly.

What does r² = 1 mean?

It means all points fall exactly on the least-squares line, so the line explains 100% of the variation in y. This is rare with real data.

Is r² the same as r?

No. r measures the strength and direction of a linear relationship, from −1 to 1. r² is r squared, from 0 to 1, and measures the proportion of variation explained.

Can r² be negative?

No, for a least-squares line r² cannot be negative, because it is a square. A negative value usually means a calculation or software error.

Does a higher r² always mean a better model?

Not always. Adding variables or fitting a curve can raise r² without making predictions better, and a high r² with a curved pattern or influential outliers can still be misleading.

How do I interpret r² in a sentence?

For example: “About 64% of the variation in y is explained by the least-squares regression line using x.” Always name both variables in context.

AP is a trademark of the College Board, which was not involved in this site.

Related Calculators and Guides

Keep exploring AP Statistics with calculators and guides related to this tool.

Related Calculators

Interactive visual: Tool path

Start with this tool, then follow the path through the related calculators.

R-Squared Calculator → Linear Regression Calculator → Correlation Coefficient Calculator

Related Guides

All AP Statistics Calculators

Use any of the 25 free calculators below, no login needed. Each calculator opens on its own page with its own formula, worked example, tips, and FAQs.

AP Statistics Score Calculator Z-Score Calculator P-Value Calculator T-Test Calculator Confidence Interval Calculator Margin of Error Calculator Standard Deviation Calculator Chi-Square Calculator Binomial Distribution Calculator Normal Distribution Calculator Expected Value Calculator Hypothesis Testing Calculator Sample Size Calculator Correlation Coefficient Calculator Residual Calculator Linear Regression Calculator Two-Sample T-Test Calculator Proportion Confidence Interval Calculator Variance Calculator Geometric Distribution Calculator Percentile Calculator Degrees of Freedom Calculator Outlier Calculator R-Squared Calculator Poisson Distribution Calculator

Read the AP Statistics guides for worked examples, TI-84 steps, and exam strategy.