Developed by StatCalc.net Team Statistically reviewed by — Senior Statistician & Editor Last updated
Hypothesis Test

P-Value from r Calculator

Use this calculator to find the p-value associated with a Pearson correlation coefficient. Enter r and the sample size, select the alternative hypothesis, and get the p-value, t statistic, degrees of freedom, and a step-by-step solution.

Enter a value from −1 to 1.
Enter an integer greater than or equal to 3.

Step-by-Step Solution

How to Use the P-Value from r Calculator

This calculator computes the p-value from Pearson’s correlation coefficient (r) to help you determine whether the correlation is statistically significant or not.

To use the calculator:

  1. Enter the Pearson correlation coefficient, r.
  2. Enter the sample size, n.
  3. Select the alternative hypothesis.
  4. Choose the number of decimal places.
  5. Click Calculate.

The calculator will instantly return the p-value, t statistic, degrees of freedom, and a step-by-step solution. If you have the original paired X-Y data but have not yet calculated r, use the correlation coefficient calculator. However, if you want to compute a p-value from any other test statistic, say chi-square, z, or any other, our p-value calculator may be helpful.

Tip. In most cases, select ρ ≠ 0 (two-tailed). Use a right-tailed or left-tailed test only when the question or hypothesis specifically states that the expected correlation is positive or negative.

What Is the P-Value for Pearson’s r?

The p-value for Pearson’s correlation coefficient is used to test whether the observed sample correlation provides evidence of a linear correlation in the population.

For the usual test, the null hypothesis is H₀: ρ = 0, where ρ is the population correlation coefficient. This means that there is no linear correlation in the population.

The sample correlation coefficient, r, is converted to a t statistic, and the t distribution is then used to find the p-value.

A smaller p-value provides stronger evidence against H₀: ρ = 0. However, the p-value does not tell you whether the correlation is weak or strong. The strength and direction of the relationship are determined by r.

How to Calculate a P-Value from r

To find the p-value from Pearson’s correlation coefficient (r):

  1. Identify r, n, and the alternative hypothesis.
  2. Calculate the t statistic from r and n.
  3. Find the degrees of freedom using df = n − 2.
  4. Use the t distribution to find the p-value for the selected test direction.

Example

Suppose a study reports r = 0.62 and n = 24. Find the p-value for H₁: ρ ≠ 0.

Solution

To find the p-value for the test, follow these steps:

Step 1: Identify the Given Values

From the question, we have r = 0.62, n = 24, and H₁: ρ ≠ 0. Since the alternative hypothesis does not specify a positive or negative direction, this is a two-tailed test.

Step 2: Calculate the t Statistic

Here, we need to convert the correlation coefficient, r, to a t statistic.

The test statistic is: t=rn−21−r2t=r\sqrt{\frac{n-2}{1-r^2}}

Substituting r = 0.62 and n = 24 gives:

t = 0.62√[(24 − 2)/(1 − 0.62²)]

= 0.62√[22/(1 − 0.3844)]

= 0.62√(22/0.6156)

Therefore, t = 3.706412

Step 3: Find the Degrees of Freedom

For Pearson’s correlation, df = n − 2. Since n = 24, df = 24 − 2

= 22

Therefore, df = 22. You can also use the degrees of freedom calculator to find the degrees of freedom for Pearson correlation and other statistical tests.

Step 4: Find the P-Value

Since H₁: ρ ≠ 0, we need a two-tailed p-value. Thus, the p-value is: p = 2 x P(T ≥ |3.706412|) with df = 22. We can find this using the following Excel formula: =T.DIST.2T(ABS(3.706412),22), which gives p = 0.001231.

Therefore, p-value = 0.001231.

Should You Use a One-Tailed or Two-Tailed Test?

Most Pearson correlation tests are two-tailed. You will normally use H₁: ρ ≠ 0 unless the question or hypothesis specifically states that the expected correlation is positive or negative.

For example, if the question asks whether study time and exam scores are significantly correlated, you should use a two-tailed test since no direction has been specified. If the question asks whether study time is positively correlated with exam scores, use H₁: ρ > 0 and a right-tailed test. However, if it asks whether stress is negatively correlated with sleep duration, use H₁: ρ < 0 and a left-tailed test.

Note. A useful rule is to use a two-tailed test unless the question explicitly specifies a direction. Do not choose a one-tailed test simply because the observed value of r happens to be positive or negative.

How to Interpret the P-Value

The p-value tells you how compatible the observed correlation is with the null hypothesis H₀: ρ = 0. If you are performing a complete hypothesis test, compare the p-value with the significance level, α. For example, when α = 0.05, reject H₀ if p < 0.05 and fail to reject H₀ if p ≥ 0.05.

This calculator does not ask for α because its purpose is to calculate the p-value from r rather than perform the full Pearson correlation hypothesis test.

Frequently Asked Questions

What is a p-value from r calculator?

A p-value from r calculator uses Pearson’s correlation coefficient and sample size to calculate the corresponding t statistic, degrees of freedom, and p-value.

How do you find the p-value from Pearson’s r?

Calculate t = r√[(n − 2)/(1 − r²)], find the degrees of freedom using df = n − 2, and then use the t distribution to find the appropriate p-value.

Should I use a one-tailed or two-tailed test?

In most cases, use a two-tailed test. You should only use a one-tailed test when the question or hypothesis specifically states that the expected correlation is positive or negative.

Does a small p-value mean the correlation is strong?

No. The strength of the relationship is measured by r. A small p-value only indicates stronger evidence against H₀: ρ = 0.

Can I use the P Value Calculator instead?

Yes. The p value calculator can calculate p-values from several test statistics. This calculator is more direct when you specifically have Pearson’s r and sample size.

What does a p-value such as 4.28e−12 mean?

It means 4.28 × 10⁻¹². Scientific notation is used because the p-value is extremely small.

Cite

Choose APA, MLA, Chicago, or Harvard. Citations credit StatCalc.net as the corporate author.

StatCalc.net. (2026, October 15). Pearson r to P-value Calculator. Retrieved October 19, 2026, from https://statcalc.net/pearson-r-to-p-value-calculator/

About This Calculator

This calculator was developed by the StatCalc.net Team and statistically reviewed by , Senior Statistician & Editor.

Formulas, calculation logic, worked examples, and explanatory content are reviewed for statistical accuracy and clarity.