Pearson Product Moment Correlation Coefficient: Formula
The Pearson product moment correlation coefficient (PMCC, or simply Pearson r) is calculated from paired (x, y) data. It standardizes the covariance between x and y by the product of their standard deviations, producing a value always between -1 and +1.
r = (n*Sxy - Sx*Sy) / sqrt((n*Sx^2 - Sx^2)(n*Sy^2 - Sy^2)) where Sx = sum(x), Sy = sum(y), Sxy = sum(x*y) Sx^2 = sum(x^2), Sy^2 = sum(y^2), n = number of pairs
The formula can also be written as: r = covariance(x, y) / (std_dev(x) * std_dev(y)). Both forms produce identical results. This is why r is scale-independent: multiplying x or y by any constant does not change r. Descriptive statistics for each variable (mean, standard deviation) are computed separately; the Mean Median Mode Calculator computes those individual measures for any data set.
Correlation Coefficient in Excel: CORREL and PEARSON Functions
Excel has two built-in functions that calculate the Pearson correlation coefficient. Both return identical results for the same input data.
CORREL: =CORREL(A1:A6, B1:B6) PEARSON: =PEARSON(A1:A6, B1:B6) Both return Pearson r. CORREL is more commonly used.
Task
Excel
This Calculator
Pearson r
=CORREL(x_range, y_range)
Enter x and y, click Calculate
R-squared
=CORREL(...)^2
Shown automatically
Interpretation label
Manual lookup required
Shown automatically
Step-by-step workings
Not available
Shown in results card
Batch multiple pairs
Yes (drag formula)
One calculation at a time
For a one-time calculation with step-by-step intermediate values, this calculator is faster than setting up Excel. For batch calculations across many variable pairs in a dataset, Excel or Python pandas are better suited. Correlation is closely related to linear interpolation between paired data points; the Linear Interpolation Calculator estimates unknown values along a line defined by two points.
Correlation Coefficient Interpretation: Range of Values
The correlation coefficient r is always between -1 and +1. Both extreme values represent perfect linear relationships; intermediate values describe the degree of scatter around that line. The sign indicates direction; the magnitude indicates strength.
r value
Interpretation
What it means
Real-world example
+1.0
Perfect positive
Every point on a line, upward
Temperature in C vs F
+0.9 to +1.0
Very strong positive
Nearly all variance explained
Height vs arm span
+0.7 to +0.9
Strong positive
Clear upward trend
Advertising spend vs sales
+0.5 to +0.7
Moderate positive
Visible trend, notable scatter
Study hours vs test score
+0.3 to +0.5
Weak positive
Slight upward tendency
Exercise vs mood
0.0 to +0.3
Very weak / none
Essentially unrelated linearly
Shoe size vs IQ
Negative
Same strengths, downward
As x increases, y decreases
Speed vs fuel economy
Important: r = 0 does not mean the variables are unrelated. It means no linear relationship exists. A strong U-shaped or exponential relationship can produce r = 0 while the variables are clearly associated. Always visualize the data alongside any r value. For estimating values within a data range, see the Interpolation Calculator.
Example Calculation
X: 2, 4, 5, 7, 8, 10 and Y: 3, 5, 6, 8, 9, 12. Find the Pearson correlation coefficient.
A high r value means two variables move together, not that one causes the other. Both may be driven by a third unmeasured variable (confounding). Causation requires a controlled experiment or rigorous study design.
Using Pearson r on non-linear relationships
Pearson measures linear association only. Two variables with a strong U-shaped, exponential, or sinusoidal relationship can produce an r near 0 while still being strongly related. Always plot the data first.
Entering values in the wrong order
Each x value must be paired with its corresponding y value at the same position. Entering x or y values in a different order produces a meaningless r value.
Over-interpreting r from small samples
With only 4 or 5 data pairs, even random data can produce high r values by chance. At least 10 to 15 pairs are recommended for a reliable estimate. Report sample size alongside r.
Dismissing a moderate correlation as meaningless
An r of 0.5 means r² = 0.25, so 25 percent of the variance is explained. Whether that is useful depends on the context, not the number alone.
Frequently Asked Questions
The Pearson correlation coefficient (r) measures the strength and direction of a linear relationship between two variables. It ranges from -1 to +1. A value of +1 means a perfect positive linear relationship. A value of -1 means a perfect negative linear relationship. A value of 0 means no linear relationship exists.
Technical reference for the computational formula for Pearson r and its algebraic equivalents used in the step-by-step calculation displayed here.
HR
Hassaan Rasheed
Developer and Researcher, CalculatorFlux
Researches and verifies the formulas, methodology, and source data behind each calculator on CalculatorFlux. All tools are built and checked against the cited references before publication.
Last updated: May 2026
Correlation Strength Guide
|r| range
Interpretation
0.9 - 1.0
Very Strong
0.7 - 0.9
Strong
0.5 - 0.7
Moderate
0.3 - 0.5
Weak
0.0 - 0.3
Very Weak
Important
Correlation only measures linear relationships. Two variables can have a strong non-linear relationship (like a parabola) but a Pearson r near zero. Always plot your data before relying on r alone.