Correlation Coefficient Calculator (Pearson r)
The Pearson correlation coefficient (r) measures how closely two variables move together in a straight-line pattern. A result of +1 means every data point falls exactly on an upward-sloping line; a result of -1 means they all fall on a downward-sloping line; and a result near 0 means there is no detectable linear relationship between the two variables. Values between those extremes indicate the strength of the association, ranging from negligible through weak, moderate, strong, and very strong. The coefficient only captures linear relationships, so a curved or non-linear association may show a low r value even when the two variables are strongly linked in a different pattern. Alongside r, the calculator returns r squared (the coefficient of determination), which tells you what percentage of the variation in one variable is accounted for by the linear relationship with the other. For example, r of 0.7746 means r squared of 0.6000, so 60% of the variability in y can be explained by a linear relationship with x. Enter your x values and y values as comma-separated numbers. The two lists must have the same count and at least two pairs. The tool calculates the Pearson formula using the means of each variable, which is the standard method for sample data. It suits students running statistics assignments, researchers checking whether two continuous measures are related, and analysts exploring data before building regression models.
How it works
The calculator parses each list into numbers and confirms both have the same count (n). It computes the mean of x and y. Pearson r is the sum of (xi minus x-bar) times (yi minus y-bar) divided by the square root of the sum of (xi minus x-bar) squared times the sum of (yi minus y-bar) squared. r squared is r multiplied by r. The strength label uses the convention: 0.00-0.19 negligible, 0.20-0.39 weak, 0.40-0.59 moderate, 0.60-0.79 strong, 0.80-1.00 very strong, applied to the absolute value of r.
Worked example
With x values 1, 2, 3, 4, 5 and y values 2, 4, 5, 4, 5, the means are x-bar = 3 and y-bar = 4. The sum of products of deviations is 6. The sum of squared x-deviations is 10 and the sum of squared y-deviations is 6. Pearson r = 6 / sqrt(10 x 6) = 6 / 7.746 = 0.7746. r squared = 0.6000. The strength is strong and the direction is positive. These match the default values pre-filled above.
Related calculators
- Covariance Calculator: find the raw unstandardised measure of how two variables move together.
- Coefficient of Variation Calculator: compare spread relative to the mean across data sets.
- Standard Error Calculator: estimate precision of a sample mean or proportion.
- Percent Error Calculator: measure how far a measured value deviates from an accepted value.