AP Stats Correlation Coefficient Calculator
The correlation coefficient r measures how strong and in which direction a linear relationship is. It is always between −1 and 1: near 1 is a strong positive line, near −1 is a strong negative line, and near 0 is no linear relationship.
Correlation Calculator
Interactive visual: Live preview
Press Show live preview to redraw this chart from your calculator inputs.
What Is the Correlation Coefficient?
The correlation coefficient, r, measures the strength and direction of the linear relationship between two quantitative variables. It is always between -1 and 1: values near 1 mean a strong positive linear pattern, values near -1 mean a strong negative one, and values near 0 mean no linear pattern. Correlation does not imply causation, a strong correlation can come from a lurking variable.
Interactive visual: See the idea
Example: x = 1, 2, 3, 4, 5 and y = 2, 4, 5, 4, 5 — dots rise together, positive correlation.
How to Use This Calculator
Interactive visual: Walk through it
Step 1: Open the AP Stats Correlation Coefficient Calculator calculator at the top and enter the values it asks for.
Enter x values in order, then the matching y value for each x, in the same order. The lists must have the same length and at least 3 pairs for a meaningful result. The scatter plot below the result shows your points and the least-squares line, so you can see whether a straight line fits at all.
How to Calculate the Correlation Coefficient
Interactive visual: See it on a chart
Press Update visual to redraw this chart from your calculator inputs.
Formula: r = Σ(x − x̄)(y − ȳ) / √[ Σ(x − x̄)² × Σ(y − ȳ)² ].
Worked example: x = 1, 2, 3, 4, 5 (x̄ = 3) and y = 2, 4, 5, 4, 5 (ȳ = 4). The numerator is (−2)(−2) + (−1)(0) + (0)(1) + (1)(0) + (2)(1) = 4 + 0 + 0 + 0 + 2 = 6. The denominator is √[(4+1+0+1+4) × (4+0+1+0+1)] = √(10 × 6) = √60 ≈ 7.746. So r = 6 / 7.746 ≈ 0.775, a strong positive linear relationship, with r² ≈ 0.60 — about 60% of the variation in y is explained by the linear model.
Tips and Common Mistakes
Interactive visual: Mistake vs correct
Mistake: Saying a high r proves one variable causes the other.
- Order matters: pair the first x with the first y, the second with the second, and so on.
- r only measures linear association. A perfect curve can still have r near 0 — always look at the scatter plot.
- Outliers can change r a lot. One far point can make a weak relationship look strong, or vice versa.
- Correlation is not causation: a high r never proves that x causes y.
- Do not extrapolate: r describes the data you have, not values far outside its x-range.
Frequently Asked Questions
Interactive visual: FAQ
Tap any question below to show or hide its answer.
What counts as a strong correlation?
As a rough guide used in many AP Statistics classes: |r| below 0.3 is weak, 0.3 to 0.7 is moderate, and above 0.7 is strong. Always report the value, not just the label.
Can r be greater than 1?
No. r is always between −1 and 1. A result outside that range means a calculation error.
What does a negative r mean?
As x increases, y tends to decrease. For example, more time spent on a phone might be associated with fewer hours of sleep.
What is r-squared?
r² is the proportion of variation in y explained by the least-squares regression line on x. For r = 0.775, r² ≈ 0.60, or 60%.
Why do I need at least 3 pairs?
With only 2 points, a line always fits perfectly (r = ±1), so it tells you nothing about a real relationship.
Does correlation need units?
No — r has no units, which is why you can compare correlations across different kinds of data.
Disclaimer: 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.
Correlation Coefficient Calculator → Linear Regression Calculator → R-Squared Calculator