P-value calculator

P-value calculator

Convert z, t, chi-square, and F statistics into p-values using the distribution and tail area that match your statistical test.

Enter the observed statistic and the required degrees of freedom to calculate the p-value.

Interpreting the result

The p-value is the probability, under the selected null model, of observing a statistic in the chosen tail area that is at least as extreme as the statistic you entered. It is not the probability that the null hypothesis is true, and it is not the probability that the result happened by chance. A small p-value means the observed statistic is relatively unusual under the null model and assumptions.

What is this test?

This calculator does not create a test statistic from raw data. Instead, it takes a statistic that was already calculated by a statistical test and converts it into a tail probability. That tail probability is the p-value. The input can be a z statistic from a standard normal model, a t statistic with degrees of freedom, a chi-square statistic with degrees of freedom, or an F statistic with numerator and denominator degrees of freedom.

The distribution choice is not interchangeable. A statistic of 2 can mean different things under a normal distribution, a t distribution with few degrees of freedom, a chi-square distribution, or an F distribution. Degrees of freedom change the shape of the reference distribution, which changes the tail area. A p-value calculator is therefore only as trustworthy as the test statistic, degrees of freedom, and tail choice entered into it.

The p-value is a statement about the statistic under the null model. It is not a direct measure of effect size, scientific importance, practical value, or replication probability. It should be reported alongside the estimate that produced the statistic, the test definition, the sample size, and the assumptions that make the reference distribution reasonable.

When to use it

  • Use the z option when your test statistic follows a standard normal reference distribution, such as large-sample z tests or normal approximations.
  • Use the t option when your statistic follows a t distribution and you know the relevant degrees of freedom.
  • Use the chi-square option for tests where larger chi-square values indicate greater departure from the null model, such as many goodness-of-fit and independence tests.
  • Use the F option for variance-ratio tests and model comparison settings where the statistic follows an F distribution.
  • Use a two-sided tail only for symmetric z and t statistics when departures in either direction count as evidence against the null.

If you are unsure which distribution generated the statistic, step back to the original test rather than trying several options. The same number can produce several different p-values, and only one of them answers the statistical question implied by the model.

How it works

A p-value is a tail area. For a right-tail test, the calculator finds the probability that the reference distribution would produce a value greater than or equal to the observed statistic. For a left-tail test, it finds the probability of a value less than or equal to the observed statistic. For a two-sided z or t test, it doubles the smaller tail area because values equally extreme in either direction count against the null hypothesis.

p=2min{F(x),1F(x)}p = 2 \min\{F(x), 1 - F(x)\}

In the formula, F is the cumulative distribution function for the selected reference distribution, and x is the observed statistic. For chi-square and F tests, the common evidence direction is usually the right tail because larger statistics represent larger departures from the null model. Left-tail areas can still be useful in specialized settings, but they should be chosen because the test calls for them.

Worked example

Suppose a regression model comparison reports an F statistic of 3 with 2 numerator degrees of freedom and 20 denominator degrees of freedom. Because larger F statistics indicate stronger evidence against the null model in this setting, the correct p-value is a right-tail area. The calculator evaluates the F distribution with those two degrees-of-freedom values and returns the probability of seeing a statistic of 3 or larger if the null model were adequate.

That probability is not the probability that the bigger model is correct. It also does not say whether the extra predictors are practically useful. It tells you how unusual the observed F statistic would be under the null comparison. A complete interpretation would include the models being compared, the observed statistic, both degrees of freedom, the p-value, and the practical reason the model comparison matters.

Common mistakes

Using the wrong reference distribution

A z statistic, t statistic, chi-square statistic, and F statistic do not share the same tail areas. Choose the distribution from the original test definition.

Forgetting degrees of freedom

Degrees of freedom change the shape of t, chi-square, and F distributions. A statistic without its degrees of freedom is usually not enough to recover the correct p-value.

Choosing the tail after seeing the statistic

The tail direction belongs to the planned alternative hypothesis. Choosing it after observing the result makes the evidence look cleaner than the analysis plan supports.

Treating p < 0.05 as the whole conclusion

A threshold can be useful, but it cannot replace the estimate, assumptions, design quality, uncertainty, and practical size of the effect.

Calling a p-value the chance of randomness

A p-value is calculated under a model. It is not a general probability that the result is random, false, or meaningless.

FAQ

What does a p-value measure?

A p-value measures how surprising the observed statistic would be if the null model and its assumptions were true.

Is a p-value the probability that the null hypothesis is true?

No. It is a probability calculated under the null hypothesis, not the probability that the hypothesis itself is true.

Which tail should I choose?

Choose the tail that matches the alternative hypothesis planned before looking at the data.

Can chi-square and F statistics be two-sided?

Most common chi-square and F tests use right-tail p-values because larger statistics indicate stronger departure from the null model.

Related calculators