Correlation Calculator
Calculate Pearson correlation coefficient (r) and r² from two data sets.
By Konstantin Iakovlev · Updated September 2026 · Source: Khan Academy
Pearson r
0.7746
R²
0.6000
Interpretation
| Pearson r | 0.7746 |
| R² (explained variance) | 60.00% |
| Strength | Moderate |
| Direction | Positive |
| Data Points | 5 |
Use the Correlation Calculator above to calculate your results. Enter your values and see instant results — all calculations run in your browser.
Disclaimer: This calculator is for informational purposes only. Results are estimates based on the information you provide and the assumptions described on this page.
How It Works
Two metrics summarize how closely two sets of data move together: the Pearson correlation coefficient (r) and the coefficient of determination (r²). Together they capture both the strength and the direction of a linear relationship, the kind of question you face when you want to know whether rainfall tracks with crop yields.
Computing r means dividing the covariance of the two variables by the product of their standard deviations, which scales the result to a value between -1 and 1. The coefficient of determination, r², is just r squared, and it reports the share of variance in one variable that can be predicted from the other, turning the relationship into a percentage you can act on.
Pairing matters before anything else: every value in the first set has to line up with its true counterpart in the second, or the calculation describes nothing real. And a strong r is not proof that one variable drives the other, since a lurking third variable can produce the same pattern. Read correlation as evidence of association, then look harder before claiming cause.
Example: Social Media Engagement vs. Sales for a Product Launch
- 1 Enter six months of data for a new product. X values (average likes + shares per month): 1500, 1800, 2200, 2000, 2500, 2800. Y values (monthly sales, thousands of USD): 25, 30, 38, 35, 42, 48.
- 2 The means are 2,133.33 for engagement and 36.33 for sales. The sum of the products of the deviations is 19,433.33, and the sums of squared deviations are 1,113,333.33 and 341.33, so r = 19,433.33 / √(1,113,333.33 × 341.33) = 19,433.33 / 19,494.04.
- 3 The calculator shows Pearson r = 0.9969 and R² = 0.9938 (99.38% explained variance), rated Strong and Positive, from 6 data points.
- 4 Over these six months, sales moved almost in step with engagement: a straight line on engagement accounts for about 99% of the month-to-month variation in sales. Six points are few, and both series may simply be rising with the launch, so this is evidence of association, not proof that more engagement causes more sales.
Source: Khan Academy · Last updated: September 2026
Frequently Asked Questions
What does a correlation of 0.8 mean?
Does correlation imply causation?
What is a strong vs weak correlation?
You might also need
Percentage Calculator
Calculate percentages three ways: what is X% of Y, X is what % of Y, and percentage change from X to Y.
Fraction Calculator
Add, subtract, multiply, and divide fractions. Results shown as fraction, mixed number, and decimal.
Standard Deviation Calculator
Calculate mean, variance, and standard deviation (population and sample) from a data set.