P-Value Calculator
Turn a z, t, chi-square or F statistic into a p-value, or α into a critical value, one- or two-tailed, on a shaded curve.
Decimals allowed; ∞ for z
0.03145
Significant at α = 0.05: p is below α, so the null hypothesis is rejected.
- Critical values at α = 0.05
- ±2.228
- Reject the null hypothesis when
- |t| > 2.228
Working
Enter a test statistic and its degrees of freedom to get the p-value, whether it is significant at your α, and the critical value it is compared with. Switch to Critical value for the value a statistic has to pass at a given α, the number a printed t, chi-square or F table gives, here for any degrees of freedom and any α.
What a p-value says
The p-value is the chance of a statistic at least this extreme if the null hypothesis is true. A small p-value means the data would be unusual under that hypothesis, so the hypothesis is rejected when p falls below the significance level α chosen in advance, most often 0.05. The tool says which side of α the p-value falls, and the critical value gives the same verdict: a statistic past it has a p-value below α.
A p-value is not the chance that the null hypothesis is true, and it does not measure how large or important an effect is: a tiny difference measured on a huge sample can give a tiny p-value. Report the effect itself beside it, with its confidence interval.
How to use it
Choose the distribution your test produces: z for a z-test, t for a t-test or a regression coefficient, χ² for a chi-square test and F for ANOVA or a comparison of variances. t and χ² take their degrees of freedom, F a numerator and a denominator; any number above 0 works, decimals included, and t also takes ∞, which is z. χ² and F take up to 10,000,000 degrees of freedom; past that, t is computed as z.
z and t are two-tailed to start, and also right-tailed or left-tailed; χ² and F are right-tailed to start, or left-tailed. α is typed or set to 0.10, 0.05, 0.01, 0.001 in one click, and 5% reads as 0.05. A p-value is shown to 4 significant figures, in scientific notation below 0.0001, and with more figures where 4 would round it onto α. A critical value is shown as tables print it, to 3 decimals, and copies with 10 significant figures. Nothing you enter leaves your browser.
How it is worked out
Each distribution's tail is a special function. The z tail is the normal CDF Φ. The t-distribution's two tails together are the regularised incomplete beta function Iₓ(ν/2, ½) at x = ν/(ν + t²), and an F tail is Iₓ(d₁/2, d₂/2) at x = d₁F/(d₁F + d₂). A chi-square tail is the regularised incomplete gamma function at k/2 and χ²/2. The tool evaluates these directly, by the continued fractions and series of the NIST Digital Library of Mathematical Functions (DLMF 8.17.22, 8.7.1, 8.9.2), rather than reading a table.
Each tail is computed from its own side, so a p-value of 10⁻⁷⁰ keeps its figures instead of becoming 1 − 1. A two-tailed p-value for t is the beta function itself, not double a rounded tail. A critical value is the point whose tail equals α, found by Newton's method from a normal approximation, to about 12 significant figures. Against the NIST e-Handbook's printed t, chi-square and F tables, the values agree in every entry but a few, where the printed value is off in its last place.
Two-tailed p = 2 × P(T > |t|) = Iₓ(ν/2, ½), x = ν ÷ (ν + t²)
Right-tailed p (χ²) = Q(k/2, χ²/2)
Right-tailed p (F) = 1 − Iₓ(d₁/2, d₂/2), x = d₁F ÷ (d₁F + d₂)
Two-tailed critical value: the t with α/2 above it
Examples
A t-test with t = 2.5 and 10 degrees of freedom
Two-tailed, with α = 0.05, the p-value is 0.03145. Significant at α = 0.05: p is below α, so the null hypothesis is rejected.
- The two-tailed p-value is the chance of a t at least 2.5 from 0 on either side, if the null hypothesis is true. p = 2 × P(T₁₀ > 2.5)
- The t-distribution's tails are a regularised incomplete beta function of x = ν ÷ (ν + t²). x = 10 ÷ (10 + 2.5²) ≈ 0.6154
- Iₓ(ν ÷ 2, ½) is the area beyond ±t together. p = Iₓ(5, 0.5) ≈ 0.03145
- Compare p with the significance level α. p ≈ 0.03145 < 0.05, so the result is significant
A chi-square of 7.8 with 3 degrees of freedom
Right-tailed, the p-value is 0.05033, just above 0.05: the statistic falls short of the critical value 7.815, so it is not significant at α = 0.05.
The critical F at α = 0.05 for 3 and 12 degrees of freedom
Right-tailed, the critical value is 3.490: reject the null hypothesis when F > 3.490.
- A right-tailed test puts all of α in the upper tail.
- The critical value is the point with that area beyond it, found by solving the incomplete beta function for it. P(F₃,₁₂ > F) = 0.05: F ≈ 3.490
- A statistic past it falls in the rejection region. Reject the null hypothesis when F > 3.490
Critical value tables
| df | α = 0.2 | α = 0.1 | α = 0.05 | α = 0.02 | α = 0.01 | α = 0.001 |
|---|---|---|---|---|---|---|
| 1 | 3.078 | 6.314 | 12.706 | 31.821 | 63.657 | 636.619 |
| 2 | 1.886 | 2.920 | 4.303 | 6.965 | 9.925 | 31.599 |
| 3 | 1.638 | 2.353 | 3.182 | 4.541 | 5.841 | 12.924 |
| 4 | 1.533 | 2.132 | 2.776 | 3.747 | 4.604 | 8.610 |
| 5 | 1.476 | 2.015 | 2.571 | 3.365 | 4.032 | 6.869 |
| 6 | 1.440 | 1.943 | 2.447 | 3.143 | 3.707 | 5.959 |
| 7 | 1.415 | 1.895 | 2.365 | 2.998 | 3.499 | 5.408 |
| 8 | 1.397 | 1.860 | 2.306 | 2.896 | 3.355 | 5.041 |
| 9 | 1.383 | 1.833 | 2.262 | 2.821 | 3.250 | 4.781 |
| 10 | 1.372 | 1.812 | 2.228 | 2.764 | 3.169 | 4.587 |
| 11 | 1.363 | 1.796 | 2.201 | 2.718 | 3.106 | 4.437 |
| 12 | 1.356 | 1.782 | 2.179 | 2.681 | 3.055 | 4.318 |
| 13 | 1.350 | 1.771 | 2.160 | 2.650 | 3.012 | 4.221 |
| 14 | 1.345 | 1.761 | 2.145 | 2.624 | 2.977 | 4.140 |
| 15 | 1.341 | 1.753 | 2.131 | 2.602 | 2.947 | 4.073 |
| 16 | 1.337 | 1.746 | 2.120 | 2.583 | 2.921 | 4.015 |
| 17 | 1.333 | 1.740 | 2.110 | 2.567 | 2.898 | 3.965 |
| 18 | 1.330 | 1.734 | 2.101 | 2.552 | 2.878 | 3.922 |
| 19 | 1.328 | 1.729 | 2.093 | 2.539 | 2.861 | 3.883 |
| 20 | 1.325 | 1.725 | 2.086 | 2.528 | 2.845 | 3.850 |
| 21 | 1.323 | 1.721 | 2.080 | 2.518 | 2.831 | 3.819 |
| 22 | 1.321 | 1.717 | 2.074 | 2.508 | 2.819 | 3.792 |
| 23 | 1.319 | 1.714 | 2.069 | 2.500 | 2.807 | 3.768 |
| 24 | 1.318 | 1.711 | 2.064 | 2.492 | 2.797 | 3.745 |
| 25 | 1.316 | 1.708 | 2.060 | 2.485 | 2.787 | 3.725 |
| 26 | 1.315 | 1.706 | 2.056 | 2.479 | 2.779 | 3.707 |
| 27 | 1.314 | 1.703 | 2.052 | 2.473 | 2.771 | 3.690 |
| 28 | 1.313 | 1.701 | 2.048 | 2.467 | 2.763 | 3.674 |
| 29 | 1.311 | 1.699 | 2.045 | 2.462 | 2.756 | 3.659 |
| 30 | 1.310 | 1.697 | 2.042 | 2.457 | 2.750 | 3.646 |
| 40 | 1.303 | 1.684 | 2.021 | 2.423 | 2.704 | 3.551 |
| 60 | 1.296 | 1.671 | 2.000 | 2.390 | 2.660 | 3.460 |
| 120 | 1.289 | 1.658 | 1.980 | 2.358 | 2.617 | 3.373 |
| ∞ (z) | 1.282 | 1.645 | 1.960 | 2.326 | 2.576 | 3.291 |
| df | α = 0.1 | α = 0.05 | α = 0.025 | α = 0.01 | α = 0.001 |
|---|---|---|---|---|---|
| 1 | 2.706 | 3.841 | 5.024 | 6.635 | 10.828 |
| 2 | 4.605 | 5.991 | 7.378 | 9.210 | 13.816 |
| 3 | 6.251 | 7.815 | 9.348 | 11.345 | 16.266 |
| 4 | 7.779 | 9.488 | 11.143 | 13.277 | 18.467 |
| 5 | 9.236 | 11.070 | 12.833 | 15.086 | 20.515 |
| 6 | 10.645 | 12.592 | 14.449 | 16.812 | 22.458 |
| 7 | 12.017 | 14.067 | 16.013 | 18.475 | 24.322 |
| 8 | 13.362 | 15.507 | 17.535 | 20.090 | 26.124 |
| 9 | 14.684 | 16.919 | 19.023 | 21.666 | 27.877 |
| 10 | 15.987 | 18.307 | 20.483 | 23.209 | 29.588 |
| 11 | 17.275 | 19.675 | 21.920 | 24.725 | 31.264 |
| 12 | 18.549 | 21.026 | 23.337 | 26.217 | 32.909 |
| 13 | 19.812 | 22.362 | 24.736 | 27.688 | 34.528 |
| 14 | 21.064 | 23.685 | 26.119 | 29.141 | 36.123 |
| 15 | 22.307 | 24.996 | 27.488 | 30.578 | 37.697 |
| 16 | 23.542 | 26.296 | 28.845 | 32.000 | 39.252 |
| 17 | 24.769 | 27.587 | 30.191 | 33.409 | 40.790 |
| 18 | 25.989 | 28.869 | 31.526 | 34.805 | 42.312 |
| 19 | 27.204 | 30.144 | 32.852 | 36.191 | 43.820 |
| 20 | 28.412 | 31.410 | 34.170 | 37.566 | 45.315 |
| 25 | 34.382 | 37.652 | 40.646 | 44.314 | 52.620 |
| 30 | 40.256 | 43.773 | 46.979 | 50.892 | 59.703 |
| 40 | 51.805 | 55.758 | 59.342 | 63.691 | 73.402 |
| 50 | 63.167 | 67.505 | 71.420 | 76.154 | 86.661 |
| 100 | 118.498 | 124.342 | 129.561 | 135.807 | 149.449 |
Sources
The tables and their use follow the NIST/SEMATECH e-Handbook of Statistical Methods; the special functions follow the NIST Digital Library of Mathematical Functions.
Sources
- NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.6.7.2 Critical values of Student's t distribution — National Institute of Standards and Technology
- NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.6.7.3 Upper critical values of the F distribution — National Institute of Standards and Technology
- NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.6.7.4 Critical values of the chi-square distribution — National Institute of Standards and Technology
- NIST Digital Library of Mathematical Functions, 8.17 Incomplete beta functions — National Institute of Standards and Technology
Reviewed
Frequently asked questions
See also
- T-Test Calculator — to run the t-test itself from raw data or means, with the confidence interval and effect size.
- Z-Score Calculator — for a value's z-score and percentile under a normal curve.
- Sample Size Calculator — for the sample a survey or study needs at a confidence level.