The P-value, From Test Statistic to Decision

After reading this you can turn a z, t, χ² or F statistic into a left-, right- or two-tailed p-value, and say exactly what that number means.

What a p-value is

A p-value answers one narrow question. Suppose the null hypothesis is true. How often would random sampling alone produce a test statistic at least as extreme as the one you observed? That "how often" is the p-value. It is a tail area under the null distribution.

Here is the hook. A z statistic of 1.96 gives a two-tailed p-value of 0.05. That single pairing sits behind most "significant at the 5% level" claims you have ever read. The calculator on this page reproduces that number and every neighbor of it.

Notice what the p-value is not. It is not the probability that the null hypothesis is true. It is not the probability that your result happened by chance. It is a statement about data frequency assuming a fixed hypothesis, nothing more.

When you already have a statistic

This calculator is the last step of a test, not the whole test. You use it when you have computed a test statistic by hand or read one from software output, and you need the tail probability that goes with it.

Pick the mode that matches how the statistic was built:

z
The statistic is compared to a standard normal distribution. Large-sample proportion tests and known-variance means land here.
t
Compared to a Student t distribution with df degrees of freedom. Small-sample mean tests and regression coefficients use this.
χ²
Compared to a chi-square distribution with df degrees of freedom. Goodness-of-fit and independence tests use this.
F
Compared to an F distribution with numerator d_1 and denominator d_2 degrees of freedom. ANOVA and variance-ratio tests use this.

If you have raw data rather than a statistic, start with the matching full test instead: the t-Test Calculator, the One-Way ANOVA Calculator, the Chi-Square Test of Independence or the One-Proportion Z-Test. They compute the statistic and its p-value together.

The math behind each tail

Every p-value is an area under a density curve. Write F(x) for the cumulative distribution function of the null distribution, the area to the left of x. The three tail choices are then simple.

p_{\text{left}} = F(x), \quad p_{\text{right}} = 1 - F(x)

Here x is your observed statistic. The left-tailed p-value is the area below it; the right-tailed p-value is the area above it. They always add to 1.

p_{\text{two}} = 2 \cdot \min\big(F(x),\, 1 - F(x)\big)

The two-tailed p-value doubles the smaller tail, because "as extreme as" now counts both directions. For a symmetric z or t distribution this equals 2\big(1 - F(|x|)\big).

The χ² and F distributions are not symmetric and live only on nonnegative values. In practice you use their right tail: a large χ² or F means the data disagree with the null, so p = 1 - F(x) is the standard reading. The calculator still reports every tail so you can see the full picture.

Degrees of freedom change the shape of t, χ² and F. A t statistic of 2.0 gives a two-tailed p of 0.073 at df = 10 but 0.046 at df = 100. Always feed the right df.

Reproducing the demo: z = 1.96

The demo button loads mode z and statistic 1.96. Work the two-tailed p-value by hand.

  1. Find the left area. For the standard normal, F(1.96) = 0.9750.
  2. Right tail: 1 - 0.9750 = 0.0250.
  3. Left tail: 0.9750.
  4. The smaller tail is 0.0250. Double it: 2 \times 0.0250 = 0.0500.

So the two-tailed p-value is 0.05, the right-tailed p-value is 0.025, and the left-tailed p-value is 0.975. Compare against your chosen threshold before you look at these numbers, not after.

Each shaded region holds area 0.025. Together they make the two-tailed p-value of 0.05 that goes with z = 1.96.

See the tail move

The relationship between the statistic and the p-value is steep near the middle and shallow far out. Slide the statistic and watch the tail area respond.

Moving a z statistic from 1.0 to 2.0 drops the two-tailed p-value from 0.317 to 0.046. Moving it from 3.0 to 4.0 only drops it from 0.0027 to 0.00006. The same one-unit step matters far more near the center of the distribution than in the far tail.

Reading the number you get

Set your significance level \alpha before you compute anything. The usual choice is 0.05, sometimes 0.01. The rule is mechanical: if p \le \alpha, reject the null; otherwise do not reject it.

Match the tail to your hypothesis. A directional claim ("the new page has a higher conversion rate") calls for a one-tailed p-value. A non-directional claim ("the rates differ") calls for two-tailed. The two-tailed p-value is exactly twice the one-tailed p-value for symmetric distributions, so switching quietly halves your evidence. Decide the direction in advance.

Size matters as much as significance. A p-value of 0.001 tells you an effect is unlikely to be zero. It says nothing about whether the effect is large enough to care about. Report the estimate and a confidence interval alongside the p-value.

Two-tailed p-values for common z statistics
zRight tailTwo-tailed pVerdict at α = 0.05
1.000.15870.3173do not reject
1.6450.05000.1000do not reject
1.960.02500.0500borderline
2.580.00490.0099reject
3.290.00050.0010reject

Common mistakes

Do not choose the tail after seeing the sign of your statistic. If you would have run a right-tailed test for a positive result and a left-tailed test for a negative one, you are secretly running a two-tailed test and your reported p-value is half of the honest one.

Three more traps come up often:

  • Wrong df. A t statistic without its degrees of freedom is unreadable. The same 2.2 gives a two-tailed p of 0.093 at df = 4 and 0.030 at df = 40.
  • Treating p as a probability about the hypothesis. A p-value of 0.04 does not mean there is a 4% chance the null is true. It means data this extreme occur 4% of the time when the null is true.
  • Chasing p just under 0.05. Testing many outcomes and reporting only the ones that clear the threshold inflates false positives. If you run 20 independent tests at \alpha = 0.05, you expect about one "significant" result by chance alone.

Related tools on this site

If you have raw counts or measurements rather than a finished statistic, reach for a full test. For two-group comparisons use the A/B Test Significance Calculator or the Mann-Whitney U Test when the data are ranks. For paired data use the Wilcoxon Signed-Rank Test or the McNemar's Test for binary before-and-after outcomes.

For categorical fit and small tables, see the Chi-Square Goodness-of-Fit Test and Fisher's Exact Test. For more than two groups without the normality assumption, use the Kruskal-Wallis H Test. Before an ANOVA or t-test, check assumptions with Levene's Test for Equal Variances and the Normality Test Battery.

Frequently asked questions

Why is my two-tailed p-value exactly double the one-tailed one?

For symmetric distributions like z and t, the two tails have equal area. The two-tailed p-value adds both, so it is twice the one-tailed value. A one-tailed p of 0.03 becomes a two-tailed p of 0.06.

Can a p-value be greater than 1?

No. The doubling formula uses the smaller tail, which is at most 0.5, so the two-tailed p-value never exceeds 1.0. Any value above 1 signals a calculation error.

Which tail should I use for χ² and F tests?

Use the right tail. Both statistics grow when the data depart from the null, so evidence against the null lives in the upper tail. A χ² of 18.31 with df = 10 gives a right-tailed p of about 0.05.

What does a p-value of 0.05 exactly cut off for an F test?

With numerator df 3 and denominator df 10, an F statistic of about 3.71 gives a right-tailed p of 0.05. Statistics above that value are significant at the 5% level.

Is a smaller p-value a bigger effect?

Not directly. A tiny p can come from a small effect measured in a huge sample. Always pair the p-value with an effect size and a confidence interval before you judge importance.