Skip to main content

Correlation to p-value calculator

Enter your r value — the Pearson correlation coefficient — and your sample size to test it against zero. Note this takes n, not degrees of freedom: the calculator derives df = n − 2 for you.

Hypothesis direction

Testing for a difference in either direction

Results update as you type — there is no submit button.

Enter a test statistic to begin

Your p-value, a plain-English reading, and a shaded distribution chart appear here instantly.

Where this statistic comes from

You will typically be holding one of these:

  • A Pearson correlation between two continuous variables
  • A correlation matrix cell from statistical software
  • The relationship between a predictor and an outcome
  • A standardised simple regression slope

Enter n, not degrees of freedom

This is the one input on the site that differs from the others. A correlation test uses df = n − 2, and asking for n directly removes a step where mistakes routinely happen. If you have 20 paired observations, enter 20 — the calculator reports df = 18 in the results.

Two observations always produce a perfect correlation of ±1, which is why three is the minimum for a meaningful test.

Significance is not strength

These are separate questions, and conflating them is the characteristic error with correlations. The p-value asks whether the correlation is distinguishable from zero; r itself asks how strong the relationship is.

With n = 1000, a correlation of r = 0.07 is significant (p = 0.027) and explains 0.5% of the variance — statistically real, practically meaningless. With n = 10, a correlation of r = 0.60 explains 36% of the variance but is not significant (p = 0.067). Sample size drives significance; r drives importance. Always report both.

What Pearson r assumes

Pearson's r measures linear association only. A perfect parabola gives r ≈ 0 despite a deterministic relationship. It is also badly affected by outliers: a single stray point can create or destroy a strong correlation in a small sample. Plot your data before trusting the coefficient.

If the relationship is monotonic but curved, or your data are ordinal or heavily skewed, Spearman's rank correlation is the better tool. And the obvious one, worth repeating: correlation does not establish causation, however small the p-value.

Frequently asked questions

What is the difference between the r value and the p value?

They answer different questions. The r value measures the relationship: it runs from −1 to +1 and tells you the direction and strength of the linear association, and it means the same thing whatever your sample size. The p-value measures the evidence: it is the probability of seeing a correlation at least this large if the true correlation were zero, and it depends heavily on n. They routinely disagree. With n = 1000, r = 0.07 is a trivially weak relationship that is nonetheless significant (p = 0.027). With n = 10, r = 0.60 is a strong relationship that is not significant (p = 0.067). Report both — r for how much it matters, p for how sure you are.

What is the p-value in a correlation?

It is the result of testing your correlation against a null hypothesis of zero — no linear relationship at all in the population. The p-value tells you how often a sample correlation at least as far from zero as yours would occur if that null were true. A small p-value says the relationship is unlikely to be an artefact of sampling; it says nothing about how strong the relationship is, and nothing about which variable causes which.

What correlation is statistically significant?

It depends almost entirely on sample size. At α = 0.05 two-tailed, you need r = 0.878 with n = 5, r = 0.632 with n = 10, r = 0.444 with n = 20, and only r = 0.197 with n = 100. Large samples make small correlations significant.

Do I enter n or degrees of freedom?

Enter n, the number of paired observations. The calculator computes df = n − 2 and shows it in the results. This differs from the t-score calculator, which asks for df directly.

What does r² mean?

r² is the proportion of variance the two variables share. An r of 0.5 gives r² = 0.25, meaning 25% of the variation in one variable is accounted for by the other — and 75% is not. Squaring makes moderate correlations look considerably less impressive, which is usually a healthy corrective.

Can I use this for Spearman correlation?

Approximately, for samples above about 20, since Spearman's rho uses the same t-approximation. For smaller samples the exact Spearman distribution differs enough to matter, so use a dedicated Spearman test.