Skip to content
FiftyCalc Free calculators for all 50 states

P-Value Calculator

Test cases replayed : 5 of 5 match · Methodology · No outside source listed

Enter a test statistic, pick its distribution and the tail of your test, and get the p-value with the decision at your significance level.

Result

Sample figures

p-value—

Right-tail probability P(X ≥ statistic) —

  • Left-tail probability P(X ≤ statistic)—
  • Decision at α—

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

P-Value Calculator

Distribution of the test statistic

Distribution of the test statistic: choose Z (standard normal), Student's t, Chi-square (χ²) or F. Prefilled example: Z (standard normal).

Test statistic (z, t, χ² or F): enter a number. Prefilled example: 1.96.

Tail: choose Left-tailed (P ≤ statistic), Right-tailed (P ≥ statistic) or Two-tailed. Prefilled example: Two-tailed.

Degrees of freedom (t and χ²; numerator df for F): enter 1 or more. Prefilled example: 10.

Denominator degrees of freedom (F only): enter 1 or more. Prefilled example: 20.

Significance level α: enter a number from 0 to 1. Prefilled example: 0.05.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. Distribution of the test statistic: choose Z (standard normal), Student's t, Chi-square (χ²) or F.
  2. Test statistic (z, t, χ² or F): enter a number.
  3. Tail: choose Left-tailed (P ≤ statistic), Right-tailed (P ≥ statistic) or Two-tailed.
  4. Degrees of freedom (t and χ²; numerator df for F): enter 1 or more.
  5. Denominator degrees of freedom (F only): enter 1 or more.
  6. Significance level α: enter a number from 0 to 1.
  7. Read the result: p-value; the panel also shows Right-tail probability P(X ≥ statistic), Left-tail probability P(X ≤ statistic) and Decision at α.

How this calculator works

The p-value is the probability, if the null hypothesis is true, of a test statistic at least as extreme as the one observed. Right-tailed: P(X ≥ x). Left-tailed: P(X ≤ x). Two-tailed: 2 × the smaller of the two tails.

Z uses the standard normal distribution function Φ(z) = ½(1 + erf(z/√2)). Student's t with ν degrees of freedom uses P(|T| ≥ |t|) = I(ν/(ν + t²); ν/2, 1/2), the regularized incomplete beta function. F with d₁ and d₂ degrees of freedom uses P(F ≥ f) = I(d₂/(d₂ + d₁f); d₂/2, d₁/2). Chi-square with k degrees of freedom uses the regularized upper incomplete gamma function Q(k/2, x/2).

The incomplete beta and gamma functions are evaluated with the continued fractions and series published in Numerical Recipes (Press et al.). Results are shown to 4 decimal places, so a p-value below 0.00005 displays as 0.

Worked example

Distribution of the test statisticZ (standard normal)
Test statistic (z, t, χ² or F)1.96
TailTwo-tailed
Degrees of freedom (t and χ²; numerator df for F)10
Denominator degrees of freedom (F only)20
Significance level α0.05
p-value0.05
Right-tail probability P(X ≥ statistic)0.025
Left-tail probability P(X ≤ statistic)0.975
Decision at αSignificant: p-value below α

Frequently asked questions

What is a p-value of 0.05?

It means that, if the null hypothesis were true, a result at least this extreme would occur 5% of the time. For a two-tailed z-test this happens at z = ±1.96.

One-tailed or two-tailed: which should I use?

Use a one-tailed test only if your alternative hypothesis states a direction (greater than, or less than) before you see the data; otherwise use two-tailed.

Does a small p-value prove the effect is large?

No. It only says the data are unlikely under the null hypothesis; the size of the effect is measured separately, for example with a confidence interval or Cohen's d.

Questions answered

Related calculators