calculator for p value

P Value Calculator

Use this calculator to compute a p value from a test statistic. Choose a z-test (normal distribution) or t-test (Student's t distribution), then choose one-tailed or two-tailed testing.

Tip: Enter negative or positive statistics directly. The calculator handles direction and tails automatically.

What Is a p Value?

A p value measures how surprising your observed data would be if the null hypothesis were true. In plain language: it tells you the probability of getting a result at least as extreme as your test statistic, under the assumption of “no real effect.”

Smaller p values mean your observed result is less compatible with the null hypothesis. Many studies use a cutoff such as 0.05, but that threshold is a convention—not a law of nature.

How This Calculator for p Value Works

This page supports two common scenarios:

  • Z test: Used when the sampling distribution is approximately normal and the standard error setup justifies a z-statistic.
  • T test: Used when uncertainty in variance is estimated from sample data, especially with smaller sample sizes.
Core idea: The calculator first computes a cumulative probability (CDF) from your statistic, then converts that to a one-tailed or two-tailed p value.

For two-tailed tests, the calculator doubles the smaller tail probability. For one-tailed tests, it uses the left or right tail directly.

When to Use One-Tailed vs Two-Tailed

Two-Tailed (Most Common)

Use this when your alternative hypothesis is non-directional (for example, “the mean is different,” not specifically larger or smaller).

Right-Tailed

Use this when your hypothesis is directional and specifically tests whether a parameter is greater than a reference value.

Left-Tailed

Use this when your hypothesis specifically tests whether a parameter is less than a reference value.

Interpreting the Result Correctly

A p value is useful, but it does not answer everything. Keep these points in mind:

  • It is not the probability that the null hypothesis is true.
  • It is not the size of the effect.
  • It is sensitive to sample size; very large samples can make tiny effects look “significant.”
  • Always pair p values with confidence intervals and practical context.

Example Walkthroughs

Example 1: Two-Tailed Z Test

Suppose your z-statistic is 2.10. Select Z test, enter 2.10, and keep Two-tailed. The resulting p value will be around 0.0358, which is below 0.05, so this would be statistically significant at α = 0.05.

Example 2: Right-Tailed T Test

Suppose your t-statistic is 1.85 with 18 degrees of freedom and a right-tailed hypothesis. Enter those values and choose Right-tailed. The p value will reflect only the upper tail area.

Common Mistakes to Avoid

  • Choosing one-tailed after looking at your data direction.
  • Forgetting to enter degrees of freedom for a t test.
  • Treating p < 0.05 as proof of a meaningful effect.
  • Ignoring assumptions (independence, distribution, measurement quality).

Final Notes

This calculator for p value is designed for fast checks and learning. For publication-level analysis, verify test assumptions, report effect sizes, and include confidence intervals and study design details.

🔗 Related Calculators

🔗 Related Calculators