Correlation Coefficient Calculator
StatisticsCalculate 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.
Add up to 12 data points. At least 2 pairs are required.
Correlation Coefficient (r)
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
Enter your paired X, Y data points — each row represents one observation with both an X value and a corresponding Y value.
Add more pairs as needed — up to 12 data points can be entered; more data generally produces a more stable, trustworthy correlation estimate.
Read the correlation coefficient (r) — check both its sign (direction) and magnitude (strength).
Check R² — for an intuitive "percentage of variance explained" interpretation of the same relationship.
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.
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