Skip to content

P-Value Calculator (z, t, Chi-Square, F)

P-value from a z, t, chi-square or F statistic, left-, right- or two-tailed, with the decision at your significance level.

Your details

Test statistic
Alternative hypothesis

0.05 means 5 %.

Results update as you type

P-value

0.0500

Decision
Significant: reject H₀
Left tail P(X ≤ x)
0.9750
Right tail P(X ≥ x)
0.0250

p = 0.0500 ≤ α = 0.05: the result is statistically significant at this level.

Step-by-step solution
  1. Z ~ N(0, 1)
  2. p = 2 × P(Z ≥ |1.96|) = 2 × 0.0250 = 0.0500

Decision at the usual significance levels

The p-value is the probability of getting a test statistic at least as extreme as the one you observed, assuming the null hypothesis H0H_0 is true. A small p-value means your data would be surprising under H0H_0; if it is at or below the significance level α\alpha you chose in advance, the result is called statistically significant and H0H_0 is rejected.

Most statistical tests end with one of four statistics, and this calculator converts any of them into a p-value:

  • z — tests on proportions, means with a known standard deviation, large-sample tests, the z-score of an observation;
  • Student's t — t-tests on means and regression coefficients, with its degrees of freedom;
  • chi-square χ² — goodness of fit, independence in contingency tables, a single variance;
  • Fisher's F — ANOVA, comparison of two variances, the overall regression test.

Enter the value of the statistic, the degrees of freedom when needed, and the direction of the alternative hypothesis. You get the p-value, the decision at your α\alpha, both tail probabilities and a quick table of decisions at 10 %, 5 %, 1 % and 0.1 %. Very small p-values are shown in scientific notation instead of being rounded to zero.

How to use this calculator

  1. Pick the distribution of your test statistic: z, t, χ² or F.
  2. Type the value of the statistic from your test output or hand calculation.
  3. Choose the alternative: right-tailed ("greater than"), left-tailed ("less than") or two-tailed ("different from"). Chi-square and ANOVA tests are almost always right-tailed.
  4. Enter the degrees of freedom — one value for t and χ², two for F. Not sure? Use the degrees of freedom calculator.
  5. Set α (0.05 by default) and read the p-value and decision.

The formula

With FF the cumulative distribution function of the statistic under H0H_0 and xx the observed value:

pleft=F(x)pright=1−F(x)ptwo=2min⁡(F(x), 1−F(x))p_{\text{left}} = F(x) \qquad p_{\text{right}} = 1 - F(x) \qquad p_{\text{two}} = 2\min\big(F(x),\ 1 - F(x)\big)

For z and t, symmetric around 0, the two-tailed value is P(∣X∣≥∣x∣)P(|X| \ge |x|). The distribution functions are evaluated with the regularized incomplete gamma function P(a,x)P(a, x) and beta function Ix(a,b)I_x(a, b) (DLMF §8.2, §8.17), using the series and continued fractions of Numerical Recipes §6.2–6.4:

Φ(z)=12erfc⁡ ⁣(−z2)P(∣Tν∣≥t)=Iνν+t2 ⁣(ν2,12)\Phi(z) = \tfrac12\operatorname{erfc}\!\left(-\tfrac{z}{\sqrt2}\right) \qquad P(|T_\nu| \ge t) = I_{\frac{\nu}{\nu + t^2}}\!\left(\tfrac{\nu}{2}, \tfrac12\right)
P(χk2≤x)=P ⁣(k2,x2)P(Fd1,d2≤x)=Id1xd1x+d2 ⁣(d12,d22)P(\chi^2_k \le x) = P\!\left(\tfrac{k}{2}, \tfrac{x}{2}\right) \qquad P(F_{d_1,d_2} \le x) = I_{\frac{d_1 x}{d_1 x + d_2}}\!\left(\tfrac{d_1}{2}, \tfrac{d_2}{2}\right)

Each tail is computed directly rather than as 1 minus the other, so p-values like 10−1210^{-12} keep their precision.

Worked example

z test, two-tailed. z=1.96z = 1.96 gives p=2×(1−Φ(1.96))=p = 2 \times (1 - \Phi(1.96)) = 0.0500 — the boundary of significance at 5 %. A right-tailed test with z=2.5z = 2.5 gives p=p = 0.0062.

t test. t=2.0t = 2.0 with 10 degrees of freedom, two-tailed: p=p = 0.0734. The same tt would be significant with zz, but not here: with only 11 observations the t distribution has heavier tails.

Chi-square. χ2=3.841\chi^2 = 3.841 with 1 degree of freedom: p=p = 0.0500, the familiar 5 % critical value. A 3 × 3 contingency table (4 df) with χ2=12.5\chi^2 = 12.5 gives p=p = 0.0140.

ANOVA F. F=4.2F = 4.2 with 2 and 27 degrees of freedom: p=p = 0.0258, significant at 5 %.

What a p-value is not

The American Statistical Association's 2016 statement lists the most common misreadings. A p-value is not the probability that H0H_0 is true, nor the probability that the result happened "by chance". It does not measure the size or importance of an effect: with a huge sample, a trivial difference gets a tiny p-value. And p>0.05p > 0.05 does not prove that there is no effect — only that the data cannot rule out H0H_0.

Report the exact p-value (for example p=0.034p = 0.034) rather than only "p<0.05p < 0.05", together with an effect size and a confidence interval. Decide on α\alpha and on one- or two-tailed testing before looking at the data; choosing them afterwards inflates false positives.

One-tailed or two-tailed?

A two-tailed test asks whether the parameter is different from the null value in either direction; a one-tailed test only looks in one direction stated in advance. For z and t, the one-tailed p-value is half the two-tailed one when the statistic lies on the predicted side — tempting, but justified only when an effect in the opposite direction would be treated exactly like no effect.

Chi-square tests of independence or goodness of fit and ANOVA F tests are right-tailed by construction: any departure from H0H_0 makes the statistic larger. A left-tailed chi-square p-value is used only in special cases, such as checking whether data fit a model suspiciously well.

Frequently asked questions

How do I get a p-value from a z-score?

For a two-tailed test, p = 2 × (1 − Φ(|z|)), where Φ is the standard normal distribution function. For z = 1.96 this gives 0.0500. For a right-tailed test, p = 1 − Φ(z); for a left-tailed test, p = Φ(z).

Is p = 0.05 significant?

By the usual convention a result is significant when p ≤ α, so p = 0.05 is exactly on the boundary at α = 0.05. In practice, a value that close to the threshold is weak evidence either way and should be reported as it is.

Why do I need degrees of freedom?

The t, chi-square and F distributions are families of curves; the degrees of freedom select the member. The same t = 2.0 gives p ≈ 0.073 with 10 df but p ≈ 0.048 with 100 df.

What is the difference between the p-value and α?

α is a threshold you fix before the study — the false-positive rate you accept. The p-value comes from the data. You reject H₀ when p ≤ α.

Why does the calculator show p in scientific notation?

Very small p-values, such as 3.2 × 10⁻⁹, would round to 0.0000 with four decimals. A p-value is never exactly zero, so the calculator keeps its order of magnitude visible.

Sources

Last updated:

More Statistics calculators

People also use