P-Value Calculator
Type your test statistic, pick z, t or chi-square and one or two tails…
Type your test statistic, pick z, t or chi-square and one or two tails, and see the p-value as the shaded tail of the curve.
ExampleP-value, two-tailed
0.0357
Below 0.05: significant at the 5% level, but not at 1%. Assuming the null hypothesis is true, a z statistic at least this extreme would occur 3.57% of the time.
Type your own statistic, or drag it along the curve.
Drag the statistic; the shaded tail is the p-value.
- P(z ≤ 2.1)
- 0.9821
- P(z ≥ 2.1)
- 0.0179
- Significant at 5%?
- Yes
How this works: 9 sources,
How this works
Method
A p-value is the probability of a result at least as extreme as yours if the null hypothesis (no effect, no difference) were true. It is the area in the tail of the statistic’s distribution beyond your value: under the standard normal curve for a z statistic, under Student’s t for a t statistic, and under chi-square for a chi-square statistic. Full method
Sources
- Wasserstein and Lazar, The ASA Statement on p-Values (The American Statistician, 2016)
- Wikipedia, Statistical significance
- NIST/SEMATECH e-Handbook of Statistical Methods
- Abramowitz and Stegun, Handbook of Mathematical Functions, chapters 6, 7 and 26 (1964)
- SciPy 1.18 scipy.stats (reference values for the tests)
- statsmodels 0.15 (reference values for the A/B test and regression intervals)
- Welch, The generalization of Student’s problem when several different population variances are involved (Biometrika) (1947)
- Fleiss, Levin and Paik, Statistical Methods for Rates and Proportions, 3rd edition (sample size for two proportions) (2003)
- Hyndman and Fan, Sample quantiles in statistical packages (The American Statistician) (1996)
How it’s tested
3 worked examples for this page are checked by automated tests before every release: given the inputs, the tool must show the expected answer.
Privacy
On your device. Nothing you enter or open leaves this browser. About privacy labels
Changes
- First published: live curves with draggable cut-offs, and tests on pasted data (t-tests, ANOVA, chi-square, Fisher’s exact, correlation, regression, A/B), checked against SciPy.
How to get a p-value from a test statistic
A p-value is the probability of a result at least as extreme as yours if the null hypothesis (no effect, no difference) were true. It is the area in the tail of the statistic’s distribution beyond your value: under the standard normal curve for a z statistic, under Student’s t for a t statistic, and under chi-square for a chi-square statistic.
For a two-tailed test, extreme results in either direction count, so the p-value is twice the smaller tail. A z of 2.1 has 0.0179 in its upper tail, so p = 0.0357. A t of 2.3 with 14 degrees of freedom has p ≈ 0.0374 two-tailed, a little more than z would give, because t has heavier tails when the sample is small.
Compare p with the significance level you chose in advance, usually 0.05: below it, the result is called statistically significant. A small p says the data would be surprising if there were no effect; it doesn’t say how big the effect is or the probability that the null hypothesis is true.
two-tailed p = 2 × P(Z ≥ |z|) · one-tailed p = P(Z ≥ z) or P(Z ≤ z)
- The American Statistical Association’s 2016 statement: p-values do not measure the probability that the studied hypothesis is true, or that the data were produced by chance alone. Source: Wasserstein and Lazar, The ASA Statement on p-Values (The American Statistician, 2016).
- Ronald Fisher suggested 0.05 as a convenient cut-off for significance in his 1925 book Statistical Methods for Research Workers. Source: Wikipedia, Statistical significance.
P-values for common z statistics
One-tailed and two-tailed p-values for a z statistic, from the standard normal distribution.
| z | One-tailed p | Two-tailed p | Significant at 5% (two-tailed)? |
|---|---|---|---|
| 1 | 0.1587 | 0.3173 | No |
| 1.282 | 0.0999 | 0.1998 | No |
| 1.5 | 0.0668 | 0.1336 | No |
| 1.645 | 0.05 | 0.1 | No |
| 1.96 | 0.025 | 0.05 | Yes |
| 2 | 0.0228 | 0.0455 | Yes |
| 2.326 | 0.01 | 0.02 | Yes |
| 2.5 | 0.0062 | 0.0124 | Yes |
| 2.576 | 0.005 | 0.01 | Yes |
| 3 | 0.0013 | 0.0027 | Yes |
Show all 13 rowsShow fewer
| 3.291 | 0.0005 | 0.001 | Yes |
| 4 | 3.17e-5 | 6.33e-5 | Yes |
| 5 | 2.87e-7 | 5.73e-7 | Yes |
Common questions
One-tailed or two-tailed?
Two-tailed unless you decided before seeing the data that only one direction matters. A one-tailed p is half the two-tailed one, so choosing it afterwards makes results look stronger than they are.
What does p = 0.03 mean?
If there were really no effect, data as extreme as yours would turn up about 3 times in 100. It is not a 3% chance that the null hypothesis is true, nor a 97% chance your idea is right.
Which distribution should I use?
z for large samples or a known population standard deviation, t for a mean or difference of means from a small sample (degrees of freedom n − 1, or as your test says), and chi-square for tests of counts in tables.