Pearson Correlation Coefficient Calculator
Measures the strength and direction of a linear relationship between two continuous variables.
Formula first
Overview
The Pearson product-moment correlation coefficient (r) quantifies the degree to which two continuous variables are linearly related. Its value ranges from -1 to +1, where +1 indicates a perfect positive linear relationship, -1 a perfect negative linear relationship, and 0 no linear relationship.
Symbols
Variables
r = Pearson Correlation Coefficient, = Individual x value, = Individual y value, = Mean of x, = Mean of y
Apply it well
When To Use
When to use: Use this formula when examining the linear association between two continuous variables and you need a single standardized measure of how strongly they move together.
Why it matters: It is a core statistic in data analysis, social science, and machine learning because it summarizes both direction and strength on a fixed scale from -1 to 1.
Avoid these traps
Common Mistakes
- Confusing correlation with causation.
- Using Pearson's r on a clearly non-linear relationship.
- Ignoring outliers or mismatching paired observations.
One free problem
Practice Problem
A dataset has x = [1, 2, 3] and y = [2, 4, 6]. Calculate the Pearson correlation coefficient.
Solve for:
Hint: A perfectly straight upward line gives r = 1.
The full worked solution stays in the interactive walkthrough.
References
Sources
- Britannica Editors (2026) 'Correlation coefficient' Encyclopaedia Britannica.
- NIST/SEMATECH e-Handbook of Statistical Methods, correlation and regression sections.
- NIST Special Publication 500-339, correlation matrix and regression statistics.
- Understanding the Pearson Correlation Coefficient | Outlier
- Pearson correlation coefficient - Wikipedia
- What is an intuitive explanation of the Pearson product-moment correlation coefficient?
- Pearson correlation coefficient (PCC) | Science | Research Starters - EBSCO
- Pearson Correlation Coefficient (r) | Guide & Examples - Scribbr