Partial Correlation Calculator

Calculate the correlation between two variables while controlling for a third variable.

First-order partial correlation
Enter three Pearson correlation coefficients. Each coefficient must be between -1 and 1.

About partial correlation

Partial correlation measures the linear relationship between two variables after removing the linear influence of another variable from both. An ordinary Pearson coefficient between X and Y can be large because both variables are associated with Z. A first-order partial correlation asks what relationship remains between X and Y when that shared association with Z is held constant. This makes it useful for preliminary confounding analysis, exploratory research, education, and checking statistical software output. The calculator requires three pairwise Pearson coefficients: the correlation between X and Y, the correlation between X and the control variable Z, and the correlation between Y and Z. It subtracts the portion of the X-Y association implied by their separate relationships with Z, then standardizes the remainder. The output stays between negative one and positive one when the three inputs form a valid correlation structure. A positive result indicates that larger residual values of X tend to accompany larger residual values of Y. A negative result indicates an inverse residual relationship. Magnitude describes strength, not importance or causation. A coefficient close to zero means little linear association remains after controlling for Z, while a value closer to either endpoint indicates a stronger remaining linear pattern. Context, sample size, measurement quality, and uncertainty still matter. This calculator reports the coefficient only; it does not calculate a confidence interval or significance test because those procedures also require the sample size and assumptions about the observations. The formula becomes undefined when either X or Y is perfectly correlated with Z. In that case, removing Z leaves no residual variation for that variable. Inputs should also be correlations computed from the same observations and using the same treatment of missing values. Pairwise coefficients assembled from unrelated samples may be mathematically inconsistent. Use the result as a concise descriptive adjustment, then inspect data plots and a suitable regression model when decisions depend on nonlinear effects, interactions, additional control variables, or causal interpretation.

Partial correlation examples

Compare the original X-Y relationship with the association that remains after controlling for Z.

Pairwise correlationsPartial correlationInterpretation
rXY 0.70; rXZ 0.40; rYZ 0.500.6299A substantial positive relationship remains.
rXY 0.48; rXZ 0.60; rYZ 0.800.0000Z accounts for the observed association.
rXY -0.30; rXZ 0.20; rYZ 0.40-0.4237Controlling for Z strengthens the negative relationship.

How to calculate partial correlation

  1. Enter the Pearson correlation between the two variables of interest, X and Y.
  2. Enter the correlation between X and the control variable Z.
  3. Enter the correlation between Y and the control variable Z.
  4. Select Calculate partial correlation and interpret the sign and magnitude.

Frequently asked questions

What does controlling for a variable mean?

It means removing the linear variation associated with that variable from both variables of interest. The resulting coefficient describes how their residual values move together.

Can partial correlation prove causation?

No. It adjusts one measured linear association but does not rule out omitted variables, reverse causality, measurement error, or selection effects.

Can a partial correlation exceed the original correlation?

Yes. A control variable can suppress an opposing pattern, making the adjusted relationship stronger in magnitude than the ordinary correlation.

Why is my result undefined?

A perfect correlation between the control variable and X or Y makes the denominator zero. There is then no independent variation left to correlate after controlling for Z.

What is a strong partial correlation?

Strength thresholds depend on the field and purpose. This calculator uses broad descriptive bands, but practical interpretation should rely on subject knowledge and uncertainty estimates.