P-Value Calculator

Quick answer

A p-value is the chance of getting a test statistic at least as extreme as yours if the null hypothesis is true. Enter your z or t value, pick the tail, and compare p with alpha. For z = 1.96 two-tailed, p = 0.049996. That is just under 0.05, so you would reject H0 at the 5% level.

Updated 2026-09-27By Shakeel MuzaffarReviewed by Prof. Dr. Khalil Mudassar, PhD
Try
P-Value
Use t when the standard deviation comes from your sample.
Match the direction in your alternative hypothesis H1.
The z or t value from your test. Use a minus sign for negatives.
Common choices are 0.10, 0.05 and 0.01. Blank means 0.05.
p-value
--
Decision--
Critical value(s)--
Tail area--
Plain-language reading--

Calculations run in your browser. Inputs are not sent to our servers; anything you Save stays in this browser only.

Saved results (0)

How to Use the Calculator

  1. Pick the distribution. Choose z for a z test. Choose t for a t test, then enter the degrees of freedom.
  2. Pick the tail that matches your alternative hypothesis. Not equal is two-tailed, less than is left-tailed, and greater than is right-tailed.
  3. Type your test statistic. You can also change alpha, which is 0.05 unless you pick another value.
  4. Read the p-value, the decision, and the critical values. The bell curve shades the area that makes up the p-value.

For example, a t test with 11 observations and t = 2.228 uses df = 11 - 1 = 10. Choose t, two-tailed, and enter 2.228 and 10.

What Is a P-Value?

Every hypothesis test starts with a null hypothesis, H0. It usually says there is no effect or no difference. The p-value measures how well your data fit with H0.

Definition: p = P(statistic at least as extreme as observed, given that H0 is true)

The key word is if. The p-value is worked out by pretending H0 is true. Then it asks how often chance alone would give a result as far out as yours, or farther.

Here is an example. Suppose a z test gives z = 2.576. If H0 were true, a z value this far from 0 in either direction happens only about 1% of the time. So p is about 0.01, and the data look unusual under H0.

One-Tailed vs Two-Tailed Tests

The tail tells the calculator which results count as extreme. It must match the alternative hypothesis H1, and you should choose it before you look at the data.

p left = P(T <= t), p right = P(T >= t), p two = min(1, 2 x min(p left, p right))
H1 saysTailShaded area
The mean is not equal to the claimTwo-tailedBoth tails, beyond plus and minus your statistic
The mean is less than the claimLeft-tailedEverything to the left of your statistic
The mean is greater than the claimRight-tailedEverything to the right of your statistic

A two-tailed p-value is twice the smaller tail. That is why z = 1.645 gives p = 0.049985 right-tailed but p = 0.099970 two-tailed. Switching to one tail after seeing the data, just to get a smaller p, is not allowed.

Z vs T: Which Distribution?

Both statistics compare a sample mean with a claimed mean. The difference is the standard deviation in the bottom of the fraction.

z = (xbar - mu0) / (sigma / sqrt(n)); t = (xbar - mu0) / (s / sqrt(n)), df = n - 1

Use z when the population standard deviation, sigma, is known. Use t when you estimate it with the sample standard deviation, s. That is the usual case in practice.

The t curve has heavier tails than the normal curve, so the same statistic gives a larger p-value. The gap is biggest for small samples. For t = 2.0 with df = 10, two-tailed p = 0.073388. For z = 2.0, p = 0.045500.

Two-tailed alphaCritical zCritical t, df = 10Critical t, df = 30
0.101.6451.8121.697
0.051.9602.2282.042
0.012.5763.1692.750

As df grows, the t values move toward the z values. Our z-score calculator helps you find a z statistic first.

Reading the Decision

Alpha is the cutoff you set before the test. It is also the chance of rejecting H0 when H0 is actually true, called a Type I error.

If p <= alpha, reject H0. If p > alpha, fail to reject H0.

You can reach the same decision with critical values. Reject H0 when your statistic lands past the critical value, in the shaded tail. For alpha = 0.05 two-tailed with z, the critical values are -1.959964 and 1.959964.

Fail to reject is not the same as accept. It only means the data did not give strong enough evidence against H0. A small sample can miss a real effect.

Watch results near the cutoff. For t = 2.228 with df = 10, p = 0.050012. That is just above 0.05, so you fail to reject H0, even though a rounded table value looks like a tie.

Common Misinterpretations

1. The P-Value Is Not the Chance That H0 Is True

The p-value assumes H0 is true. So p = 0.03 does not mean a 3% chance that H0 is right. The ASA statement on p-values makes this point directly.

2. Significant Does Not Mean Important

A tiny effect can give a small p-value when the sample is huge. Always look at the size of the effect, such as the difference in means, and its confidence interval.

3. A Large P-Value Does Not Prove H0

p = 0.40 only says the data fit fine with H0. Other hypotheses may fit just as well.

4. Do Not Test Until Something Works

Running many tests, or trying other tails and subsets, will turn up small p-values by chance. Report every test you ran.

How We Calculate

Normal tail: P(Z >= z) = erfc(z / sqrt(2)) / 2
t tail: P(T >= t) = I_x(v/2, 1/2) / 2, where x = v / (v + t^2) and t >= 0
z tail
The complementary error function erfc uses W. J. Cody's rational approximations, accurate to about 1e-15 relative error, so far tails stay accurate.
t tail
The regularized incomplete beta function I_x(a, b) is found with a Lentz continued fraction. The log-gamma terms use a Lanczos approximation.
Two tails
p = 2 x min(left tail, right tail), capped at 1.
Critical values
Found by bisection on the same tail function until the tail area equals alpha, or alpha / 2 for two tails.
Chart
The curve is the exact density for your distribution and df, drawn to the same vertical scale for z and t.
Rounding
p-values show 6 decimals. Values below 0.000001 also show scientific notation.
Last reviewed
2026-09-27.

Frequently Asked Questions

What is a p-value in simple terms?

A p-value tells you how surprising your data would be if the null hypothesis were true. It is the chance of getting a test statistic at least as extreme as the one you got, assuming H0 is true. A small p-value means your result would be rare under H0.

What does p < 0.05 mean?

It means that if H0 were true, a result this extreme would happen less than 5% of the time. With a significance level of 0.05, you would reject H0. It does not prove the alternative is true, and it says nothing about how large or important the effect is.

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

No. The p-value is calculated by assuming H0 is true, so it cannot also be the chance that H0 is true. A p-value of 0.03 means data this extreme would show up 3% of the time under H0. It is not a 3% chance that H0 is correct.

Should I use a one-tailed or a two-tailed test?

Use a two-tailed test unless you decided before looking at the data that only one direction matters. A one-tailed test puts all of alpha in one tail, so it is easier to reach significance in that direction but it cannot detect an effect in the other direction.

When should I use the t distribution instead of z?

Use t when you estimate the population standard deviation from your sample, which is the usual case. This matters most for small samples. Use z when the population standard deviation is truly known, or for a large-sample test of a proportion.

How do I find the degrees of freedom?

For a one-sample or paired t test, df = n - 1, where n is the number of observations or pairs. For a pooled two-sample t test, df = n1 + n2 - 2. The Welch test can give a decimal df, and this calculator accepts decimal values of 1 or more.

Why is my p-value shown as less than 0.000001?

Very small p-values round to 0.000000 at 6 decimals, which could look like zero. A p-value is never exactly 0, so the calculator shows it as less than 0.000001 and also gives the value in scientific notation, such as 1.973e-9 for z = 6 two-tailed.

Sources

Related Guides

Related Calculators

Looking for more math tools?

Explore all math calculators

This calculator finds p-values and critical values for a z or t test statistic that you enter. It does not compute the statistic from raw data. Results are rounded for display, and statistical significance is not the same as practical importance. Spotted an error? Let us know.

Author

shakeel-Muzaffar
Founder & Editor-in-Chief at  ~ Web ~  More Posts

Shakeel Muzaffar is the Founder and Editor-in-Chief of MultiCalculators.com, bringing over 15 years of experience in digital publishing, product strategy, and online tool development. He leads the platform's editorial vision, ensuring every calculator meets strict standards for accuracy, usability, and real-world value. Shakeel personally oversees content quality, formula verification workflows, and the platform's commitment to publishing tools that are genuinely useful for students, professionals, and everyday users worldwide.