P-value Calculator: Z, T, Chi-Square, F

A p-value is the chance of getting a test result at least as extreme as yours if the null hypothesis is true. A t statistic of 2.1 with 20 degrees of freedom gives a two-tailed p-value of 0.0486176, which is significant at the 0.05 level. Pick the test, enter the statistic and degrees of freedom, and choose the tails.

Type a number and the answer appears straight away.

Your answer

P-value0.0486176two-tailed, t(20) = 2.1

Significant at alpha = 0.05?
Yes: p < 0.05, reject the null hypothesis
P-value as a percentage
4.8618%
Left-tail probability P(X ≤ statistic)
0.975691
Right-tail probability P(X ≥ statistic)
0.0243088
Critical value at alpha = 0.05
±2.08596

The p-value is the chance of a result at least this extreme if the null hypothesis is true. It is not the chance that the null hypothesis is true.

The math behind it: P-value

Two-tailed p = 2 × min(P(X ≤ s), P(X ≥ s)); right-tailed p = P(X ≥ s); left-tailed p = P(X ≤ s)

The calculator finds the area in the tail of the test's distribution beyond your statistic. A z statistic uses the standard normal curve, a t statistic uses Student's t with your degrees of freedom, a chi-square statistic uses the chi-square distribution and an F statistic uses the F distribution with numerator and denominator degrees of freedom. The probabilities come from the incomplete gamma and beta functions and are accurate to many decimal places.

A two-tailed test asks whether the result differs in either direction, so it doubles the smaller tail. For z = 1.96 the two-tailed p-value is 0.0499958, which is why 1.96 is the usual 5% cut-off. A one-tailed test looks in one direction only: z = −1.645 gives a left-tailed p-value of 0.0499849. Chi-square and F tests are almost always right-tailed, because large values are the ones that count against the null hypothesis.

The calculator also gives the critical value, the statistic that would give a p-value exactly equal to alpha. At alpha = 0.05 it is ±2.08596 for a two-tailed t test with 20 degrees of freedom, 3.84146 for chi-square with 1 degree of freedom and 4.9646 for F with 1 and 10 degrees of freedom. These match the standard printed tables: t = 2.228 with 10 degrees of freedom gives p = 0.0500118, and chi-square = 11.07 with 5 degrees of freedom gives 0.0500096.

If p is below alpha, the result is called statistically significant and the null hypothesis is rejected. A p-value is not the chance that the null hypothesis is true, and a small one does not show that an effect is large or important. To get a z-score from raw data first, use the z-score calculator. The confidence interval calculator gives a range for a mean, the sample size calculator plans how much data to collect, and the standard deviation calculator measures spread.

Common questions

How do you calculate a p-value from a t statistic?

Find the area in the t distribution beyond your statistic, using your degrees of freedom, and double it for a two-tailed test. t = 2.1 with 20 degrees of freedom gives a two-tailed p-value of 0.0486176.

What does a p-value of 0.05 mean?

If the null hypothesis were true, a result at least this extreme would happen 5% of the time. Results below 0.05 are usually called statistically significant. It does not mean there is a 95% chance your hypothesis is right.

What is the p-value for a z-score of 1.96?

0.0499958 two-tailed, or 0.0249979 one-tailed. That is why 1.96 is the critical value for 95% confidence.

Is a p-value of 0.03 significant?

At the usual 0.05 level, yes, because 0.03 is below 0.05. At a stricter 0.01 level it is not. Choose the level before you look at the data.

How do you find the p-value for a chi-square test?

Use the right tail of the chi-square distribution with your degrees of freedom. A chi-square statistic of 3.841 with 1 degree of freedom gives p = 0.0500137, just above 0.05.

Should I use a one-tailed or two-tailed test?

Use two-tailed unless you decided in advance that only one direction matters. A one-tailed p-value is half the two-tailed one for z and t tests, so choosing it after seeing the data overstates the evidence.

You might also need

Checked and updated: