P-Value Calculator

Enter a z, t, chi-square, or F statistic with its degrees of freedom and read the exact tail probability, not a number rounded off a printed table that stops at df 30 and alpha 0.05.

P-value worksheet

Load an example
My statistic is
Signed value, minus included if your software printed one.
Two-tailed unless the hypothesis named a direction before you saw the data.
Signed value from a one-sample, paired, or two-sample test.
n minus 1 for one sample, n1 + n2 minus 2 for pooled two-sample.
Match whatever the original hypothesis claimed.
Sum of (observed minus expected) squared over expected.
(rows minus 1) times (columns minus 1) for an independence test.
TailUpper tail, fixedChi-square only ever measures disagreement with the null, never a direction.
Ratio of two mean squares or two sample variances.
Groups minus 1 in a one-way ANOVA.
Total observations minus the number of groups.
TailUpper tail, fixedThe convention ANOVA tables and regression output both use.
Set this before you look at the answer, not after.

Four distributions, one shared question

A p-value only means what it claims to mean when it comes from the right curve.

Feed a chi-square statistic through a routine built for the bell curve and the number that comes back is not a rounding error. It answers a different question than the one you asked. Each row below produces its statistic from a different piece of arithmetic, and the panel above needs to know which one made yours.

What each statistic is built from, and which tail applies.
DistributionBuilt fromTypical testTails
Z(estimate minus hypothesized value) divided by a known standard errorOne proportion, a large-sample mean, two proportions comparedTwo, left, or right
TSame shape as Z, standard error estimated from the sample itselfOne-sample mean, paired differences, two independent meansTwo, left, or right
Chi-squareSum of (observed minus expected) squared, divided by expectedIndependence between two categorical variables, goodness of fitUpper only
FOne variance or mean square divided by anotherANOVA across three or more groups, regression comparisonsUpper only

Pick the row that matches how your software produced the number, not the test you remember best from a course.

What p = 0.0063 does not tell you

Two versions of a marketing email went to 150,000 recipients each. The first opened at 20.0 percent, the second at 20.4 percent. Run the two-proportion z-test on that gap and the statistic comes out at 2.73, two-tailed p = 0.0063, comfortably under any threshold in the table above.

Nobody would rebuild a template over four tenths of a percentage point.

A p-value answers one question: how surprising is data at least this extreme, assuming the null hypothesis is exactly true. It carries no opinion on whether four tenths of a point pays for the redesign, and it says nothing about the odds that the null hypothesis itself is correct. Both of those questions need the effect size and a business case sitting next to the number, not folded inside it.

The reverse mistake happens just as often. A pilot on 24 patients can miss a real, useful effect and return p = 0.31 purely because the sample was too small to see it. A p-value above the threshold is not proof that nothing is happening. It can just as easily be a sample too small to notice.

How the tail probability gets computed

None of the four numbers above come from a lookup table. Each distribution has a cumulative distribution function, a closed piece of mathematics that returns the exact probability of landing at or beyond a given value, and this calculator evaluates it directly for whatever statistic and degrees of freedom you enter.

  • Z uses P = 2 × (1 − Φ(|z|)) for a two-tailed reading, where Φ is built from the Gauss error function.
  • T reduces to a regularized incomplete beta function, Ix(df/2, 1/2), solved with a continued fraction that reaches machine precision in under twenty terms.
  • Chi-square uses the regularized lower incomplete gamma function, P(df/2, x/2), switching between a series and a continued fraction depending on how far x sits from df.
  • F is another regularized incomplete beta function, Ix(df1/2, df2/2), with x rescaled from the F statistic and both degrees of freedom.

The payoff of solving these directly instead of interpolating a printed table is precision at any degrees of freedom. 37, 214, or 1,860 all return an answer without rounding to the nearest row a textbook happened to print.

Every one of those functions runs client-side, inside the script attached to this page.

Where a single p-value stops being enough

A dashboard built from twenty independent metrics at a 0.05 threshold does not carry a 5 percent false-positive rate. It carries something closer to 64 percent, the chance that at least one metric clears the bar by accident alone. Panels built from dozens of KPIs throw false alarms on a schedule, not as a rare event.

  • The threshold gets picked after the data, not before. Trying 0.05, then reaching for 0.10 when the first number disappoints, stops being a test and starts being a search for a story.
  • Two-tailed became one-tailed once the sign came in. Choosing a direction after you already know which way the number leans roughly doubles the real false-positive rate against the one you reported.
  • A t-test assumes a roughly normal population, or a sample large enough that it stops mattering. Skewed data on a dozen rows breaks that assumption before the arithmetic starts.
  • Chi-square wants an expected count of 5 or more in every cell. Thinner cells call for Fisher's exact test instead, which this page does not compute.
  • F assumes the groups share a variance. A quick look at each group's spread, or Levene's test, is worth running before an ANOVA F-statistic gets taken at face value.

None of that arithmetic lives on this page. Build the statistic on the t-test calculator or the chi-square calculator first, then bring the result here to read the exact tail probability. Setting the threshold and the minimum sample before a single row gets collected is what the sample size calculator is for.

Questions worth answering before you read a p-value

Where the tail choice, the degrees of freedom, and the threshold come from.

What counts as a small p-value?

Nothing in the mathematics draws that line. 0.05 is common because a generation of journals adopted it, not because it separates real effects from noise. Fields that test many hypotheses at once, genome-wide studies among them, run thresholds nearer 0.00000005. Pick a threshold before looking at the data, and this calculator honors whatever alpha you enter.

Why do the chi-square and F panels only offer one tail?

Both statistics get squared or summed before you ever see them, so they can only come out positive, and a larger value always means more disagreement with the null. There is no direction left to test against, only a size.

My t-statistic is negative. Does the tail selector still work?

Yes. Left-tailed and right-tailed read the sign directly, a right-tailed test on a negative t returns a p-value close to 1, and two-tailed folds the sign away by testing the absolute value. Type the number exactly as your software printed it, minus sign included.

What degrees of freedom do I enter for a two-sample t-test?

n1 + n2 minus 2 when the variances were pooled, or the Welch-Satterthwaite value your software already printed when they were not. The two formulas can land several degrees of freedom apart on uneven sample sizes, and using the wrong one shifts the resulting p-value more than most people expect.

Can I trust a p-value built from a chi-square statistic with small expected counts?

Not fully. The chi-square approximation weakens once any expected cell count drops under 5. Below that line, Fisher's exact test replaces it, and this calculator does not compute that separately.

Does p = 0.001 mean the effect is bigger than one at p = 0.04?

No. It means the data would be rarer under the null hypothesis, not that the underlying effect runs larger. A tiny, unremarkable difference measured on a huge sample produces a tiny p-value just as reliably as a large effect does. Sample size drives the number as much as the effect itself.

Is anything typed into this calculator sent anywhere?

No. Every calculation runs in your browser, and nothing is logged, stored, or uploaded.