P-Value Calculator
Convert a test statistic into a p-value — z, t or chi-square, one-tailed or two.
A p-value is the probability of a result at least as extreme as the one observed, if the null hypothesis were true.
How the p-value calculator works
A p-value is the probability of a result at least as extreme as the one observed, if the null hypothesis were true. It is not the probability that the null is true, and it is not the probability that your finding is a fluke — those readings are the two most common misinterpretations in published research.
Which distribution you need depends on the test. z for large samples or a known population variance, t for a sample standard deviation with n−1 degrees of freedom, chi-square for goodness of fit and contingency tables.
The tails here are computed exactly, through the regularised incomplete gamma and incomplete beta functions, rather than by a normal approximation — the approximations are worst precisely in the small samples people bring to this page.
Formula: two-tailed p = 2 × P(T > |t|)
Worked examples
| Inputs | p-value | Note |
|---|---|---|
| t = 2.31 with 24 df, two-tailed | 0.02980124 | p = 0.0298 — significant |
| z = 1.96, two-tailed | 0.04999565 | p = 0.05, the textbook threshold |
| χ² = 3.84 with 1 df | 0.04999999 | p = 0.05 |
FAQFrequently asked questions
What is a p-value?
The probability of seeing a result at least as extreme as yours if the null hypothesis were true.
Does p < 0.05 mean my result is true?
No. It means data this extreme would be uncommon under the null. It says nothing about the probability the null is true, nor about effect size.
One-tailed or two?
Two-tailed unless you committed to a direction before seeing the data. Switching after the fact halves the p-value and invalidates it.
What degrees of freedom do I use?
n − 1 for a one-sample t-test; for chi-square, (rows − 1)(columns − 1) in a contingency table.
Why is chi-square only upper-tailed?
Because it measures squared deviation, so only large values indicate a poor fit. A very small χ² suggests the data fit suspiciously well, which is a different concern.
Where these figures come from
- NIST Digital Library of Mathematical Functions — reference definitions for elementary and special functions
- Wolfram MathWorld — definitions and formulas for every topic on this page
- NIST/SEMATECH e-Handbook of Statistical Methods — the statistical formulas (mean, variance, z, confidence intervals, sample size)
- Australian Curriculum (ACARA) — Mathematics — the terms and methods taught in Australian schools
Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.