01
How to calculate a p value
- Pick the statistic your test produced (your software or paper reports it as t, z, χ², F or r).
- Enter its value and the degrees of freedom. For a correlation, enter the number of pairs instead.
- For t, z and r, choose two-tailed unless you predicted the direction before collecting data.
- Read the p value. It updates as you type.
02
Which degrees of freedom to enter
| Test | Statistic | Degrees of freedom |
|---|---|---|
| One-sample or paired t-test | t | n − 1 |
| Two-sample t-test (equal variances) | t | n₁ + n₂ − 2 |
| Welch’s t-test | t | the Welch–Satterthwaite value your software reports |
| Chi-square test of independence | χ² | (rows − 1) × (columns − 1) |
| Chi-square goodness of fit | χ² | categories − 1 |
| One-way ANOVA | F | groups − 1 and N − groups |
| Pearson correlation | r | enter n; the test uses n − 2 |
| z-test | z | none |
03
What a p value means
The p value is the probability of getting a result at least as extreme as yours if the null hypothesis (no effect, no difference) were true. A small p value means the data would be surprising under that assumption.
It is not the probability that the null hypothesis is true, and it says nothing about how large or important an effect is. The American Statistical Association’s statement on p values makes both points (Wasserstein and Lazar, 2016). Report the effect size and a confidence interval next to it.
04
One-tailed or two-tailed
A two-tailed p value counts extreme results in both directions; a one-tailed value counts one direction only. For a symmetric statistic the one-tailed p is half the two-tailed p when the result lies in the predicted direction.
two-tailed: p = 2 × P(T ≥ |t|)
right-tailed: p = P(T ≥ t) · left-tailed: p = P(T ≤ t)
Chi-square and F tests measure departure from the null in one direction by construction, so their p value is always the right tail.
05
Worked examples
| Input | p value | Reported as |
|---|---|---|
| t = 2.00, df = 10, two-tailed | 0.0734 | t(10) = 2.00, p = .073 |
| z = 1.96, two-tailed | 0.0500 | z = 1.96, p = .050 |
| χ² = 5.99, df = 2 | 0.0500 | χ²(2) = 5.99, p = .050 |
| F = 4.00, df = 2 and 20 | 0.0346 | F(2, 20) = 4.00, p = .035 |
| r = .50, n = 20, two-tailed | 0.0248 | r(18) = .50, p = .025 |
06
p value for a correlation
A Pearson correlation is tested by converting r to a t statistic on n − 2 degrees of freedom:
t = r × √(n − 2) ÷ √(1 − r²)
With many pairs, even a weak correlation gets a small p value, so judge r itself as well. For comparing two group means, use the t-test calculator.
07
Common mistakes when reading a p value
- The wrong degrees of freedom. For t = 2.10 from two groups of 13, df is 24 and p = 0.0464; entering n − 1 = 12 gives 0.0575, and the result seems to lose significance.
- Treating t as z. The same t = 2.10 read as a z statistic gives 0.0357, smaller than the correct 0.0464, because the normal curve has thinner tails.
- Switching to one-tailed after seeing the data. t(10) = 2.00 is p = 0.0734 two-tailed; calling it 0.0367 one-tailed after the fact turns a non-significant result significant.
- Doubling a chi-square p value. Chi-square tests are one-sided by construction: χ²(2) = 5.99 gives p = 0.0500, not 0.1000.
Trust
How this page is checked
- The calculation runs on code with automated tests against worked reference values. Every number in the examples on this page was produced by that same code, not typed by hand.
- The formulas and conventions used are stated on the page, so you can reproduce the result yourself or compare it with your own software.
- Last reviewed by the Sciloom team, Zebra Nine Studio Inc. It is a tool for research and teaching, not a substitute for a statistician, a validated lab method or medical advice.
Cite this page
Sciloom. (2026). P value calculator. Zebra Nine Studio Inc. https://sciloom.si/p-value-calculator
Frequently asked questions
How do I find the p value from a t score?
Choose t, enter the t value and its degrees of freedom, and pick one- or two-tailed. The calculator returns the area of the t distribution beyond your value.
What does p < 0.05 mean?
If there were truly no effect, a result at least as extreme as yours would occur less than 5% of the time. It does not mean there is a 95% chance the effect is real.
How do I report a p value in APA style?
Give the exact value to three decimals without a leading zero, such as p = .031, and write p < .001 for anything smaller. The calculator formats this line for you.
Can a p value be zero?
No. It can be extremely small, which is why very small values are written as p < .001 rather than p = .000.