Home / Tools / p-value Calculator
p-value Calculator
A p-value calculator turns a test statistic into the probability of seeing something at least that extreme when the null hypothesis is true. Pick the distribution your statistic follows, t, z, chi-square, F or a correlation r, type the value with any degrees of freedom, and read the p-value off a shaded curve. You get a plain-English verdict against your alpha, an APA-ready report line and the matching R code. Flip to reverse mode to turn alpha back into a critical value.
I want to get a p-value from a t statistic
p = 0.02967
How this value is computed
✓ No data leaves your browser
✓ Verified against R's pt(), pnorm(), pchisq(), pf() and qt()
✓ Free, no sign-up
What a p-value actually tells you
Three ideas that keep a p-value honest, whichever distribution you started from.
The p-value is the chance of a statistic at least as extreme as yours under the null hypothesis. It is an area under a curve, never a statement that the null is true or false.
Use two tails to ask whether an effect exists in either direction, one tail only when you fixed the direction in advance. Chi-square and F tests read the upper tail because their statistics are sums of squares.
A small p-value means the effect is hard to explain by chance, not that it is big or important. Pair it with an effect size and a confidence interval before you act on it.
Which distribution, which tail, which R call
| Test statistic | Follows | Usual tail | p-value in R | Critical value in R |
|---|---|---|---|---|
| One-sample / two-sample / paired t | t with df | two-tailed | 2 * pt(-abs(t), df) | qt(1 - a/2, df) |
| Large-sample z, proportion z | standard normal | two-tailed | 2 * pnorm(-abs(z)) | qnorm(1 - a/2) |
| Chi-square goodness of fit / independence | chi-square with df | upper | pchisq(x, df, lower.tail = FALSE) | qchisq(1 - a, df) |
| ANOVA / regression overall F | F with df1, df2 | upper | pf(f, df1, df2, lower.tail = FALSE) | qf(1 - a, df1, df2) |
| Pearson correlation r | t with n - 2 df | two-tailed | 2 * pt(-abs(r*sqrt((n-2)/(1-r^2))), n-2) | solve qt(1 - a/2, n-2) for r |
Every row here is exactly what the calculator computes above. A one-tailed p-value for a symmetric statistic (t, z or r) is simply half the two-tailed value, provided your statistic points in the hypothesised direction; if it points the other way the one-tailed p-value is above 0.5.
p-value questions
How do I calculate a p-value from a test statistic?
Choose the distribution your statistic follows, enter the value plus any degrees of freedom, and pick the number of tails. The p-value is the area of that distribution beyond your statistic. For a two-tailed t test it is 2 * pt(-abs(t), df); for an upper-tail chi-square test it is pchisq(x, df, lower.tail = FALSE). The tool shades exactly that area on the curve.
What is the difference between a one-tailed and a two-tailed p-value?
A two-tailed p-value counts both tails beyond the magnitude of your statistic, testing for an effect in either direction. A one-tailed p-value counts a single tail and, for symmetric t, z and r statistics, is exactly half the two-tailed value when the statistic falls in the predicted direction. Only choose one tail if you committed to the direction before seeing the data. Chi-square and F tests are one-tailed on the upper side by construction.
Is the p-value the probability the null hypothesis is true?
No. The p-value assumes the null is true and reports how surprising your data would be under that assumption. It does not give the probability that the null is true, the probability you made an error, or the size of the effect. Reading it as any of those is the most common misuse of the number.
What does p < 0.05 mean?
It means that if the null hypothesis were true, a result at least as extreme as yours would happen less than 5% of the time, so you reject the null at the 5% significance level. The 0.05 threshold is a convention, not a law of nature; report the exact p-value and let readers judge, and remember that a p just under 0.05 is weak evidence.
How do I get a p-value from a correlation coefficient r?
Convert the Pearson r on n observations to t = r * sqrt((n - 2) / (1 - r^2)) with n - 2 degrees of freedom, then read the t p-value. That is the exact test cor.test() runs. Select the r mode above, enter r and n, and the calculator shows the transformed t alongside the p-value.
Is a p-value the probability that the null hypothesis is true?
No. A p-value is the probability of observing a statistic at least as extreme as yours if the null hypothesis were true. It says nothing directly about the probability that the null is true, nor about the size or importance of an effect. A tiny p-value with a trivial effect size is common in large samples.
How do I turn a p-value into a critical value?
Switch to the critical-value mode and enter your significance level alpha. The tool inverts the distribution to return the cutoff a statistic must beat to be significant. For a two-tailed t test at alpha = 0.05 with 24 df it is qt(0.975, 24) = 2.064; a statistic beyond that magnitude rejects the null.
Does this p-value calculator match R?
Yes. Every p-value and critical value comes from the same routines checked against R's pt(), pnorm(), pchisq(), pf(), qt(), qnorm(), qchisq() and qf() across more than 2000 cases, including extreme statistics and p-values that underflow, to better than seven significant figures.
Does this p-value calculator match R and my textbook?
Yes. Every result comes from routines checked against R's pt(), pnorm(), pchisq(), pf(), qt(), qnorm(), qchisq() and qf() across more than 2000 cases, including huge statistics and p-values that underflow toward zero. Small differences from an old printed table are rounding in the book, not here.