P-value calculator

Turn a z, t, chi-square or F statistic into a p-value, see whether it's significant, and understand what it means.

  • Free, no sign-up
  • Step-by-step working
  • Runs in your browser
Type of test

How to use the p-value calculator

  1. Choose the test statistic your test produced: z, t, chi-square or F.
  2. Enter its value and, for t, chi-square and F, the degrees of freedom.
  3. Pick two-tailed, left-tailed or right-tailed to match your alternative hypothesis. Chi-square and F tests are almost always right-tailed.
  4. Choose your significance level α (0.05 is the usual default) and click Calculate p-value.
  5. Read the decision and plain-English summary, and download the shaded graph if you need it for a report.

How the p-value is calculated

The p-value is an area under the curve of the test statistic's distribution, assuming the null hypothesis is true. Which area depends on the direction of your test. If your statistic has the value x:

Left-tailed: p = P(X ≤ x)

Right-tailed: p = P(X ≥ x) = 1 − P(X ≤ x)

Two-tailed: p = 2 × P(X ≥ |x|)

p
The p-value
X
A random variable that follows the test's distribution (z, t, χ² or F) when the null hypothesis is true
x
The test statistic you calculated from your data
df
Degrees of freedom, which set the exact shape of the t, χ² and F distributions
α
The significance level: the cutoff you compare the p-value with, set before the test

The two-tailed formula applies to symmetric distributions (z and t). Chi-square and F statistics can't be negative, so their tests are usually right-tailed.

Worked example

A cereal maker says its boxes contain 500 g on average. An inspector weighs a large sample and gets a test statistic of z = −2.17. Is the true mean different from 500 g, at α = 0.05?

  1. "Different from" means a two-tailed test
    p = 2 × P(Z ≥ |−2.17|) = 2 × P(Z ≥ 2.17)
  2. Look up the area to the right of 2.17 under the standard normal curve
    P(Z ≥ 2.17) = 1 − 0.9850 = 0.0150
  3. Double it for two tails
    p = 2 × 0.0150 = 0.0300
  4. Compare with α
    0.0300 < 0.05 → reject H0

What it means: if the boxes really averaged 500 g, a sample result this far from 500 g (in either direction) would happen only about 3% of the time. That's unlikely enough, at the 5% level, to conclude that the average fill differs from 500 g. Because z is negative, the boxes appear to be under-filled.

How to interpret a p-value

  • p ≤ α: reject the null hypothesis. The result is statistically significant at that level.
  • p > α: fail to reject the null hypothesis. The data don't provide strong enough evidence against it. This is not the same as proving the null hypothesis is true.

Some common mistakes to avoid:

  • A p-value is not the probability that the null hypothesis is true, or that your result happened "by chance".
  • A small p-value doesn't mean a large or important effect. With a big enough sample, tiny differences become significant. Report an effect size or confidence interval alongside it.
  • Choose one-tailed or two-tailed, and α, before looking at the results, not after.

If you're planning a study rather than analyzing one, the sample size calculator helps you collect enough data to detect the effect you care about.

Frequently asked questions

What does a p-value actually mean?

A p-value is the probability of getting a test statistic at least as extreme as yours if the null hypothesis were true. A small p-value means your result would be surprising under the null hypothesis, which counts as evidence against it. It is not the probability that the null hypothesis is true, and it doesn’t tell you how large or important an effect is.

Is a p-value of 0.05 significant?

By the most common convention, a result is called statistically significant when p is less than 0.05. A p-value of exactly 0.05 sits right on the line, and many textbooks treat it as significant (p ≤ α). In practice, report the exact p-value and avoid putting too much weight on a hard cutoff: 0.049 and 0.051 represent almost identical evidence.

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

Use a two-tailed test unless, before looking at the data, you had a specific reason to test only one direction (for example, "the new drug lowers blood pressure"). Two-tailed is the default in most software and journals. For a symmetric distribution, the two-tailed p-value is twice the one-tailed value.

Which distribution should I choose?

Use z for tests of proportions or means when the population standard deviation is known; t for t-tests of means and regression coefficients; chi-square for goodness-of-fit and tests of independence in contingency tables; and F for ANOVA and comparing variances. Your textbook or software output will usually name the statistic.

What degrees of freedom do I use?

It depends on the test. A one-sample t-test uses n − 1. A two-sample pooled t-test uses n₁ + n₂ − 2. A chi-square test of independence uses (rows − 1) × (columns − 1). One-way ANOVA uses k − 1 and N − k for the F statistic, where k is the number of groups and N is the total sample size.

Can a p-value be 0?

Not exactly, but it can be extremely small. When software reports p = 0.000, it means the value is smaller than the decimals shown. Report it as p < 0.001 rather than p = 0. This calculator shows very small p-values in scientific notation.

Last reviewed November 10, 2026