Correlation Calculator
Calculate Pearson correlation coefficient (r) and r² from two data sets.
By Konstantin Iakovlev · Updated April 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 and does not constitute tax, financial, or legal advice. Results are estimates based on the information you provide and current rates. Always consult a qualified tax professional or financial advisor for advice specific to your situation.
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 2026 Q1 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: Analyzing Social Media Engagement vs. Sales for a 2026 Product Launch
- 1 Input two data sets representing monthly social media engagement (e.g., average likes + shares) and monthly sales figures (in thousands USD) for a new product launched in January 2026: Data Set 1 (Engagement): [1500, 1800, 2200, 2000, 2500, 2800] Data Set 2 (Sales): [25, 30, 38, 35, 42, 48]
- 2 The calculator will compute the Pearson correlation coefficient (r) and the coefficient of determination (r²) based on these inputs.
- 3 The calculated Pearson correlation coefficient (r) is approximately 0.98. The coefficient of determination (r²) is approximately 0.96.
- 4 An r-value of 0.98 indicates a very strong positive linear relationship between social media engagement and sales. The r² value of 0.96 means that 96% of the variation in sales can be explained by the variation in social media engagement for this product in 2026. This suggests that increasing engagement is highly likely to lead to increased sales.
Source: Khan Academy · Last updated: April 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.