Maths

P-value Calculator

Find the p-value of a z or t test statistic, left, right or two-tailed, and compare it with α.

By Nitin Raturi · Last reviewed

Your test

How to use the P-value Calculator

Turn a z or t test statistic into a p-value and compare it with your significance level.

  1. Choose z or t.
  2. Enter the test statistic and, for t, the degrees of freedom.
  3. Choose left, right or two-tailed from your alternative hypothesis.
  4. Read the p-value and whether it is below α.

Good to know

  • Decide the tail and α before looking at the data.
  • The Z-Score Calculator turns a value, mean and standard deviation into z.
Test

Test

Which distribution your test statistic follows.

How to fill it in

  • z: the population standard deviation is known, or a large-sample proportion test.
  • t: the standard deviation comes from the sample.

Example

1.96 two-tailed is p = 0.0500 with z but 0.1073 with t on 5 degrees of freedom.

Test statistic

The z or t value your test produced, with its sign.

How to fill it in

  • Enter −50 to 50.
  • Negative values lie below the hypothesised value.

Example

z = −2.08, left-tailed, gives p = 0.0188.

Alternative hypothesis

Alternative hypothesis

Which direction counts as evidence against the null hypothesis.

How to fill it in

  • Left (<): the true value is below the hypothesised value.
  • Right (>): it is above.
  • Two-tailed (≠): it differs in either direction.

Example

z = 0.6 two-tailed gives p = 0.5485.

Significance level (α)

The p-value below which you reject the null hypothesis, chosen before the test.

How to fill it in

  • Enter 0.01% to 50%; 5% is common.

Keep in mind: A p-value is not the probability that the null hypothesis is true.

P-value

p = 0.0188

For z = -2.08, left-tailed (<), p = 0.0188. That is below α = 5%, so reject the null hypothesis at that level.

Standard normal distribution. The p-value is the chance of a statistic at least this extreme if the null hypothesis is true.

How this calculator works

  1. Step 1Statisticz or tHow far the sample is from the null value.
  2. Step 2Tail areaP(as extreme)Area beyond it under the curve.
  3. Step 3Decidep < α ?Reject the null if p is below α.

The p-value is the chance of getting a test statistic at least as extreme as yours if the null hypothesis were true. Small p-values are evidence against the null.

For a left-tailed test the area is below the statistic, for a right-tailed test above it, and for a two-tailed test it is twice the smaller tail.

Worked example: OpenStax Example 9.16

t = 1.9781 with 9 degrees of freedom, right-tailed
p
P(T₉ > 1.9781)
  1. Sample size10
  2. Degrees of freedom10 − 19
  3. Tailright (>)
  4. p-value0.0397

OpenStax prints p = 0.0396; the unrounded value is 0.03965, which shows here as 0.0397. Either way it is below 0.05, so the null is rejected at the 5% level.

Read the result

  • z = 1.96, two-tailedp = 0.0500The familiar 5% cut-off for a normal test.
  • t = 1.96, 5 dfp = 0.1073Small samples have heavier tails, so p is larger.

OpenStax Example 9.14: z = −2.08, left-tailed, gives p = 0.0188. Example 9.17: z = 0.6, two-tailed, gives p = 0.5485.

Assumptions and limits

  • Under the nullIt assumes the null hypothesis is true.
  • Not P(null)It is not the chance the null is true.
  • Not effect sizeA tiny effect can have a tiny p with a big sample.
  • Assumptionsz and t tests assume random samples and roughly normal data.

A p-value comes from a test statistic. The tests and distributions behind it have their own tools.

To compare two means, use the t-test calculator, or for counts in categories, the chi-square calculator. The z-score calculator finds a statistic from raw values.

Common mistakes

  • Mistake: Choosing the tail after seeing the data.

    Instead: Set the alternative hypothesis first.

  • Mistake: Using z for a small sample with unknown σ.

    Instead: Use t with n − 1 degrees of freedom.

  • Mistake: Reading p = 0.06 as “no effect”.

    Instead: It means the evidence is not strong enough at 5%.

Checking the method

A separate script re-works every golden value with the error function and by integrating the t curve numerically, and reproduces six OpenStax examples.

Read how we test our calculators, or browse more maths calculators.

Frequently asked questions

What is the p-value for z = −2.08, left-tailed?

p = 0.0188, as in OpenStax Introductory Statistics Example 9.14.

How do I find a p-value from a t statistic?

Use the t distribution with n − 1 degrees of freedom. t = 1.9781 with 9 df, right-tailed, gives p = 0.0397.

Why is the t p-value larger than the z p-value?

The t distribution has heavier tails. 1.96 two-tailed is 0.0500 with z but 0.1073 with t on 5 df.

How is a two-tailed p-value found?

Double the area in the tail beyond the statistic, using its absolute value.

Is the p-value the probability the null hypothesis is true?

No. It is the chance of a result this extreme if the null is true.

Sources and methodology

The formulas are standard time-value-of-money results. We check every figure against golden values worked out independently, by closed form and by month-by-month simulation; see the methodology.

Written and maintained by Nitin Raturi, a software engineer (about the author). Last reviewed 4 Nov 2026; next review due by . Found an error? Tell us.

Changelog

  • : Initial release.