P-Value Calculator
- Updated
- Formula shown
- Free, no sign-up
Results
p = 0.0329539 for t = 2.31 (df = 18), two-tailed: significant at α = 0.05
The p-value is the probability, if the null hypothesis and the model behind the test are true, of a statistic at least as extreme as 2.31. It is not the probability that the null hypothesis is true, and it does not measure the size or importance of an effect.
How to use the p-value calculator
- Choose the distribution your test uses: z for large-sample and proportion tests, t for means, chi-square for counts and variances, F for ANOVA and regression.
- Enter the test statistic and its degrees of freedom (two for F: numerator and denominator).
- Pick the alternative hypothesis (two-tailed, right or left) and your significance level α.
- Read the p-value, the decision at α and the critical value. Both tail areas are shown for reference.
How the p-value is calculated
Two-tailed, z or t: p = 2 × P(T ≥ |t|)
Two-tailed, χ² or F: p = 2 × min(P(T ≤ t), P(T ≥ t))
Significant at level α when p ≤ α
T stands for the test statistic's distribution under the null hypothesis and t for the value you observed. The tail areas come from the standard normal CDF, and from the regularized incomplete beta function (Student t and F) and incomplete gamma function (chi-square), evaluated with continued fractions. Each tail is computed directly rather than as 1 minus the other, so very small p-values such as 10⁻¹⁵ keep their accuracy. For the skewed chi-square and F distributions, doubling the smaller tail is the usual convention for two-sided tests of a variance.
Worked example
A two-sample t test with 18 degrees of freedom gives t = 2.31. The two-tailed p-value is 2 × P(T ≥ 2.31) = 0.03295, which is below α = 0.05, so the difference is statistically significant at the 5% level. Equivalently, 2.31 is beyond the critical value ±2.101. Had the hypothesis been one-sided in the predicted direction, the p-value would be 0.01648. It is not significant at α = 0.01.
What a p-value does and does not mean
In 2016 the American Statistical Association issued a formal statement on p-values, prompted by their widespread misuse (Wasserstein and Lazar, The American Statistician 70(2), 129–133). In short, it made six points:
- A p-value can indicate how incompatible the data are with a specified statistical model, such as a null hypothesis.
- It does not measure the probability that the hypothesis is true, or the probability that the data arose by chance alone.
- Scientific conclusions and business or policy decisions should not rest only on whether a p-value passes a threshold such as 0.05.
- Proper inference needs full reporting and transparency: report all the analyses you ran, not only the significant ones.
- A p-value, or statistical significance, does not measure the size of an effect or the importance of a result.
- By itself, a p-value is not a good measure of evidence about a model or hypothesis.
So p = 0.03 does not mean a 3% chance that the null hypothesis is true, and p = 0.20 does not show that there is no effect. A tiny, unimportant effect can be highly significant in a huge sample, and a large, important one can miss 0.05 in a small sample. Report the estimate and its confidence interval alongside the p-value.
p-values for common z statistics
| z | One-tailed p | Two-tailed p |
|---|---|---|
| 1.282 | 0.09992 | 0.1998 |
| 1.645 | 0.04998 | 0.09997 |
| 1.96 | 0.025 | 0.05 |
| 2.326 | 0.01001 | 0.02002 |
| 2.576 | 0.004998 | 0.009995 |
| 3 | 0.00135 | 0.0027 |
| 3.291 | 0.0004992 | 0.0009983 |
Chi-square critical values
Right-tail critical values: reject the null hypothesis when the statistic is larger than the value for your α.
| df | α = 0.1 | α = 0.05 | α = 0.01 | α = 0.001 |
|---|---|---|---|---|
| 1 | 2.706 | 3.841 | 6.635 | 10.828 |
| 2 | 4.605 | 5.991 | 9.210 | 13.816 |
| 3 | 6.251 | 7.815 | 11.345 | 16.266 |
| 4 | 7.779 | 9.488 | 13.277 | 18.467 |
| 5 | 9.236 | 11.070 | 15.086 | 20.515 |
| 6 | 10.645 | 12.592 | 16.812 | 22.458 |
| 8 | 13.362 | 15.507 | 20.090 | 26.124 |
| 10 | 15.987 | 18.307 | 23.209 | 29.588 |
| 15 | 22.307 | 24.996 | 30.578 | 37.697 |
| 20 | 28.412 | 31.410 | 37.566 | 45.315 |
Tips
- Decide the tail before looking at the data. Switching to one-tailed after seeing the result halves the p-value and inflates false positives.
- Get the degrees of freedom right. A one-sample t test has n − 1; a chi-square goodness-of-fit test with k categories has k − 1; a test of independence in an r × c table has (r − 1)(c − 1).
- Chi-square and F tests are usually right-tailed. Large values signal a poor fit or a real difference between groups.
- Running many tests? With 20 independent tests at α = 0.05 and no real effects, the chance of at least one false positive is 1 − 0.95²⁰ ≈ 64%; adjust α, for example with a Bonferroni correction.
For z-scores and percentiles without a test, use the z-score calculator, and to plan a study with enough precision, the sample size calculator.
Frequently asked questions
What is a p-value in simple terms?
It is the probability of getting a test statistic at least as extreme as yours if the null hypothesis, and every assumption of the test, were true. A small p-value means the data would be surprising under that model; it is not the probability that the null hypothesis is true.
How do you get a p-value from a z-score?
For a two-tailed test, double the area beyond |z| under the standard normal curve. z = 1.96 gives p = 2 × 0.025 ≈ 0.0500, and z = 2.58 gives p ≈ 0.0099. For a one-tailed test, use the single tail.
Should I use a one-tailed or two-tailed test?
Use two-tailed unless you decided before seeing the data that only one direction matters. The choice halves or doubles the p-value: t = 2.31 with 18 degrees of freedom gives p = 0.0330 two-tailed but 0.0165 one-tailed.
Does p < 0.05 prove my result is real?
No. The American Statistical Association’s 2016 statement warns that a p-value does not measure the size or importance of an effect, and that decisions should not rest only on whether p crosses a threshold. Report effect sizes and confidence intervals as well.
How do I find the p-value for a chi-square test?
Use the right tail of the chi-square distribution with the test’s degrees of freedom. A statistic of 11.07 with 5 degrees of freedom gives p ≈ 0.0500; a goodness-of-fit test with 6 categories has 5 degrees of freedom.