Data & ComputingStatisticsUniversity

Pearson Correlation Coefficient Calculator

Measures the strength and direction of a linear relationship between two continuous variables.

Use the free calculatorCheck the variablesOpen the advanced solver
This is the free calculator preview. Advanced walkthroughs stay in the app.
Result
Ready
Individual x value

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

Pearson Correlation Coefficient
Variable
Individual x value
Variable
Individual y value
Variable
Mean of x
Variable
Mean of y
Variable
Number of data points
Variable

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.

x1,2,3
y2,4,6
Number of data points3

Solve for:

Hint: A perfectly straight upward line gives r = 1.

The full worked solution stays in the interactive walkthrough.

References

Sources

  1. Britannica Editors (2026) 'Correlation coefficient' Encyclopaedia Britannica.
  2. NIST/SEMATECH e-Handbook of Statistical Methods, correlation and regression sections.
  3. NIST Special Publication 500-339, correlation matrix and regression statistics.
  4. Understanding the Pearson Correlation Coefficient | Outlier
  5. Pearson correlation coefficient - Wikipedia
  6. What is an intuitive explanation of the Pearson product-moment correlation coefficient?
  7. Pearson correlation coefficient (PCC) | Science | Research Starters - EBSCO
  8. Pearson Correlation Coefficient (r) | Guide & Examples - Scribbr