Pearson Correlation Coefficient Calculator

Measure the strength and direction of a linear relationship between two paired numerical data sets.

Calculate Pearson correlation
Enter matching X and Y observations separated by commas, spaces, or semicolons.

About the Pearson correlation coefficient

The Pearson correlation coefficient, usually written r, summarizes the direction and strength of a linear relationship between two numerical variables. Its value ranges from negative one to positive one. A positive value means larger X observations tend to accompany larger Y observations, while a negative value means larger X observations tend to accompany smaller Y observations. A value near zero indicates little linear association, although a nonlinear relationship can still be strong. The calculation starts by finding the mean of each data set. Every observation is centered by subtracting its corresponding mean, and the products of paired centered values are summed. That cross-product total is divided by the square root of the product of the two centered sums of squares. Because the units cancel, r is dimensionless and can compare relationships measured on very different scales. R-squared is the square of Pearson r. In a simple linear regression with an intercept, it represents the proportion of variation in the response explained by its linear relationship with the predictor. Squaring removes the sign, so always inspect r itself when direction matters. For example, r values of 0.8 and negative 0.8 both produce an R-squared of 0.64, but describe opposite trends. The displayed t-statistic tests the null hypothesis that the population correlation is zero under the usual assumptions. It uses n minus 2 degrees of freedom and grows as the absolute correlation or sample size increases. An infinite statistic appears for a mathematically perfect positive or negative correlation because the denominator becomes zero. Statistical significance does not establish practical importance, causation, or freedom from confounding. Pearson correlation is most informative when observations are independent, variables are quantitative, the pattern is approximately linear, and influential outliers are absent. A scatterplot should accompany any numerical result because curvature, clusters, or one extreme point can make r misleading. Do not correlate unmatched or reordered observations: each X value must remain paired with the Y value measured on the same person, object, location, or time period. Use this calculator for exploratory data analysis, quality control, research, forecasting checks, and classroom exercises. Paste the paired values, verify that both lists have equal length, and interpret the coefficient in the context of the measurements rather than relying on generic labels alone.

Pearson correlation examples

The same coefficient can describe positive, negative, or weak linear patterns.

Paired DataResultInterpretation
X: 1,2,3,4,5; Y: 2,4,6,8,10r = 1.000000Every Y value is exactly twice X, producing perfect positive correlation.
X: 1,2,3,4,5; Y: 10,8,6,4,2r = -1.000000Y falls at a constant rate as X rises, producing perfect negative correlation.
X: 1,2,3,4,5; Y: 2,1,4,3,5r = 0.800000The data have a clear but imperfect positive linear tendency.

How to calculate correlation

  1. Enter the observations for the first variable in their original order.
  2. Enter the matching observations for the second variable using the same order and number of values.
  3. Select Calculate Correlation to compute Pearson r, R-squared, and the t-statistic.
  4. Interpret the sign and magnitude alongside a scatterplot and the subject-matter context.

Pearson correlation FAQ

What does a correlation of zero mean?

It means the data show no net linear association. A strong curved or otherwise nonlinear pattern may still be present, so inspect a plot.

Does correlation prove causation?

No, correlation only describes association in the observed pairs. Confounding, reverse causation, selection effects, or coincidence may explain the pattern.

What is a strong correlation?

Strength depends on the field, measurement reliability, and decision being made. Avoid universal cutoffs and compare the result with relevant domain benchmarks.

Can I use lists with different lengths?

No, every X observation needs exactly one matched Y observation. Unequal lists do not define valid pairs and the calculator rejects them.

How do outliers affect Pearson r?

A single influential point can greatly increase, decrease, or reverse the coefficient. Review a scatterplot and investigate unusual observations before reporting r.