P-value calculator

This p value calculator turns a test statistic into a p-value. Enter a z score, a t score with its degrees of freedom, or a chi-square value, pick one- or two-tailed, and it shows the probability, the working and whether the result is significant.

  • z, t and chi-square tests
  • Two-tailed, right-tailed or left-tailed
  • Compares the p-value with your significance level

Last updated

Find the p-value

Test statistic
Tails
P-value 0.0500 p = 2 × P(Z ≥ |1.96|) = 2 × 0.024998 = 0.049996
0.049996 < α = 0.05, so the result is statistically significant at the 0.05 level.
Exact p
0.049996
Left tail
0.975002
Right tail
0.024998
Decision at α
Reject H₀

How to use the p-value calculator

  1. Pick the kind of test statistic you have: z (normal), t (Student’s t) or chi-square.
  2. Enter the statistic. For t and chi-square, also enter the degrees of freedom (n − 1 for a one-sample t test).
  3. Choose two-tailed if your alternative hypothesis says “not equal”, right-tailed for “greater than”, left-tailed for “less than”. Chi-square tests are right-tailed.
  4. Read the p-value and the decision at your significance level (0.05 unless your course says otherwise).

How the p-value is calculated

The p-value is the probability of getting a test statistic at least as extreme as yours if the null hypothesis is true. It is an area under the curve of the test’s distribution.

right-tailed: p = P(X ≥ x)    left-tailed: p = P(X ≤ x)    two-tailed: p = 2 × P(X ≥ |x|)

X follows the standard normal distribution for a z test, Student’s t distribution with the given degrees of freedom for a t test, and the chi-square distribution for a chi-square test. The calculator computes these areas directly (normal and chi-square through the incomplete gamma function, t through the incomplete beta function), so it is more exact than a printed table.

Worked example

A two-tailed z test gives z = 1.96. What is the p-value?

  1. Area to the right of 1.96 under the standard normal curve: P(Z ≥ 1.96) = 0.024998.
  2. Two-tailed, so double it: p = 2 × 0.024998 = 0.049996, which rounds to 0.0500.
  3. 0.049996 is just under α = 0.05, so the result is significant at the 0.05 level.

Two more checks against the tables: t = 2.228 with 10 degrees of freedom gives a two-tailed p of 0.0500, and a chi-square of 3.841 with 1 degree of freedom gives p = 0.0500.

Critical values at common significance levels

If your statistic is beyond the critical value, p is below α. These values are from the NIST/SEMATECH tables.

Testα = 0.05α = 0.01
z, two-tailed±1.960±2.576
z, one-tailed1.6452.326
t, 10 df, two-tailed±2.228±3.169
t, 30 df, two-tailed±2.042±2.750
χ², 1 df3.8416.635
χ², 2 df5.9919.210
χ², 5 df11.07015.086

Reading a p-value

  • p < α: reject the null hypothesis. The data would be unusual if the null hypothesis were true.
  • p ≥ α: do not reject the null hypothesis. This is not proof that the null hypothesis is true; the data just is not strong enough evidence against it.
  • A p-value is not the probability that the null hypothesis is true, and a small p-value does not mean the effect is large or important.

Common questions

How do you calculate a p-value from a z score?

Find the area beyond the z score under the standard normal curve. For a two-tailed test, double it. z = 1.96 has 0.025 in each tail, so the two-tailed p-value is 0.0500.

How do you find a p-value from a t score?

Use the t distribution with the right degrees of freedom (n − 1 for one sample). t = 2.228 with 10 df gives a two-tailed p of 0.0500; the same t with 30 df gives about 0.034.

How do you get a p-value from a chi-square value?

Take the area to the right of the chi-square value, using its degrees of freedom. χ² = 3.841 with 1 df gives p = 0.0500; with 2 df the same value gives p = 0.147.

What is the difference between a one-tailed and a two-tailed p-value?

A one-tailed test counts only one direction; a two-tailed test counts both, so its p-value is twice the one-tailed value for z and t. z = 1.96 is p = 0.025 one-tailed and 0.0500 two-tailed.

Is a p-value of 0.05 significant?

At α = 0.05 a result is significant when p is below 0.05. A p of exactly 0.050 sits on the line; many courses treat p ≤ α as significant, so check your course’s rule.

How do I calculate a p-value in Excel?

Two-tailed from z: =2*(1-NORM.S.DIST(ABS(z),TRUE)). From t: =T.DIST.2T(ABS(t),df). From chi-square: =CHISQ.DIST.RT(x,df).

Sources

See the methodology page for how Studyfigure builds and checks its calculators.