Correlation Confidence Interval Calculator
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
This calculator computes a confidence interval for a Pearson correlation coefficient (r) based on your sample size and the observed correlation. You enter the sample correlation r, the sample size n, and choose a confidence level (90%, 95%, or 99%), and you get back the lower and upper bounds of the interval for the true population correlation.
Formula
The standard method uses the Fisher z-transformation. First convert r to z:
z = 0.5 × ln((1 + r) / (1 − r))
The standard error of z is approximately 1 / √(n − 3). For a confidence level of C, the critical value is z* (e.g., 1.96 for 95%). The confidence interval for z is:
z ± z* × (1 / √(n − 3))
Then transform the lower and upper z bounds back to r using the inverse Fisher transformation:
r = (e^(2z) − 1) / (e^(2z) + 1)
Variables: r = sample Pearson correlation (dimensionless, between −1 and 1); n = number of paired observations (integer, ≥ 3); z* = critical value of the standard normal distribution for the chosen confidence level (1.645 for 90%, 1.96 for 95%, 2.576 for 99%).
Worked Example
Using the default values: r = 0.65, n = 50, 95% confidence.
- Fisher z: z = 0.5 × ln((1 + 0.65) / (1 − 0.65)) = 0.5 × ln(1.65 / 0.35) = 0.5 × ln(4.7143) = 0.5 × 1.5506 = 0.7753.
- Standard error: SE = 1 / √(50 − 3) = 1 / √47 = 1 / 6.8557 = 0.1459.
- Margin of error: 1.96 × 0.1459 = 0.2860.
- Lower z bound: 0.7753 − 0.2860 = 0.4893. Upper z bound: 0.7753 + 0.2860 = 1.0613.
- Back-transform lower: r = (e^(2×0.4893) − 1) / (e^(2×0.4893) + 1) = (2.6624 − 1) / (2.6624 + 1) = 1.6624 / 3.6624 = 0.454.
- Back-transform upper: r = (e^(2×1.0613) − 1) / (e^(2×1.0613) + 1) = (8.4147 − 1) / (8.4147 + 1) = 7.4147 / 9.4147 = 0.788.
The 95% confidence interval for the population correlation is approximately 0.454 to 0.788. This matches the calculator output.
Why Use the Fisher Transformation Instead of a Simple Formula?
You might wonder why we don’t just compute r ± something. The reason is that the sampling distribution of r is skewed, especially when the true correlation is strong (e.g., r > 0.7). The Fisher z-transformation makes the distribution approximately normal, with a variance that depends only on sample size, not on the true correlation. This allows a symmetric interval in the z-scale, which becomes asymmetric when transformed back to r. The result is a more accurate interval, particularly for small samples or strong correlations.
For example, with r = 0.95 and n = 20, a naive symmetric interval might include values above 1, which is impossible. The Fisher method avoids this by constraining the bounds to the range −1 to 1.
When to Use This Calculator
Use this calculator when you have a sample Pearson correlation coefficient and want to estimate the range of plausible values for the true population correlation. Common scenarios include:
- Reporting results of a study that measured the association between two continuous variables (e.g., height and weight).
- Checking whether a correlation is statistically distinguishable from zero or from a clinically meaningful threshold.
- Planning a study: you can use the interval width to estimate the needed sample size (though a dedicated power analysis is better).
Do not use it for Spearman’s rank correlation or Kendall’s tau; those require different methods. Also, if your data are not bivariate normal or have outliers, the Pearson correlation itself may be misleading, and the confidence interval will inherit that problem.
How to Interpret the Result
The interval gives a range of plausible values for the population correlation, given your sample. If the interval contains 0, you cannot rule out no linear association. If it is entirely positive, the evidence suggests a positive association; if entirely negative, a negative one. The width reflects precision: narrower intervals come from larger samples or weaker correlations. For example, an interval from 0.45 to 0.79 is quite wide, indicating substantial uncertainty; a sample of 500 with r = 0.65 would give roughly 0.60 to 0.70.
Remember that correlation does not imply causation. A strong correlation could be due to a third variable, reverse causation, or coincidence. The confidence interval only quantifies sampling variability, not these other threats.
Common Mistakes and Pitfalls
- Using n as the number of variables instead of the number of pairs. If you have 30 participants and measure two things per participant, n = 30, not 60.
- Entering r outside −1 to 1. The calculator will produce nonsense; r must be between −1 and 1 inclusive.
- Applying the interval to Spearman’s rho. The Fisher method assumes Pearson correlation with bivariate normal data. For rank correlations, use bootstrap or other methods.
- Ignoring outliers. A single outlier can inflate or deflate r dramatically, making the interval misleading. Check scatterplots first.
- Rounding too early. If you round r to two decimals before the transformation, the interval can shift noticeably. Keep more decimals during calculations.
Limitations and Alternatives
The Fisher z method is approximate; it works well when n is at least 10 and the sample correlation is not extremely close to ±1. For very small samples (n < 10) or near-perfect correlations, the interval may be too narrow. In those cases, bootstrapping (resampling your data many times) provides a more reliable interval, though it requires the original data, not just r and n. If your data are clearly not normal, consider Spearman's rank correlation and its confidence interval via bootstrap. For meta-analyses, researchers often use the same Fisher transformation to combine correlations across studies, but that involves weighting by sample size, which this simple calculator does not do.
Frequently Asked Questions
What if my r is negative?
Enter the negative value (e.g., -0.4). The Fisher transformation works fine for negative correlations; the interval will be computed symmetrically in the z-scale and transformed back, giving a negative interval. The interpretation is the same: the interval shows the plausible range for the true negative correlation.
Can I use this for Spearman’s rho?
Strictly, no. The Fisher z method is derived for the Pearson correlation assuming bivariate normality. Spearman’s rho is based on ranks and has a different sampling distribution. If you have the original ranked data, bootstrapping is a better approach. Some textbooks apply the same formula to rho as an approximation, but that is not generally recommended.
Why do I need at least 3 pairs?
The formula uses n − 3 in the denominator of the standard error. With n = 3, the denominator is zero, and the interval becomes infinitely wide, which makes sense: three points always fit a line perfectly, so you have no information about the population correlation. With n = 2, the concept is undefined.
How is this different from a p-value?
A p-value tests a specific null hypothesis (usually r = 0) and gives the probability of observing a correlation at least as extreme if the null were true. A confidence interval gives a range of plausible values for the true correlation. The interval contains 0 if and only if the p-value for testing r = 0 is greater than the significance level (e.g., 0.05 for a 95% interval). The interval provides more information: it shows the magnitude and direction of the association, not just whether it is “significant.�
Does a wider interval mean the correlation is weaker?
Not necessarily. Width reflects uncertainty, which depends on sample size and the strength of the correlation. A wide interval can occur with a strong correlation if the sample is small. For example, r = 0.9 with n = 10 gives a 95% interval from about 0.64 to 0.98, which is wide. A weaker correlation of r = 0.3 with n = 200 gives an interval from about 0.17 to 0.42, which is narrower. Always consider the sample size when interpreting width.
What if my data are not normally distributed?
The Pearson correlation measures linear association and does not strictly require normality, but the confidence interval formula assumes the sampling distribution of z is approximately normal, which holds better when the data are bivariate normal. If your data are heavily skewed or have outliers, the Pearson correlation may not be the best measure. Consider Spearman’s rho or a robust correlation, and use bootstrap for the confidence interval.
Related
Formula used
in r | Sample correlation (r) | - | 0.65 | -1 in n | Sample size (n) | - | 50 | 3 sel conf | Confidence level | 90%=0.90, 95%=0.95, 99%=0.99 out ci | Confidence interval | - | (exp(2*(atanh(r)-1.9599639845400545/sqrt(n-3)))-1)/(exp(2*(atanh(r)-1.9599639845400545/sqrt(n-3)))+1) | 3 out ci_hi | Upper bound | - | (exp(2*(atanh(r)+1.9599639845400545/sqrt(n-3)))-1)/(exp(2*(atanh(r)+1.9599639845400545/sqrt(n-3)))+1) | 3
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.