Skip to main content

Correlation Coefficient Calculator

Our free correlation & regression calculator solves correlation coefficient problems. Get worked examples, visual aids, and downloadable results.

Share this calculator

Formula

r = [n(Sum_XY) - (Sum_X)(Sum_Y)] / sqrt{[n(Sum_X2) - (Sum_X)2][n(Sum_Y2) - (Sum_Y)2]}

Pearson's r is computed by dividing the covariance of X and Y by the product of their standard deviations. The formula uses sums of products, sums of squares, and sample size n. R-squared = r squared. The regression line uses y = slope * x + intercept where slope = r * (Sy/Sx).

Worked Examples

Example 1: Study Hours vs. Test Score

Problem: Data: (1,50), (2,55), (3,65), (4,70), (5,75), (6,80), (7,85). Calculate the correlation.

Solution: Pearson r = 0.9934 (very strong positive)\nR-squared = 98.7% of score variance explained by hours\nRegression: Score = 5.89 ร— Hours + 44.29\nEach additional hour predicts ~5.9 more points.

Result: r = 0.993 | R2 = 98.7% | Very strong positive correlation

Example 2: Temperature vs. Ice Cream Sales

Problem: Data: (60,100), (65,120), (70,150), (75,200), (80,250), (85,300), (90,350).

Solution: r = 0.994 (very strong positive)\nR-squared = 98.8%\nRegression: Sales = 8.21 ร— Temp - 402.14\nEach degree increase predicts ~8 more units sold.

Result: r = 0.994 | R2 = 98.8% | Very strong positive

Frequently Asked Questions

What is Pearson's correlation coefficient (r)?

Pearson's r measures the strength and direction of the linear relationship between two continuous variables. It ranges from -1 to +1. A value of +1 indicates a perfect positive linear relationship, -1 indicates a perfect negative linear relationship, and 0 indicates no linear relationship. It only measures linear associations โ€” two variables can have a strong non-linear relationship but a low Pearson r.

Does correlation imply causation?

No. Correlation measures association, not causation. Two variables can be correlated because: (1) X causes Y, (2) Y causes X, (3) a third variable causes both, or (4) it is a coincidence. Establishing causation requires controlled experiments, temporal ordering, ruling out confounders, and theoretical justification. Always be cautious about inferring causation from correlation alone.

What is the difference between correlation and causation?

Correlation measures the strength and direction of a linear relationship between two variables (r ranges from -1 to +1). Causation means one variable directly influences the other. Correlation alone cannot prove causation because confounding variables, reverse causality, or coincidence may explain the association.

How do I get the most accurate result?

Enter values as precisely as possible using the correct units for each field. Check that you have selected the right unit (e.g. kilograms vs pounds, meters vs feet) before calculating. Rounding inputs early can reduce output precision.

Is my data stored or sent to a server?

No. All calculations run entirely in your browser using JavaScript. No data you enter is ever transmitted to any server or stored anywhere. Your inputs remain completely private.

Can I use Correlation Coefficient Calculator on a mobile device?

Yes. All calculators on NovaCalculator are fully responsive and work on smartphones, tablets, and desktops. The layout adapts automatically to your screen size.

References