calc-hub logocalc-hub.net

P-value Calculator

Enter a z-score, a t-score, a chi-square statistic or an F statistic, with its degrees of freedom where it has them, and choose the tail of your test. The calculator returns the p-value to four decimals, or says "below 0.0001" when it is too small for them, and says whether it falls below 0.05. The p-value is the probability of a result at least as extreme as yours if the null hypothesis is true.

How to use the P-value Calculator

  1. Enter your numbers in the P-value Calculator above.
  2. Press the Calculate p-value button to see the result.
  3. To try other numbers, change any value and press the button again.

The p-value of a z, t, chi-square or F statistic

Two-tailed: p = 2 × (1 − Φ(|z|)) · · · Left-tailed: p = Φ(z) · · · Right-tailed: p = 1 − Φ(z) · · · For t, replace Φ with the t distribution with ν degrees of freedom · · · Chi-square, right-tailed: p = Q(ν ÷ 2, χ² ÷ 2) · · · F, right-tailed: p = I(ν₂ ÷ (ν₂ + ν₁F); ν₂ ÷ 2, ν₁ ÷ 2)

Φ is the cumulative standard normal distribution, the area under the bell curve to the left of z. A two-tailed test counts both tails beyond |z|. A one-tailed test counts only the tail in the direction of the alternative hypothesis. A right-tailed test always takes the area to the right of z, so a negative z gives a p-value above 0.5. The t distribution has heavier tails than the normal curve, so the same score gives a larger p-value, and the gap shrinks as the degrees of freedom grow. Q is the regularized upper incomplete gamma function and I the regularized incomplete beta function. A chi-square or F statistic is never negative, so those tests take the area to the right of the statistic, or to the left for a test of unusually low values.

Worked example

A z-score of 2.33 in a two-tailed test gives p = 0.0198, about a 2% chance of a statistic this extreme if the null hypothesis is true. The same z-score in a right-tailed test gives 0.0099. Both are below 0.05, so the calculator marks them as significant. Enter −1.5 in a right-tailed test and the p-value is 0.9332, since most of the curve lies to the right of −1.5. For +1.5 it is 0.0668. A t-score of 2.5 with 20 degrees of freedom gives p = 0.0212 in a two-tailed test. A chi-square of 10 with 4 degrees of freedom gives p = 0.0404 in a right-tailed test.

Frequently asked questions

What does a p-value really mean?

It is the probability of seeing data at least as extreme as yours if the null hypothesis is true. It is not the probability that the null hypothesis is true, and it is not the probability that the result is due to chance.

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

Pick From a t-score, then enter the t statistic and its degrees of freedom. The same 2.5 gives 0.0124 as a z-score and 0.0212 as a t-score with 20 degrees of freedom, because the t distribution has heavier tails. With 1,000 degrees of freedom it gives 0.0126, close to the z-score result.

How do I get a p-value from a chi-square or F statistic?

Pick From a chi-square or From an F statistic, then enter the statistic and its degrees of freedom. A chi-square of 10 with 4 degrees of freedom gives 0.0404. An F of 4.5 with 3 and 20 degrees of freedom gives 0.0144. F has two degrees of freedom, one for the numerator and one for the denominator, and the order changes the answer. An F of 6.25 with 1 and 20 gives 0.0212, the same as the t-score of 2.5, because that F is the square of that t.

What degrees of freedom do I use?

For a one-sample or paired t-test, the sample size minus 1. For a two-sample test with equal variances, n₁ + n₂ − 2. A Welch test gives a decimal, such as 17.3, and the box takes that too.

Why does the calculator test against 0.05?

It is the most common cutoff, so the result box uses it. Nothing in the maths makes 0.05 special, and some fields demand a smaller one. Compare the p-value with the level your field or journal asks for.

What's the difference between one-tailed and two-tailed?

A two-tailed test asks whether the value differs in either direction. A one-tailed test asks only whether it is greater, or only whether it is smaller. For the same z-score the two-tailed p-value is twice the one-tailed one, which makes it the stricter test.

We use cookies

We use cookies to ensure you get the best experience on our website. For more information on how we use cookies, please see our cookie policy.

By clicking "Accept", you agree to our use of cookies.
Learn more.