r
Statistical Tools
Correlation Coefficient Calculator
Live calculator, charts, and worked steps

Correlation Coefficient Calculator

Calculate Pearson, Spearman, Kendall Tau, or point-biserial correlation from raw data. Upload CSV or Excel files, inspect the scatter plot, and read the exact step-by-step working behind the result.

Live update window
300ms
Manual row limit
500
Output package
r, p, CI
Active method
Pearson r

Best for continuous variables with a linear relationship.

r=i=1n(xixˉ)(yiyˉ)i=1n(xixˉ)2i=1n(yiyˉ)2r = \frac{\sum_{i=1}^{n}(x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\sum_{i=1}^{n}(x_i - \bar{x})^2 \cdot \sum_{i=1}^{n}(y_i - \bar{y})^2}}
Data input
Enter or import paired values
8 valid pairs
Row
X Variable
Y Variable
1
2
3
4
5
6
7
8
Drag and drop a CSV or Excel file
Column headers are detected automatically so you can choose which variables become X and Y.
Example datasets
Interactive Scatter Plot
2.04.06.08.050.055.060.065.070.075.080.085.090.0X VariableY Variable
Correlation Meter
-1.00.0+1.00.9991
Strength badgeVery strong
Data health check
Sample sizeGood
8 valid pairs gives a stable first-pass estimate.
Distribution shapeGood
Neither variable shows strong skewness from a quick sample-skewness check.
Linearity checkInfo
Pearson and Spearman are close, which supports a mostly linear trend.
Residual Plot
X VariableResidual
r
0.9991
0.9981
p-value
2.13e-9
t
56.1931
df
6
95% CI
0.995 to 1.000
99% CI
0.991 to 1.000
Automatic interpretation
This dataset shows a very strong positive linear relationship. It is statistically significant at the 0.05 level.

Pearson r = 0.9991 based on 8 valid pairs, p = 0.0000.

Your result
r = 0.9991Very strong
-1-0.500.51
Statistically significant at p < 0.05
r² = 0.9981 so X explains 99.81% of Y variance.
Sample size n=8 is small, so treat the confidence interval with caution.
Step-by-step
How the calculator got this result
Step 1: Compute the means

Average the X values and the Y values before measuring joint movement.

x̄ = (1.0000 + 2.0000 + 3.0000 + 4.0000 + 5.0000 + 6.0000 + 7.0000 + 8.0000) / 8 = 36.0000 / 8 = 4.5000
ȳ = (52.0000 + 57.0000 + 62.0000 + 67.0000 + 72.0000 + 77.0000 + 83.0000 + 86.0000) / 8 = 556.0000 / 8 = 69.5000
Step 2: Measure paired deviations

Subtract the mean from every X and Y value to get centered deviations.

#1: dx = 1.0000 - 4.5000 = -3.5000, dy = 52.0000 - 69.5000 = -17.5000
#2: dx = 2.0000 - 4.5000 = -2.5000, dy = 57.0000 - 69.5000 = -12.5000
#3: dx = 3.0000 - 4.5000 = -1.5000, dy = 62.0000 - 69.5000 = -7.5000
#4: dx = 4.0000 - 4.5000 = -0.5000, dy = 67.0000 - 69.5000 = -2.5000
#5: dx = 5.0000 - 4.5000 = 0.5000, dy = 72.0000 - 69.5000 = 2.5000
#6: dx = 6.0000 - 4.5000 = 1.5000, dy = 77.0000 - 69.5000 = 7.5000
#7: dx = 7.0000 - 4.5000 = 2.5000, dy = 83.0000 - 69.5000 = 13.5000
#8: dx = 8.0000 - 4.5000 = 3.5000, dy = 86.0000 - 69.5000 = 16.5000
Step 3: Sum the covariance numerator

Multiply each pair of deviations and add them up.

#1: (-3.5000) × (-17.5000) = 61.2500
#2: (-2.5000) × (-12.5000) = 31.2500
#3: (-1.5000) × (-7.5000) = 11.2500
#4: (-0.5000) × (-2.5000) = 1.2500
#5: (0.5000) × (2.5000) = 1.2500
#6: (1.5000) × (7.5000) = 11.2500
#7: (2.5000) × (13.5000) = 33.7500
#8: (3.5000) × (16.5000) = 57.7500
Σ(xᵢ - x̄)(yᵢ - ȳ) = 209.0000
Step 4: Sum the squared deviations

Compute the denominator from the independent spread of X and Y.

#1: dx² = 12.2500, dy² = 306.2500
#2: dx² = 6.2500, dy² = 156.2500
#3: dx² = 2.2500, dy² = 56.2500
#4: dx² = 0.2500, dy² = 6.2500
#5: dx² = 0.2500, dy² = 6.2500
#6: dx² = 2.2500, dy² = 56.2500
#7: dx² = 6.2500, dy² = 182.2500
#8: dx² = 12.2500, dy² = 272.2500
Σ(xᵢ - x̄)² = 42.0000
Σ(yᵢ - ȳ)² = 1042.0000
Step 5: Divide numerator by denominator

The covariance term is normalized by both standard-deviation components.

r = 209.0000 / √(42.0000 × 1042.0000)
r = 0.9991
How to use this calculator

How to Use This Calculator

  1. 1. Enter paired X and Y values manually, paste from Excel, or upload a CSV/XLSX file.
  2. 2. Choose the correlation method that fits your data and measurement scale.
  3. 3. Read the coefficient, p-value, confidence intervals, and interpretation cards.
  4. 4. Inspect the scatter plot and residual plot before trusting a linear conclusion.
  5. 5. Expand the worked steps if you need a hand-calculation explanation for teaching or homework.

What Is the Correlation Coefficient?

A correlation coefficient measures how strongly two variables move together. Values near +1 indicate strong positive association, values near -1 indicate strong negative association, and values near 0 indicate little or no systematic relationship.

Pearson vs Spearman vs Kendall

Pearson r
Use Pearson when both variables are numeric and you want to measure linear association.
Spearman ρ
Use Spearman when normality is doubtful or your data is ordinal.
Kendall τ
Use Kendall Tau when you want the most robust rank-based measure for small or tie-heavy datasets.
Point-Biserial
Use point-biserial correlation when comparing a 0/1 group variable against a numeric outcome.

How to Interpret Correlation Results

Interpret the sign first, then the magnitude, and only then the p-value. A statistically significant coefficient can still be practically weak, and a strong coefficient can still reflect correlation without causation.

Correlation Coefficient Formula

r=i=1n(xixˉ)(yiyˉ)i=1n(xixˉ)2i=1n(yiyˉ)2r = \frac{\sum_{i=1}^{n}(x_i-\bar{x})(y_i-\bar{y})}{\sqrt{\sum_{i=1}^{n}(x_i-\bar{x})^2\cdot\sum_{i=1}^{n}(y_i-\bar{y})^2}}

For significance testing, the Pearson-style t statistic is t=rn21r2t = \frac{r\sqrt{n-2}}{\sqrt{1-r^2}} with df=n2df=n-2.

Real-world examples

Real-World Examples

Height vs Weight
A classic positive linear relationship with mild natural variation.
Temperature vs Ice Cream Sales
Stronger temperatures generally push sales up, with one cooler-day outlier.
Study Hours vs Exam Score
Useful for step-by-step teaching because the pattern is easy to inspect by hand.
Service Rank vs Satisfaction Rank
Monotonic data with ties that works well for Spearman correlation.

FAQ

What is a good correlation coefficient?

It depends on context, but absolute values around 0.1 are usually weak, 0.3 moderate, 0.5 strong, and 0.7 or above very strong.

How do you calculate the correlation coefficient by hand?

Find the mean of each variable, compute each deviation from the mean, multiply paired deviations, sum them, and divide by the product of the deviation sums.

What does r = 0.7 mean?

An r value of 0.7 indicates a strong positive linear relationship. As one variable increases, the other tends to increase as well.

Is 0.5 a strong correlation?

In many practical settings 0.5 is considered strong enough to be meaningful, though some disciplines would still describe it as moderate.

What is the difference between correlation and causation?

Correlation measures association between variables. Causation means one variable changes another. Correlation alone cannot prove a causal effect.

How do you find the p-value for correlation?

For Pearson-style tests you convert the coefficient to a t statistic using t = r√(n-2) / √(1-r²) and then read the two-tailed p-value from the t distribution.

Use cases and resources

Who This Correlation Calculator Is Built For

Correlation Coefficient Calculator is designed as a browser-based statistics toolkit for students, researchers, educators, and analysts who need a fast online correlation calculator without installing desktop software. If you need an online Pearson correlation calculator for students, assignments, or classroom demonstrations, the main workflow starts here and links directly to the dedicated Pearson page.

The site also works as a Spearman correlation calculator for survey researchers, a Kendall tau calculator for ranked and tie-heavy data, a point-biserial calculator for exam item analysis, and a correlation matrix calculator for business analytics teams. Because each tool runs locally in the browser, it also fits privacy-sensitive exploratory work and quick verification before formal reporting.

If you are comparing methods, start with the correlation guide hub, read the correlation vs causation guide, and then open the calculator that matches your dataset. If you need help with a dataset, want to suggest a feature, or need to report a calculation issue, use the contact page.

Recent calculations
Recent calculations are stored locally in your browser once you start using the tool.