P-Value Calculator
p-values and critical values for z, t, chi-square and F
Turn a z, t, chi-square or F statistic into an exact one-tailed or two-tailed p-value, or find the critical value for any significance level and degrees of freedom, with the tail area drawn on the curve.
Statistics & ProbabilityUpdated October 21, 2026Checked against 12 reference values
Usually 0.05 or 0.01
Examples
p-value for z = 2.1, two-tailed
0.0357Significant at α = 0.05
Moderate evidence against H₀. Reject the null hypothesis.
- Left-tail area
- 0.9821
- Right-tail area
- 0.0179
- Critical value
- −1.96, 1.96
- α = 0.05
The p-value as a tail area
Working
- 1
Test statistic and distribution
z = 2.1 under H₀, two-tailed - 2
Tail areas
P(z ≤ 2.1) = 0.9821; P(z ≥ 2.1) = 0.0179 - 3
p-value
p = 2 × P(z ≥ |2.1|) = 0.0357 - 4
Compare with α
0.0357 < 0.05, so reject H₀ (equivalently, reject H₀ if z < −1.96 or z > 1.96)
What a p-value measures
A p-value is the probability, computed on the assumption that the null hypothesis is true, of getting a test statistic at least as extreme as the one you observed. Small values mean your data would be unusual if the null hypothesis held, which is why a p-value below the significance level α leads you to reject it. The calculator takes the statistic your test produced (z, t, chi-square or F), the degrees of freedom and the direction of the test, and returns the exact tail area together with the critical value for comparison.
The second mode works in reverse. Choose a distribution, a tail and α, and it returns the critical value or values that bound the rejection region. This replaces the printed z, t, chi-square and F tables in the back of a statistics textbook, and it works for any α and any degrees of freedom, including fractional ones such as the Welch t-test produces.
How each tail area is computed
For the symmetric z and t distributions, a two-tailed p-value doubles the area beyond the absolute value of the statistic:
two-tailed p = 2 × P(T ≥ |t|) right-tailed p = P(T ≥ t) left-tailed p = P(T ≤ t)
Here T follows the standard normal distribution for a z-test or Student's t distribution with ν degrees of freedom for a t-test. Chi-square and F statistics cannot be negative and their distributions are skewed, so most tests built on them (goodness of fit, independence, ANOVA, regression F) use the right tail only. When you do need both tails, as in a test of a single variance, the calculator doubles the smaller of the two tail areas:
two-tailed p = 2 × min(P(X ≤ x), P(X ≥ x))
The areas come from the regularized incomplete beta function (t and F) and the regularized incomplete gamma function (chi-square), following the algorithms in Numerical Recipes, and from the complementary error function for z. Right-tail areas are computed directly rather than as one minus the cumulative probability, so a p-value of 10⁻¹⁰ keeps its leading digits instead of rounding to zero. Critical values invert the same functions: for a two-tailed test at α the bounds are the α/2 and 1 − α/2 quantiles.
Worked examples
A z-test, two-tailed and one-tailed
A z statistic of 2.1 leaves 0.0179 of the standard normal curve to its right. A two-tailed test counts both tails, so p = 2 × 0.0179 = 0.0357, below 0.05. If the hypothesis had been directional and set before seeing the data, the right-tailed p-value would be 0.0179.
A t-test with 30 degrees of freedom
A two-sample comparison gives t = 2.5 with 30 degrees of freedom. The two-tailed p-value is 0.0181, and the critical value at α = 0.05 is ±2.042. The statistic is beyond it, so the difference is significant at the 5% level but not at 1%.
A chi-square goodness-of-fit test
A survey with four answer categories gives χ² = 7.81 on 3 degrees of freedom. The right-tail p-value is 0.0501, just over 0.05, because 7.81 sits almost exactly on the 5% critical value of 7.8147. Results this close to the line are a reminder that α is a convention, not a cliff edge.
An ANOVA F statistic
The NIST/SEMATECH e-Handbook one-way ANOVA example (three levels, five observations each) reports F = 9.59 with 2 and 12 degrees of freedom. The calculator gives p = 0.0032, against a critical F of 3.885 at α = 0.05.
A test of one variance, two-tailed
With 25 measurements and a claimed variance, the statistic (n − 1)s²/σ₀² comes out at 9.2 on 24 degrees of freedom. That value is in the left tail, so the two-tailed p-value is twice the left-tail area: 0.0057. The two critical values at α = 0.05 are 12.401 and 39.364, and 9.2 falls below the lower one, so the variance is smaller than claimed.
Two-tailed critical values of t
Every value in this table is computed by the same engine the calculator uses. As the degrees of freedom grow, t approaches the standard normal values in the last row.
| df | α = 0.1 | α = 0.05 | α = 0.02 | α = 0.01 |
|---|---|---|---|---|
| 1 | 6.314 | 12.706 | 31.821 | 63.657 |
| 2 | 2.92 | 4.303 | 6.965 | 9.925 |
| 5 | 2.015 | 2.571 | 3.365 | 4.032 |
| 10 | 1.812 | 2.228 | 2.764 | 3.169 |
| 20 | 1.725 | 2.086 | 2.528 | 2.845 |
| 30 | 1.697 | 2.042 | 2.457 | 2.75 |
| 60 | 1.671 | 2 | 2.39 | 2.66 |
| 120 | 1.658 | 1.98 | 2.358 | 2.617 |
| z (infinite df) | 1.645 | 1.96 | 2.326 | 2.576 |
What a p-value does not tell you
The American Statistical Association's 2016 statement on p-values lists the most common misreadings, and they are worth checking before you report a result:
- A p-value is not the probability that the null hypothesis is true, and 1 − p is not the probability that your hypothesis is right.
- It does not measure the size or importance of an effect. A tiny difference measured on a huge sample can give p below 0.001; report an effect size and a confidence interval alongside it.
- The threshold α is a decision rule chosen in advance. A p-value of 0.049 and one of 0.051 carry almost the same evidence.
- Choosing a one-tailed test after seeing which way the data point halves the p-value and inflates the false positive rate. Decide the direction before collecting data.
The evidence wording in the result (weak, moderate, strong, very strong) is a common convention tied to the 0.10, 0.05, 0.01 and 0.001 cut-offs, not a formal standard.
Precision and limits
Results are accurate to roughly 12 significant digits for ordinary inputs, more than any printed table. p-values below 0.0001 are shown in scientific notation. Degrees of freedom may be fractional and up to ten million; for very large df the t distribution is numerically indistinguishable from z. The calculator assumes your statistic really does follow the stated distribution under the null hypothesis, which depends on the assumptions of the test that produced it (independent observations, approximate normality, expected counts of at least about five for chi-square), so check those first.
P-Value Calculator: common questions
What does p < 0.05 mean?
If the null hypothesis were true, data at least as extreme as yours would turn up less than 5% of the time. By convention that is enough to reject the null hypothesis at the 5% level. It does not mean there is a 5% chance the null hypothesis is true, and it says nothing about how large or important the effect is.
Should I use a one-tailed or a two-tailed p-value?
Use two tails when a difference in either direction would matter, which is the usual case. A one-tailed test is justified only when the direction was fixed before the data were collected and an effect in the other direction would be treated the same as no effect. Switching to one tail after seeing the data halves the p-value and is a form of p-hacking.
Why are chi-square and F tests usually right-tailed?
Both statistics measure squared discrepancies, so larger values always mean more disagreement with the null hypothesis and values near zero mean a very good fit. The evidence against the null therefore sits in the right tail. A two-tailed chi-square p-value is used mainly for testing whether a single variance equals a stated value.
How do I find a critical value instead of a p-value?
Switch the mode to Critical value, pick the distribution and tail, and enter α and the degrees of freedom. For a two-tailed test the calculator splits α equally between the tails, so at α = 0.05 it returns the 2.5% and 97.5% points. Reject the null hypothesis when your statistic falls beyond the critical value.
Why does software sometimes report p = 0?
Every finite statistic from a continuous distribution has a p-value above zero, but it can be smaller than the program can display. Report it as below a bound, for example p < 0.0001, together with the statistic and degrees of freedom. This calculator shows tiny p-values in scientific notation instead of rounding them to zero.
What should I report alongside a p-value?
Give the test statistic with its degrees of freedom, the exact p-value, an effect size such as Cohen's d or eta squared, and a confidence interval for the effect. Together these show both whether an effect is distinguishable from noise and how large it is likely to be.
Sources
- NIST/SEMATECH e-Handbook of Statistical Methods, section 1.3.6.7, Tables for probability distributions (normal, t, F, chi-square)
- Press, Teukolsky, Vetterling and Flannery, Numerical Recipes, 3rd ed., Cambridge University Press, 2007, sections 6.2 and 6.4 (incomplete gamma and beta functions)
- Wasserstein, R. L. and Lazar, N. A. (2016), The ASA Statement on p-Values: Context, Process, and Purpose, The American Statistician 70(2), 129-133
Related calculators
- T-Test CalculatorRun a one-sample, two-sample (Welch or pooled) or paired t-test from your data. Get t, degrees of freedom, the p-value, a confidence interval for the difference, Cohen's d and every step.
- Z-Score CalculatorConvert a raw value to a z-score or back, find the value at any percentile, and get the probability between two values, with left-tail, right-tail and two-tailed areas under the normal curve.
- Chi-Square CalculatorRun a chi-square goodness of fit test or a test of independence on a contingency table. Get χ², the p-value, critical value, Cramér's V or Cohen's w, the G statistic, Yates' correction and cell residuals.
- ANOVA CalculatorCompare the means of two or more groups with a one-way ANOVA. Get the full ANOVA table, exact p-value, critical F, eta and omega squared, Bonferroni pairwise comparisons and Welch's ANOVA.
- Confidence Interval CalculatorCalculate confidence intervals for means (z and t-test) and proportions (Wald and Wilson). Shows margin of error, critical value, SE, step-by-step working, and a visual bell curve diagram.
- Normal Distribution CalculatorFind normal distribution probabilities below, above, between or outside values for any mean and standard deviation, or work backwards to the value for a percentile, with the area shaded on the curve.