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 r0.7746
R² (explained variance)60.00%
StrengthModerate
DirectionPositive
Data Points5

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. 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. 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. 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. 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?
A correlation of 0.8 indicates a strong positive linear relationship. As one variable increases, the other tends to increase along a straight-line trend. About 64% (0.8² = r²) of the variance in one variable is explained by the other.
Does correlation imply causation?
No. Correlation only measures the linear association between two variables. A strong correlation could be caused by a third confounding variable, coincidence, or reverse causation. Controlled experiments are needed to establish causation.
What is a strong vs weak correlation?
There is no single standard, and textbooks draw the lines in different places. This calculator labels |r| of 0.8 or more as strong, 0.5 to 0.8 as moderate, 0.3 to 0.5 as weak and below 0.3 as negligible, with the same bands for negative values. What counts as meaningful also depends on the field and on the sample size.