P-Value Calculator

P-Value Calculator

Turn a z, t, chi-square or F test statistic into an exact p-value, one- or two-tailed, and see whether it's significant at the usual levels.

p = P(a result at least this extreme | null hypothesis true)

Two-tailed tests ask whether there is a difference in either direction.

Enter the test statistic and degrees of freedom

What is a P-Value?

A p-value is the chance of getting a result at least as extreme as yours if the null hypothesis (usually "no effect") were true. Small p-values mean your data would be surprising in a world with no effect.

By convention, p below 0.05 is called statistically significant. That threshold is a habit, not a law of nature, and many fields now ask for the exact p-value and an effect size rather than a yes/no verdict.

What a p-value is not: it's not the chance the null hypothesis is true, and it's not the chance your result was a fluke. It says how compatible the data are with "no effect", nothing more.

P-Value Formula for Each Test

Distribution functions as given in the NIST/SEMATECH e-Handbook, section 1.3.6.6. See Sources.

1. z and t: area beyond the statistic

Right-tailed: p = 1 − F(stat) · Left-tailed: p = F(stat)
Two-tailed: p = 2 × min(F(stat), 1 − F(stat))

2. Chi-square and F: the right tail

p = P(χ² ≥ stat) or P(F ≥ stat)

3. Compare with α

Reject the null hypothesis if p < α (often 0.05)

The t, chi-square and F functions are computed exactly through the incomplete beta and gamma functions, not looked up in a table.

Worked Example: A t of 2.45 with 14 df

Given:
A one-sample t-test on 15 people gives t = 2.45 with 14 degrees of freedom, testing for a difference in either direction.
Step 1:
Area to the right of 2.45:
1 − F₁₄(2.45) = 0.0140
Step 2:
Two tails:
2 × 0.0140 = 0.0280
Step 3:
Compare:
0.028 < 0.05 but > 0.01
Result:
p ≈ 0.028

Significant at 5% but not at 1%. With a normal (z) curve instead, 2.45 would give 0.014: small samples need the t distribution's fatter tails.

P-Values for Common Z-Scores

A quick reference for large-sample tests.

One- and two-tailed p-values for z-scores
zOne-tailedTwo-tailed
10.15870.3173
1.6450.050.1
1.960.0250.05
2.3260.010.02
2.5760.0050.01
30.00130.0027
3.2910.00050.001

Common P-Value Mistakes

  • Reading p as the chance the null is true. p = 0.03 doesn't mean a 3% chance of no effect. That needs a prior and Bayes' theorem.
  • Choosing one-tailed after seeing the data. Halving a two-tailed p because the effect went the way you hoped is a form of cheating. Decide the tails first.
  • Treating p = 0.049 and p = 0.051 as opposites. They're almost identical evidence. Report the number, not just the verdict.
  • Equating significant with important. With huge samples, trivially small effects become significant. Always look at the size of the effect too.
  • Running many tests and reporting the hits. With 20 tests of nothing, one will usually come out below 0.05. Correct for multiple testing.

P-Value FAQs

What does p < 0.05 mean?

That a result at least this extreme would happen less than 5% of the time if there were really no effect. It’s the most common threshold for “significant”.

Should I use one-tailed or two-tailed?

Two-tailed unless you decided in advance that only one direction matters and you’d ignore an effect the other way.

Why don’t chi-square and F have tail options?

Their statistics measure how big a difference is, regardless of direction, so only large values are evidence. The test is always right-tailed.

Can a p-value be exactly zero?

Not really. Very small values are shown in scientific notation; report them as p < 0.001 rather than p = 0.

What degrees of freedom do I use?

One-sample or paired t: n − 1. Two-sample pooled t: n₁ + n₂ − 2. Chi-square independence: (rows − 1)(columns − 1). The degrees of freedom calculator lists more.

How do I calculate a p-value in Excel?

=T.DIST.2T(ABS(t), df) for a two-tailed t, =1 − NORM.S.DIST(z, TRUE) for a right-tailed z, =CHISQ.DIST.RT(x, df) and =F.DIST.RT(x, d1, d2).

What’s the difference between p and α?

α is the threshold you choose before the test (such as 0.05). p is what your data produce. You reject the null when p < α.

Is a smaller p-value a bigger effect?

Not necessarily. p depends on both the effect size and the sample size. A tiny effect with a huge sample can give a tiny p.

Sources

Related Tools