HomeCalculatorsStatisticsCorrelation Coefficient Calculator

Correlation Coefficient Calculator

Statistics

Calculate the Pearson correlation coefficient (r) between two variables in seconds. Enter paired X, Y data points to measure the strength and direction of their relationship.

Paired Data Points (X, Y)
XY#1#2#3#4#5

Add up to 12 data points. At least 2 pairs are required.

Correlation Coefficient (r)

0

R² (Determination)

0

n (pairs)

0

Weak / no linear relationship

Mean X = 0, Mean Y = 0. 0.0% of the variance in Y can be explained by X.

What is a Correlation Coefficient?

The Correlation Coefficient Calculator computes the Pearson correlation coefficient (r) between two paired variables, telling you both the strength and direction of their linear relationship. Enter your X and Y data pairs, and the calculator returns r, R² (the coefficient of determination), and a plain-language strength classification (weak, moderate, or strong).

Correlation is one of the most fundamental tools in statistics and data analysis for understanding whether — and how strongly — two variables move together. Whether you're checking if advertising spend relates to sales, if study hours relate to exam scores, or if temperature relates to ice cream sales, the correlation coefficient gives you a single, standardized number between −1 and +1 to summarize the relationship.

To go a step further and build an actual prediction equation from your data, use the Linear Regression Calculator, which fits a line through the same type of paired data.

How to use this Correlation Coefficient calculator

  1. Enter your paired X, Y data points — each row represents one observation with both an X value and a corresponding Y value.

  2. Add more pairs as needed — up to 12 data points can be entered; more data generally produces a more stable, trustworthy correlation estimate.

  3. Read the correlation coefficient (r) — check both its sign (direction) and magnitude (strength).

  4. Check R² — for an intuitive "percentage of variance explained" interpretation of the same relationship.

  5. Visualize before concluding — since Pearson's r can be distorted by outliers or non-linear patterns, consider plotting your data as a scatter plot to visually confirm the relationship looks genuinely linear.

  6. Move to regression if you need predictions — once you've confirmed a meaningful correlation, use the Linear Regression Calculator with the same data to get a prediction equation.

Formula & Methodology

Pearson correlation coefficient:
r = Σ(x−x̄)(y−ȳ) / √[Σ(x−x̄)² × Σ(y−ȳ)²]

Coefficient of determination:
R² = r²

Variable definitions:
- x, y — individual paired data values
- x̄, ȳ — mean of X values and mean of Y values
- Σ — sum across all data pairs

Worked example:

Hours studied (X) vs exam score (Y) for 5 students: (1, 2.1), (2, 3.9), (3, 6.2), (4, 7.8), (5, 10.1)

Step 1 — Mean X = 3, Mean Y = 6.02

Step 2 — Sum of cross-products Σ(x−x̄)(y−ȳ) ≈ 19.9

Step 3 — Sum of squared deviations: Σ(x−x̄)² = 10, Σ(y−ȳ)² ≈ 39.6

Step 4 — r = 19.9 / √(10 × 39.6) = 19.9 / 19.9 ≈ 1.00

This near-perfect r confirms an almost perfectly linear positive relationship between study hours and exam score in this example dataset.

Assumption: Pearson's correlation coefficient measures only linear relationships — two variables can be strongly related in a non-linear (curved) way and still produce a low r value. Always inspect a scatter plot alongside the coefficient when possible.

Frequently Asked Questions

The Pearson correlation coefficient (r) measures the strength and direction of the linear relationship between two numeric variables, ranging from −1 (perfect negative relationship) to +1 (perfect positive relationship), with 0 meaning no linear relationship at all. For example, an r of 0.85 between hours studied and exam score indicates a strong positive relationship — as study hours increase, scores tend to increase as well.
r = Σ(x−x̄)(y−ȳ) / √[Σ(x−x̄)² × Σ(y−ȳ)²]. First compute the mean of X and Y, then for each pair calculate the product of their deviations from their respective means, sum those products, and divide by the square root of the product of the summed squared deviations for X and Y separately.
An r of 0 means there is no linear relationship between the two variables — as one increases, the other shows no consistent linear tendency to increase or decrease. Importantly, r = 0 does not necessarily mean the variables are unrelated — they could have a strong non-linear relationship (like a U-shape) that the linear correlation coefficient simply cannot detect.
A common rule of thumb: |r| < 0.3 indicates a weak relationship, 0.3 to 0.7 indicates a moderate relationship, and above 0.7 indicates a strong relationship. These thresholds are guidelines, not strict rules — the appropriate interpretation depends on your field (a correlation of 0.4 might be considered strong in social science research but weak in physics).
Correlation measures whether two variables move together statistically, but does not prove that one causes the other. Ice cream sales and drowning incidents are positively correlated, but ice cream doesn't cause drowning — both increase in summer due to a third factor (hot weather). Always be cautious about inferring causation from a correlation coefficient alone; controlled experiments are needed to establish causal relationships.
R² (r-squared) is simply the correlation coefficient squared, representing the proportion of variance in one variable that is explained by the other. An r of 0.8 gives an R² of 0.64, meaning 64% of the variability in Y can be statistically explained by X's linear relationship with it — the remaining 36% is due to other factors or randomness.
Yes — a negative correlation coefficient means the two variables move in opposite directions: as one increases, the other tends to decrease. For example, the relationship between hours of exercise per week and resting heart rate is typically negative — more exercise correlates with a lower resting heart rate. The sign (positive or negative) indicates direction; the magnitude (0 to 1) indicates strength.
Pearson's r is calculated using squared deviations from the mean, which gives extreme values disproportionate influence over the result. A single unusual data point far from the rest of the pattern can dramatically shift the correlation coefficient, sometimes creating the appearance of a strong relationship that doesn't reflect the bulk of your data. Always visualize your data with a scatter plot alongside computing r, to check for outliers before trusting the coefficient.
While correlation can be technically computed with as few as 2 pairs, at least 10-15 pairs are generally recommended for a reasonably stable estimate, and 30 or more for a reliable one. Small sample sizes produce correlation coefficients that can swing wildly with the addition or removal of a single data point, so treat correlations from very small samples with caution.
Correlation (r) measures the strength and direction of the linear relationship between two variables symmetrically — it doesn't matter which variable is 'X' and which is 'Y'. Linear regression instead fits a specific equation (y = mx + b) to predict one variable (Y) from the other (X), treating them asymmetrically. Use the [Linear Regression Calculator](/linear-regression-calculator/) when you need an actual prediction equation, not just a strength-of-relationship measure.
Pearson's correlation coefficient, as computed by this calculator, only measures the relationship between exactly two variables at a time. To study relationships among three or more variables simultaneously, you would need a correlation matrix (computing pairwise r values for every combination) or more advanced techniques like multiple regression or principal component analysis.
A marketing team might compute the correlation coefficient between ad spend and monthly revenue across 24 months of data to see if increased spending tracks with increased revenue. A strong positive r (e.g., 0.75) would support continuing or increasing ad investment, while a weak or near-zero r would suggest revenue is being driven by other factors and ad spend efficiency should be reassessed.
Also known as
pearson correlation calculatorcorrelation coefficientr value calculatorcorrelation calculatorlinear correlation calculator