How to calculate a p-value
A p-value is the tail area beyond your test statistic under the distribution the null hypothesis predicts. Pick the distribution your test uses, enter the statistic and its degrees of freedom, choose one or two tails, and the area is the p-value.[1]
| Your test | Statistic | Degrees of freedom |
|---|---|---|
| Test for a mean with known σ, or a proportion | z | none |
| One-sample, two-sample or paired t-test | t | n − 1, n₁ + n₂ − 2, or Welch df |
| Chi-square goodness of fit | χ² | categories − 1 |
| Chi-square test of independence | χ² | (rows − 1)(columns − 1) |
| One-way ANOVA | F | groups − 1 and N − groups |
Worked example
A t-test gives t = 2.1 with 24 degrees of freedom. The area to the right of 2.1 is 0.0232; a two-tailed test doubles it: p = 0.0464. Since 0.0464 < 0.05, the result is significant at the 5% level, but not at 1%.
One-tailed or two-tailed?
Use a two-tailed p-value when the alternative hypothesis says “different” (≠) and a one-tailed p-value only when it says “greater than” or “less than” and that direction was chosen before seeing the data. A two-tailed p-value is twice the one-tailed value for z and t. Chi-square and F tests are right-tailed by construction, because large values are the evidence against the null.[4][5]
Reading the result: significance and α
If the p-value is below your significance level α, reject the null hypothesis; otherwise do not reject it. α is the chance of a Type I error you accept in advance, usually 0.05.[2] The calculator states the decision at your α and shows it at 0.10, 0.05 and 0.01 at once.
What a p-value is notThe American Statistical Association’s statement on p-values lists the common misreadings: a p-value is not the probability that the null hypothesis is true, it does not measure the size of an effect, and a single “p < 0.05” should not be the only basis of a conclusion.[1] Report the effect size or a confidence interval alongside it.
Critical values for comparison
A statistic beyond the critical value has p below α. The two-sided 5% critical value of z is 1.96; for t it is larger with few degrees of freedom and approaches 1.960 as df grows.[6][3]
| df | α = 0.10 | α = 0.05 | α = 0.01 |
|---|---|---|---|
| 1 | 6.314 | 12.706 | 63.657 |
| 2 | 2.92 | 4.303 | 9.925 |
| 5 | 2.015 | 2.571 | 4.032 |
| 10 | 1.812 | 2.228 | 3.169 |
| 15 | 1.753 | 2.131 | 2.947 |
| 20 | 1.725 | 2.086 | 2.845 |
| 25 | 1.708 | 2.06 | 2.787 |
| 30 | 1.697 | 2.042 | 2.75 |
| 60 | 1.671 | 2 | 2.66 |
| 120 | 1.658 | 1.98 | 2.617 |
| ∞ (z) | 1.645 | 1.96 | 2.576 |
To run the whole test from your data, use the t-test calculator; for a z-score from raw values, the z-score calculator; for an interval instead of a yes/no answer, the confidence interval calculator.
Common p-value mistakes
- Doubling a chi-square p-value. Chi-square and F tests are already one-sided.
- Using z when σ is unknown and n is small. Use t with the right degrees of freedom.
- Writing p = 0. A p-value is never exactly 0; write p < 0.0001 or give it in scientific notation, as the calculator does (for example 1.973 × 10−9 for z = 6).
- Treating 0.051 and 0.049 as opposite results. They carry almost the same evidence.
How we check this calculator
Tail areas come from the regularized incomplete gamma function (normal and chi-square) and the regularized incomplete beta function (t and F). Tests check them against NIST critical values: t = 2.228139 with 10 df and χ² = 3.841459 with 1 df must each give exactly 0.05, F = 4.964603 with 1 and 10 df must give 0.05, and z = 1.96 must give 0.0499958.[6]
- 14 November 2026: page and calculator published.
More statistics calculators
- Statistics calculatorMean, median, mode, SD, quartiles and outliers
- Standard deviation calculatorSample and population SD, step by step
- Z-score calculatorz, percentile and area under the normal curve
- Confidence interval calculatorMeans and proportions, t or z
- t-test calculatorOne-sample, Welch, pooled and paired
- Binomial distribution calculatorExactly, at most, at least x successes
Frequently asked questions
How do I find a p-value from a t statistic?
Choose t, enter the statistic and the degrees of freedom, and pick the tail. For t = 2.1 with 24 df, the two-tailed p-value is 0.0464.
What is the p-value for a z-score of 1.96?
0.05 two-tailed and 0.025 one-tailed. That is why 1.96 is the 5% two-sided cut-off.
Is a p-value of 0.05 significant?
At α = 0.05 the rule is p < α, so p = 0.050 exactly is not below 0.05. In practice, report the exact value and the confidence interval rather than relying on the cut-off.
How do I get a chi-square p-value?
Choose chi-square, enter the statistic and the degrees of freedom. The p-value is the right-tail area: χ² = 7.81 with 3 df gives p = 0.0501.
What does a small p-value mean?
That data like yours would be unusual if the null hypothesis were true. It does not say how large or important the effect is.
Sources
- The ASA Statement on p-Values: Context, Process, and Purpose (Wasserstein and Lazar)
- Introductory Statistics 2e, 9.2 Outcomes and the Type I and Type II Errors
- 1.3.6.6.4 t Distribution
- 1.3.6.6.6 Chi-Square Distribution
- 1.3.6.6.5 F Distribution
- 1.3.6.7.2 Critical Values of the Student’s t Distribution