Skip to content
Statculator
Hypothesis Tests

Pearson’s Correlation Test Calculator

Free Pearson’s correlation calculator: test if r is significant from raw data or r and n. Get t, df, the p-value, critical r, a Fisher-z CI and APA output.

Free, no sign-up Runs in your browserBy Hira Noor, BS MathematicsUpdated

Try

Right-tailed tests for a positive correlation, left-tailed for a negative one.

Usually 0.05 or 0.01.

Data input
Paired data
#xyRemove row
1
2
3
4
5
6
7
8
9
10
11
12
Tip: paste rows straight from a spreadsheet.

One row per subject: x and y measured on the same unit. Paste two columns from a spreadsheet.

The test assumes a linear relationship and roughly bivariate-normal data. Check a scatter plot for curves and outliers.

Results

Correlation, r
0.8043
p-value
0.0016
Two-tailed, df = 10
t statistic
4.2808

Reject H₀ at α = 0.05

p = 0.0016 ≤ 0.05. At the 5% level there is sufficient evidence that the variables are linearly correlated (ρ ≠ 0).

Number of pairs, n
12
Degrees of freedom, n − 2
10
r²
0.647
Critical t (α = 0.05)
±2.2281
Critical r (α = 0.05)
±0.576
95% CI for ρ (Fisher z)
(0.428, 0.943)
Fisher z = atanh(r)
1.1108
Strength (rule of thumb)
strong positive

Interpretation: r = 0.804 is a strong positive linear relationship; x explains about 64.7% of the variation in y (r²). A correlation this far from zero would be unlikely with n = 12 if the variables were unrelated. In APA style: r(10) = .80, p = .002, 95% CI [.43, .94].

Scatter plot of 12 points with fitted line606570758085y123456789x(2, 65)(4, 62)(5, 74)(3, 70)(6, 68)(8, 85)(7, 72)(9, 80)(1, 60)(5, 78)(6, 71)(3, 66)r = 0.804
Line: least-squares trend line. Check that the points follow a straight-line pattern with no extreme outliers before relying on r and the p-value.

Deviation and cross-product table

#xyx − x̄y − ȳ(x − x̄)(y − ȳ)
1265-2.9167-5.916717.2569
2462-0.9167-8.91678.1736
35740.08333.08330.2569
4370-1.9167-0.91671.7569
56681.0833-2.9167-3.1597
68853.083314.083343.4236
77722.08331.08332.2569
89804.08339.083337.0903
9160-3.9167-10.916742.7569
105780.08337.08330.5903
116711.08330.08330.0903
12366-1.9167-4.91679.4236
Σ5985100159.9167

Step-by-step solution

  1. 1

    State the hypotheses

    This is a two-tailed test.

    H₀: ρ = 0
    H₁: ρ ≠ 0
  2. 2

    Choose the significance level

    α = 0.05
  3. 3

    Find the means of x and y

    x̄ = 59 / 12 = 4.9167
    ȳ = 851 / 12 = 70.9167
  4. 4

    Find the sums of squares and cross-products

    The table below the results lists every deviation and product.

    Sxx = Σ(x − x̄)² = 64.9167
    Syy = Σ(y − ȳ)² = 608.9167
    Sxy = Σ(x − x̄)(y − ȳ) = 159.9167
  5. 5

    Calculate Pearson’s r

    r = Sxy / √(Sxx × Syy) = 159.9167 / √(64.9167 × 608.9167) = 0.8043
  6. 6

    Calculate the test statistic

    t = r √(n − 2) / √(1 − r²) = 0.8043 × √10 / √(1 − 0.8043²) = 4.2808
  7. 7

    Find the p-value

    Use the t distribution with df = n − 2 = 12 − 2 = 10.

    p = 2 × P(t ≥ |4.2808|) = 0.0016
  8. 8

    Find the critical value

    Critical value: ±2.2281
    Reject H₀ if |t| ≥ 2.2281
  9. 9

    Decision: reject H₀

    At the 5% level there is sufficient evidence that the variables are linearly correlated (ρ ≠ 0).

    p = 0.0016 ≤ α = 0.05
  10. 10

    Equivalent critical value of r

    Converting the critical t back to the r scale lets you compare r directly.

    r* = t* / √(t*² + df) = ±2.2281 → ±0.576
    Reject H₀ if |r| ≥ 0.576
  11. 11

    95% confidence interval for ρ (Fisher z)

    z = atanh(r) = ½ ln[(1 + r)/(1 − r)] = 1.1108
    SE = 1 / √(n − 3) = 1 / √9 = 0.3333
    z ± 1.96 × SE = (0.4574, 1.7641)
    Back-transform with tanh: (0.428, 0.943)
  12. 12

    Write up the result (APA style)

    r(10) = .80, p = .002, 95% CI [.43, .94]

What is a Pearson’s Correlation Test Calculator?

A Pearson’s correlation test calculator tells you whether the linear correlation between two variables is statistically significant, that is, whether the population correlation ρ differs from zero. Enter paired (x, y) data or just r and n. It converts r into t = r√(n − 2) / √(1 − r²) with n − 2 degrees of freedom and returns the p-value, the critical r, a 95% Fisher-z confidence interval for ρ and an APA-style result.

What the Pearson’s Correlation Test Calculator does

This Pearson’s correlation calculator (also called a correlation significance calculator or a Pearson r p-value calculator) runs the full significance test. From raw data or from r and n it returns r, r², t, df, the p-value, the critical values of t and r, and the reject or retain decision. It also gives a 95% Fisher-z confidence interval for ρ, a rule-of-thumb strength label, a ready-to-paste APA-style result and, for raw data, a scatter plot with the trend line and the deviation and cross-product table used to compute r.

Use it to decide whether an observed association, such as study hours and exam score or temperature and energy use, is more than sampling noise. The Correlation Coefficient Calculator focuses on computing and interpreting r itself, and the Pearson r to P-Value Calculator is a quick r-to-p lookup; this page runs the whole hypothesis test with every step shown. For ranked data, or a curved relationship that only ever rises or only ever falls, use the Spearman Correlation Calculator.

How to use the Pearson’s Correlation Test Calculator

  1. Choose the alternative hypothesis: two-tailed for any correlation, right-tailed for a positive one, left-tailed for a negative one. Decide this before looking at the data.
  2. Set the significance level α (0.05 unless you have a reason to use another).
  3. Choose Raw data (x, y) and enter one row per subject, or paste two columns from a spreadsheet. If a paper or your software already gives the correlation, choose r and n instead.
  4. Look at the scatter plot of your data for a straight-line pattern and outliers, then read r, the p-value and the decision. Check the confidence interval to see how precisely ρ is estimated, and copy the APA-style line from the results or the last step.

How to calculate Pearson’s correlation and test it by hand

These are the steps the calculator shows in its step-by-step solution, using the built-in example: hours of study (x) and exam score (y) for n = 12 students.

  1. Find the means: x̄ = 59 / 12 = 4.9167 and ȳ = 851 / 12 = 70.9167.
  2. For every pair, subtract the means and multiply the deviations. Sum the squares and products: Sxx = Σ(x − x̄)² = 64.9167, Syy = Σ(y − ȳ)² = 608.9167, Sxy = Σ(x − x̄)(y − ȳ) = 159.9167.
  3. Compute Pearson’s r: r = Sxy / √(Sxx × Syy) = 159.9167 / √(64.9167 × 608.9167) = 0.8043.
  4. Convert r into a t statistic: t = 0.8043 × √10 / √(1 − 0.8043²) = 4.2808, with df = n − 2 = 10.
  5. Find the p-value from the t distribution with 10 df: two-tailed p = 0.0016. Equivalently, compare |r| with the critical r for n = 12 at α = 0.05, which is 0.5760.
  6. Decide and report: p ≤ 0.05, so reject H₀. In APA style, r(10) = .80, p = .002, 95% CI [.43, .94].

How to find Pearson’s r on a calculator, in Excel or in SPSS

Most tools give you r but not the significance test, so you can compute r wherever is convenient and then enter r and n above to get t, the p-value and the confidence interval.

ToolHow to get rDoes it test significance?
TI-83 / TI-84Turn on DiagnosticOn, enter x in L1 and y in L2, then run STAT → CALC → LinReg(ax+b). For the test, use STAT → TESTS → LinRegTTest.Yes, with LinRegTTest (t, p, df and r)
Casio scientificChoose the two-variable regression mode (y = a + bx), enter the pairs, then read r from the regression results.No, enter r and n here
Excel / Google Sheets=CORREL(A2:A13, B2:B13) or =PEARSON(...) returns r.No built-in p-value for r; enter r and n here
SPSSAnalyze → Correlate → Bivariate, tick Pearson.Yes, “Sig. (2-tailed)” is the p-value
R / Pythoncor.test(x, y) in R; scipy.stats.pearsonr(x, y) in Python.Yes, both return t or r, p and a Fisher-z CI

Pearson’s r formula and the correlation t-test

Pearson’s r
r = Σ(x − x̄)(y − ȳ) / √[Σ(x − x̄)² · Σ(y − ȳ)²]
Hypotheses
H₀: ρ = 0 vs H₁: ρ ≠ 0 (or ρ > 0, ρ < 0)
Test statistic
t = r √(n − 2) / √(1 − r²), df = n − 2
Critical r
r* = t* / √(t*² + n − 2)
Fisher-z interval
tanh[ atanh(r) ± z* / √(n − 3) ]
Formula symbols
SymbolMeaning
rsample correlation coefficient
ρpopulation correlation; H₀ says ρ = 0
nnumber of (x, y) pairs
t*, z*critical values of t (df = n − 2) and of the standard normal

Pearson’s r is the covariance of x and y divided by the product of their standard deviations, so it has no units and always lies between −1 and 1. The t-test is exact for ρ = 0 under bivariate normality. The Fisher-z interval is approximate and is the method used by R’s cor.test and SciPy. Critical values of r are tabulated in the r critical value table.

Worked example

Worked example: testing a reported correlation

Problem. A study of n = 30 employees reports r = 0.42 between weekly training hours and a productivity score. Is the correlation significant at α = 0.05 (two-tailed)?

  1. 01Hypotheses: H₀: ρ = 0 against H₁: ρ ≠ 0.
  2. 02t = 0.42 × √28 / √(1 − 0.42²) = 2.2224 / 0.9075 = 2.4489 with df = 28.
  3. 03Two-tailed p-value = 2 · P(T₂₈ ≥ 2.4489) ≈ 0.0208.
  4. 04Critical t = ±2.0484, so the critical r is 2.0484 / √(2.0484² + 28) = ±0.3610; r = 0.42 exceeds it.
  5. 05Fisher z = atanh(0.42) = 0.4477, SE = 1 / √27 = 0.1925.
  6. 0695% CI for ρ: tanh(0.4477 ± 1.96 × 0.1925) = (0.0704, 0.6777).

Answer. Reject H₀ (p ≈ 0.021): the positive correlation is statistically significant, r(28) = .42, p = .021, 95% CI [.07, .68]. The interval is wide, from almost no relationship (0.07) to a strong one (0.68), so the size of the effect is still uncertain with 30 people.

How to interpret r, the p-value and the confidence interval

The sign of r gives the direction: positive when y tends to rise with x, negative when it tends to fall. The size of |r| gives the strength of the straight-line relationship, and r² is the share of the variation in y that a straight line in x accounts for. The labels below are a common rule of thumb, used in the results panel; what counts as strong depends on the field.

The p-value is the probability of a correlation at least this far from zero if ρ were really 0. It is not the probability that the correlation is real, and a small p-value says nothing about strength; see what a p-value means. The 95% confidence interval shows the range of plausible values for ρ. It is asymmetric because it is built on the Fisher z scale, and with small samples it is often wide even when the test is significant.

|r|Rule-of-thumb labelr² (variance explained)
under 0.1Negligibleunder 1%
0.1 to 0.3Weak1% to 9%
0.3 to 0.5Moderate9% to 25%
0.5 to 0.7Fairly strong25% to 49%
0.7 and aboveStrong49% and above

Critical values of r for common sample sizes

A correlation is significant at the 5% level (two-tailed) when |r| is at least the critical value for your n. The critical r falls as the sample grows, which is why large samples make even weak correlations significant. The full set, with other α levels, is in the r critical value table, and the Pearson r Critical Value Calculator gives any n.

Pairs, ndf = n − 2Critical r (α = 0.05, two-tailed)
530.8783
1080.6319
12100.5760
20180.4438
30280.3610
50480.2787
100980.1966

How to report a Pearson correlation in APA style

APA style reports the correlation with its degrees of freedom in brackets, then the p-value: r(df) = .80, p = .002. Because r cannot exceed 1, it is written without a leading zero, rounded to two decimals; p is given to three decimals, and very small values as p < .001. Adding the confidence interval for ρ, as the calculator does, tells readers how precise the estimate is.

A full sentence might read: “Hours of study were strongly and positively correlated with exam score, r(10) = .80, p = .002, 95% CI [.43, .94].” State a one-tailed test if you used one.

Sources and how the results were checked

The worked example, the hand calculation above and the three built-in examples were checked against SciPy’s pearsonr (which uses the same t-test and Fisher-z interval as R’s cor.test); r, t, p and the confidence limits agree to the four decimals shown.

Common use cases

  • Checking whether a correlation found in a sample is likely to exist in the population.
  • Testing a correlation reported in a paper, or from Excel’s CORREL, when only r and n are given.
  • Writing up a correlation for a thesis, lab report or psychology assignment in APA format.
  • Screening candidate predictors before building a regression model.
  • Validating a measurement by its correlation with an established instrument.

Assumptions and limitations

  • Linearity: Pearson’s r measures straight-line association only. A strong curved relationship can give r near 0. Always look at a scatter plot.
  • Outliers: one extreme point can create or hide a correlation, especially with small n.
  • Normality and independence: the p-value assumes independent pairs from a roughly bivariate-normal population; for ordinal data or outliers, Spearman’s rank correlation is more robust.
  • H₀ is ρ = 0 only. This page does not test whether ρ equals some other value or whether two correlations differ; those need the Fisher-z method directly.
  • Correlation is not causation, and significance is not strength: with large n, even r = 0.1 is significant. Report r and its confidence interval.

Frequently asked questions

How do you calculate Pearson’s correlation?

Subtract the mean of x from each x value and the mean of y from each y value, multiply each pair of deviations and add them up to get Sxy. Do the same with the squared deviations to get Sxx and Syy. Then r = Sxy / √(Sxx × Syy). Entering the pairs above shows every step and the deviation table.

What is Pearson’s r formula?

Pearson’s r = Σ(x − x̄)(y − ȳ) / √[Σ(x − x̄)² · Σ(y − ȳ)²]. It is the covariance of x and y divided by the product of their standard deviations, so it always lies between −1 and 1. To test it, use t = r√(n − 2) / √(1 − r²) with n − 2 degrees of freedom.

How do you find Pearson’s r on a calculator?

On a TI-83 or TI-84, turn on DiagnosticOn, put x in L1 and y in L2 and run LinReg(ax+b); r appears with the slope and intercept, and LinRegTTest also gives the p-value. On a Casio, use the two-variable regression mode. In Excel, use =CORREL(x range, y range). You can then enter r and n here for the significance test.

How do you test if a correlation is significant?

Convert r into a t statistic with t = r√(n − 2) / √(1 − r²) and compare it with the t distribution on n − 2 degrees of freedom. If the p-value is at or below α, the correlation is statistically significant. Equivalently, compare |r| with the critical r for your sample size.

What are the null and alternative hypotheses for a Pearson correlation test?

The null hypothesis is H₀: ρ = 0, no linear correlation in the population. The two-tailed alternative is H₁: ρ ≠ 0; the one-tailed alternatives are ρ > 0 for a positive correlation and ρ < 0 for a negative one.

What is the critical value of r?

The critical value of r is the smallest |r| that would be significant for a given n and α. It comes from the critical t: r* = t* / √(t*² + n − 2). For n = 30 and a two-tailed α = 0.05 it is about 0.361, and it shrinks as n grows.

What are the degrees of freedom for a correlation test?

The degrees of freedom are n − 2, where n is the number of pairs. Two are lost because the straight line that r describes is fixed by two estimated parameters, a slope and an intercept. With 30 pairs, df = 28.

Why use the Fisher z transformation?

The sampling distribution of r is skewed, especially when ρ is far from 0, so a symmetric r ± margin interval is wrong. Fisher’s z = atanh(r) is approximately normal with standard error 1/√(n − 3); building the interval on the z scale and transforming back with tanh gives a better, asymmetric interval for ρ.

Can a weak correlation be statistically significant?

Yes. With large samples even small correlations become significant: for n = 400, r = 0.1 gives p ≈ 0.046 two-tailed. Significance says the correlation is unlikely to be exactly zero, not that it is strong or useful.

Should I use Pearson or Spearman correlation?

Use Pearson when both variables are numeric, the relationship looks like a straight line on a scatter plot and there are no extreme outliers. Use Spearman’s rank correlation for ordinal data, for a curved relationship that keeps rising or falling, or when outliers would dominate r.

Cite this page

Statculator. (2026, November 14). Pearson’s Correlation Test Calculator. Retrieved November 14, 2026, from https://statculator.com/hypothesis-tests/pearsons-correlation-test-calculator/