Correlation Coefficient Calculator
Correlation is a statistical measure of the tendency of two numeric variables to vary together. The Pearson correlation coefficient (r) summarizes both the direction and the strength of that relationship in a single number, and it always falls between −1 and +1: the closer it is to +1 the stronger the positive linear relationship, the closer to −1 the stronger the negative one, and values near 0 indicate that no linear relationship is present.
From your X and Y data, this calculator computes Pearson r, the explained variance (r²), the t statistic, and the two-tailed p-value; it also reports the nonparametric Spearman rho coefficient for ranked data and situations with outliers. For students, academics, and researchers writing theses and papers, it produces a ready-made interpretation sentence in APA format.
Thresholds for Interpreting a Correlation Coefficient
The sign of a correlation coefficient gives the direction of the relationship and its absolute value gives the strength. The bounds below are the thresholds this calculator uses to produce its "direction and strength of the relationship" label; they apply in the same way to Pearson r and to Spearman rho.
- Negligible relationship
- |r| < 0.10
- In practice there is no linear co-variation between the two variables
- Weak relationship
- 0.10 – 0.30
- The shared variance is between 1% and 9%; it can come out significant in large samples, but its practical value is limited
- Moderate relationship
- 0.30 – 0.50
- A level frequently met in the social sciences; the shared variance is between 9% and 25%
- Strong relationship
- 0.50 – 0.70
- Between 25% and 49% of the variance in one variable is shared with the other
- Very strong relationship
- |r| ≥ 0.70
- The shared variance is above 49%; among scale items this level can also point to item redundancy
- Significance threshold
- p < 0.05
- Whether the coefficient differs from zero in the population is tested two-tailed against a t distribution with n − 2 degrees of freedom
Formula
r = Σ(xᵢ − x̄)(yᵢ − ȳ) / √[ Σ(xᵢ − x̄)² · Σ(yᵢ − ȳ)² ] t = r · √(n − 2) / √(1 − r²) , df = n − 2 Spearman ρ: the values are converted to ranks and the same formula is applied
Whether the computed r differs from zero in the population is tested two-tailed against a t distribution with n − 2 degrees of freedom; if p < 0.05 the relationship is taken to be significant.
How to Calculate
- Pair up your data so that every participant (observation) has both an X and a Y value; leave out observations with a missing measurement.
- Paste the X and Y values into the two fields in the same order — separate them with commas, spaces, or line breaks.
- In the results section, read r, r², t, the degrees of freedom, the p-value, and Spearman rho.
- Copy the APA-formatted sentence from the interpretation line (e.g. r(10) = 0.64; p = 0.026) into your report, and interpret direction, strength, and significance together.
Worked Examples
Study hours and exam score
Across 12 students, weekly study hours (X) and exam score (Y) show a positive, strong, and significant relationship: r = 0.637; r(10) = 0.64; p = 0.026. Because r² = 0.406, about 40.6% of the variance in scores is shared with study time.
Pearson correlation coefficient (r): 0.637 · Direction and strength of the relationship: positive, strong · r² (explained variance): 0.406 (40.6%)
Screen time and sleep (a negative relationship)
For 10 people, daily screen time (in hours) and sleep duration show a negative, very strong relationship: r = -0.979; p < 0.001. As screen time rises, sleep duration falls markedly; Spearman rho supports the same conclusion at -0.982.
Pearson correlation coefficient (r): -0.979 · Direction and strength of the relationship: negative, very strong · r² (explained variance): 0.959 (95.9%)
A non-significant relationship
In this set of 8 observations, r = 0.043 is very close to zero and the relationship is not significant: r(6) = 0.04; p = 0.919. There is no evidence of a linear relationship between the two variables.
Pearson correlation coefficient (r): 0.043 · Direction and strength of the relationship: positive, negligible · r² (explained variance): 0.002 (0.2%)