How it’s calculated
A sample correlation r can be non-zero by chance even when the two variables are unrelated. This calculator tests the null hypothesis that the population correlation ρ is 0 and gives a confidence interval for ρ, using only r and the number of pairs n. It assumes the pairs are a random sample and the relationship is roughly linear.
The t-test is the standard test of ρ = 0 (OpenStax). The confidence interval uses Fisher’s z-transformation, which makes the sampling distribution close to normal; transforming back with tanh keeps the limits between −1 and 1 and makes the interval lopsided when r is near ±1.
Example (Mike’s Biostatistics Book, LibreTexts): fly wing length and area, r = 0.9693334 with n = 20. Then t = 0.9693334 × √18 ÷ √(1 − 0.9693334²) = 16.735 with 18 df and p = 2.04 × 10⁻¹²; z = atanh(0.9693334) = 2.0811 and SE = 1/√17 = 0.2425, so the 95% interval is tanh(2.0811 ± 1.96 × 0.2425) = 0.9225 to 0.9880, the same as R’s cor.test. These are the default values.
A significant correlation shows a linear association, not that one variable causes the other, and with large n even a weak correlation can be significant, so look at r and its interval too.
Frequently asked questions
How do I know if my correlation is significant?
Compare the p-value with your significance level (often 0.05), or equivalently check whether |r| exceeds the critical r shown. Both use the same t-test with n − 2 degrees of freedom.
Why is the confidence interval not symmetric around r?
Correlations are bounded by −1 and 1. Fisher’s z-transformation stretches that scale so the interval can be built symmetrically, and transforming back squeezes the side nearer ±1.
Does this work for Spearman’s rho?
The t approximation is commonly used for Spearman’s rho with about 10 or more pairs, but the Fisher interval is designed for Pearson’s r. Use the Spearman calculator for ranked data.
Can a correlation be significant but weak?
Yes. With hundreds of pairs, r = 0.1 can be significant. Significance only says the correlation is probably not zero; r² tells you how much of the variation a straight line explains.
Embed this calculator
Add this free calculator to your own website. Copy the code below into your page’s HTML:
Need this calculator branded, changed or built around your own prices?See custom business solutions →
Sources
- Introductory Statistics 2e, §12.4 Testing the Significance of the Correlation Coefficient — OpenStax
- Mike’s Biostatistics Book (Dohm), 16.1 Product-moment correlation (Fisher’s z confidence interval) — LibreTexts
Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.
Added · Last updated · How we check our calculators
Spotted a mistake or missing option? Report a problem· Suggest a calculator