Skip to content
thecalculatorstudio

P-Value Calculator: From a z-Score or t-Score

Enter a z-score or t-score (with its degrees of freedom), or a sample mean, and choose the kind of test. You will see the p-value, the tail areas and whether to reject the null hypothesis at your significance level.

Last reviewed

%

p-value

0.0455

0.0455003 to six figures

Decision
Reject the null at α = 5%
z-score
2.0000
Left tail
0.9772
Right tail
0.0228
Two tails
0.0455

A p-value is not the chance that the null hypothesis is true. It is the chance of a result at least this extreme if it were. A small one is evidence against the null, not proof, and it says nothing about how large or important an effect is.

What the calculator does

A hypothesis test starts with a null hypothesis, a claim such as “the mean is 50”, and an alternative hypothesis: the mean is not 50, is less than 50, or is greater than 50. You collect data and boil it down to a test statistic, a z-score or a t-score, which says how far the data sits from what the null predicts, in units of standard error. The p-value is the chance, if the null hypothesis were true, of a test statistic at least as extreme as the one you found.

Enter a z-score or t-score and the calculator gives the p-value for your choice of test. Or enter a sample mean, the mean you are testing against, the standard deviation and the sample size, and it works out the test statistic for you.

Which tail

The alternative hypothesis decides which area under the curve you want:

  • Right-tailed (greater than): the area to the right of the statistic.
  • Left-tailed (less than): the area to the left.
  • Two-tailed (not equal): the area in both tails beyond the statistic, which is twice the smaller tail.

Choose the alternative before you look at the data. Swapping from two-tailed to one-tailed after seeing which way the result went halves the p-value and is not honest.

z and t

If the population standard deviation is known, the statistic is z = (x̄ − μ₀) ÷ (σ ÷ √n) and the p-value comes from the standard normal curve. If you only have the sample standard deviation s, the statistic is t = (x̄ − μ₀) ÷ (s ÷ √n) and the p-value comes from Student’s t distribution with n − 1 degrees of freedom. A t distribution has heavier tails than the normal, so for the same score its p-value is larger, especially with few degrees of freedom.

The normal areas are summed from a series in exact decimal arithmetic. The t areas use the closed forms for whole degrees of freedom (Abramowitz and Stegun), so no table lookup or interpolation is involved.

The decision

Compare the p-value with your significance level α, usually 5%. If α is greater than the p-value, you reject the null hypothesis. If α is less than or equal to the p-value, you do not reject it. That is the rule in the OpenStax statistics text. Note the wording: failing to reject the null is not proof that it is true, only that the data did not give enough evidence against it.

Worked examples

z = 2.00, two-tailed. The right tail beyond 2 is 0.02275, so the p-value is 2 × 0.02275 = 0.0455. At α = 5% you reject the null, and at α = 1% you do not.

z = −1.50, left-tailed. The area to the left of −1.5 is 0.0668.

t = 2.1 with 15 degrees of freedom, two-tailed. The p-value is 0.0531, so at 5% you do not reject. The same score as a z gives 2 × 0.0179 = 0.0357, which would reject. That difference is why small samples need the t distribution.

A sample mean. A sample of 36 has a mean of 52 and a standard deviation of 8, and you test whether the true mean is 50. The standard error is 8 ÷ √36 = 1.3333. The statistic is t = (52 − 50) ÷ 1.3333 = 1.5 with 35 degrees of freedom. Two-tailed, the p-value is 0.1426, so you do not reject at 5%. Right-tailed it is 0.0713.

z-scores and their p-values

z Two-tailed p One-tailed p
0.5 0.6171 0.3085
1 0.3173 0.1587
1.28 0.2005 0.1003
1.5 0.1336 0.0668
1.645 0.1000 0.0500
1.96 0.0500 0.0250
2 0.0455 0.0228
2.33 0.0198 0.0099
2.576 0.0100 0.0050
3 0.0027 0.0013
3.29 0.0010 0.0005

The values 1.645, 1.96 and 2.576 are the familiar cut-offs for 10%, 5% and 1% two-tailed tests.

What a p-value is not

  • It is not the chance the null hypothesis is true. It assumes the null is true and asks how surprising the data would be.
  • It does not measure the size of an effect. A huge sample can give a tiny p-value for a difference that does not matter, and a small sample can miss a large one.
  • It is not a verdict on its own. The line between 0.049 and 0.051 is arbitrary. Report the p-value, the effect and the interval, not only whether it fell below 0.05.

For the z-score and its percentile use the z-score calculator, and for an interval around a mean or proportion the confidence interval calculator. The statistics calculator and the standard deviation calculator summarise a data set, and the probability calculator covers repeated trials.

Frequently asked questions

What is a p-value?

The chance of getting a test statistic at least as extreme as yours if the null hypothesis is true. A p-value of 0.03 means that, if the null were true, a result this extreme or more would turn up about 3 times in 100. It is not the chance that the null is true.

How do I find the p-value from a z-score?

Find the area in the tail beyond the z-score under the standard normal curve. For z = 2 the right tail is 0.0228, and a two-tailed test doubles it to 0.0455. The calculator does this exactly, for any z up to 10 in size.

When do I use a one-tailed or a two-tailed p-value?

Use the alternative hypothesis. "Not equal" is two-tailed, "less than" is left-tailed and "greater than" is right-tailed. A two-tailed p-value is twice the smaller tail, so it is larger, and you should choose the test before you see the data.

When should I reject the null hypothesis?

When the p-value is less than your significance level α, commonly 0.05. If α is less than or equal to the p-value, you do not reject it. With a p-value of 0.0455 you reject at 5% but not at 1%.

Should I use z or t?

Use z when the population standard deviation is known, and t when you only have the sample standard deviation, which is the usual case. A t-score needs its degrees of freedom, which for one sample is the sample size minus 1.

Does a small p-value mean the effect is large?

No. A p-value says how surprising the data would be if the null were true, not how big or important the effect is. A very large sample can give a tiny p-value for a trivial difference, so look at the size of the effect as well.

Related calculators

Sources