P-value Calculator
Find a one- or two-tailed p-value from a z or t test statistic.
What it does
A p-value summarizes how unusual a test statistic would be if the null hypothesis were true. Smaller values mean the observed result sits farther into the tail of the assumed distribution. Researchers compare the p-value with a significance level chosen before the test.
The calculation depends on the distribution and the number of tails. A z statistic uses the standard normal distribution. A t statistic uses the Student t distribution with degrees of freedom, which gives heavier tails in small samples.
This tool supports one- and two-tailed tests. A two-tailed p-value doubles the area in the direction of the statistic, capped at 1. A one-tailed p-value uses only the tail in that direction, so the direction should be justified before looking at the data.
The 0.05 threshold is a convention, not a law. A result just above or below it is not a clean dividing line between true and false. The tool also does not check whether the test, sample size, or distributional assumptions are appropriate for your data.
How to use
- Choose z or t for the test statistic.
- Enter the statistic value.
- For a t test, enter the degrees of freedom.
- Choose one-tailed or two-tailed.
- Read the p-value and its percentage.
- Compare the result with the alpha you set before the test.
Formula
- z
- Standard normal test statistic.
- t
- Student t test statistic.
- df
- Degrees of freedom for the t distribution.
- Phi
- Standard normal cumulative distribution.
- F_t
- Student t cumulative distribution.
A one-tailed test uses the tail in the direction of the observed statistic. A two-tailed test doubles that area. Near 0.05 the tool shows an extra decimal, and the decision uses the unrounded p-value. A display of 0.05000 can still come from a value just below 0.05, so read the decision alongside the number.
Worked example
Example: z=2.00, two-tailed
Test z, statistic 2.00, two-tailed.
- The area above z=2.00 is about 0.02275.
- For two tails, double that area: 2 x 0.02275 = 0.0455.
- As a percent, 0.0455 x 100 = 4.55 %.
- At a 0.05 threshold, 0.0455 is at or below the cutoff.
- The tool shows 0.0455, 4.55 %, and At or below 0.05.
- A z table check: about 0.9772 of the distribution lies below 2.00, leaving 0.0228 above.
Reference table
| Statistic | Tails | P-value | At 0.05 |
|---|---|---|---|
| z = 1.50 | Two | 0.1336 | Above 0.05 |
| z = 1.645 | One | 0.04998 | At or below 0.05 |
| z = 1.96 | Two | 0.05000 | At or below 0.05 |
| z = 2.00 | Two | 0.0455 | At or below 0.05 |
| z = 2.576 | Two | 0.0100 | At or below 0.05 |
Limits
- The tool assumes the chosen test and distribution are appropriate.
- It does not account for multiple comparisons or researcher choices.
- A p-value does not measure effect size or practical importance.
- One-tailed tests need a directional hypothesis set before the data are seen.
Common mistakes
- Saying the p-value is the probability that the null hypothesis is true.
- Halving a two-tailed p-value to get a one-tailed result.
- Choosing the tail direction after seeing which way the data moved.
- Using a z distribution when a small-sample t test is needed.
- Treating not significant as proof that there is no effect.
Try it yourself
Quick checks. Answers sit tucked under each question.
What is the one-tailed p-value for z=1.645?
0.04998, which is at or below 0.05.
What is the two-tailed p-value for t=2.228 with 10 degrees of freedom?
0.05001, which is just above 0.05. The t table rounds the critical value to 2.228, so the exact p is slightly above the cutoff.
What is the two-tailed p-value for z=2.576?
0.0100, which is at or below 0.05.
Questions
What is a p-value?
The probability of getting a test statistic at least as extreme as the observed one if the null hypothesis is true.
What does 0.05 mean?
It is a common significance threshold. A result at or below 0.05 is often called statistically significant, but the choice should be set before the test.
When should I use one tail or two?
Use two tails for a difference in either direction. Use one tail only when a directional hypothesis was specified in advance.
Why does a t test need degrees of freedom?
Degrees of freedom determine the shape of the t distribution. Smaller values produce heavier tails and larger p-values for the same statistic.
Can a p-value be exactly zero?
It can be extremely small, but the tool reports values below 0.0001 as less than 0.0001 rather than printing zero.
Is p=0.05 statistically significant?
At a 0.05 threshold, a p-value at or below 0.05 is usually called significant. Report the exact value, effect size, and study design rather than relying on the label alone.
Sources
- NIST: Critical values and p values
- UCLA OARC: One-tailed and two-tailed tests
- NIST: Critical values of the Student's t distribution