P Value Calculator
A z score of 2.1 gives a two-tailed p value of 0.0357 and a one-tailed value of 0.0179. A t score of 1.667 with 24 degrees of freedom gives 0.109, which does not clear the same 0.05 line. The p value is the chance of a result this extreme when the null hypothesis is true.
| Two-tailed p value | |
| One-tailed p value | |
| Test statistic | |
| Degrees of freedom | |
| Standard error | |
| Call at the 0.05 level | |
The one-tailed value is the tail in the direction of the result you entered, which is half the two-tailed value on a symmetric curve. A normal curve is used for z, and a t curve with the degrees of freedom you give is used for t. Everything runs in your browser, and nothing you enter is uploaded or stored.
Enter a z score, a t score with its degrees of freedom, or a sample mean and spread, and get both p values with a plain reading of the result.
Key takeaways
- A z score of 2.1 has a two-tailed p value of 0.0357, and the one-tailed value is half of that, 0.0179
- A t score of 1.667 on 24 degrees of freedom gives p = 0.109, so a 0.2 pound gap from a 25 bag sample is not significant
- The same 0.2 pound gap measured on 100 bags gives t = 3.333 and p = 0.0012
- Twenty independent tests on pure noise still produce at least one p below 0.05 about 64 percent of the time
- A p value says nothing about effect size: 0.001 can come from a tiny gap measured on a huge sample
On this page
What a p value answers
A p value answers one narrow question: if the null hypothesis were true, how often would a test produce a result at least as far from the null as the one in front of me? That is close to the wording used by the NIST engineering statistics handbook, and the sentence is worth reading twice, because it is about the data, not about the hypothesis.
Take a z score of 2.1. On a normal curve, 3.57 percent of the area sits beyond 2.1 in both directions, so the two-tailed p value is 0.0357. If the null were true, a result this far out would show up about 3.6 times in 100 tries. That is the whole meaning of the number. It is not the chance that the null is true, and it is not the chance the result happened by luck.
Small p values mean the data sit far from what the null predicts. Large p values mean the data are unremarkable under the null, which is not the same as proving the null. A test can only fail to find evidence, and a small sample fails to find evidence all the time, even when a real difference exists.
The threshold does the deciding, not the p value by itself. NIST notes that 0.10, 0.05 and 0.01 are common choices and that the choice is somewhat arbitrary, which is why a result at 0.049 and one at 0.051 describe almost the same data while landing on opposite sides of a line.
The test statistic comes first
Every p value is built from a test statistic and a reference distribution. The statistic measures how far the data sit from the null in units of noise, and the distribution turns that distance into an area. A handful of shapes cover most of what people need.
| Situation | Test statistic | Reference distribution |
|---|---|---|
| One mean, population spread known | z = (mean - mu) / (sigma / sqrt(n)) | Normal curve |
| One mean, spread estimated from the sample | t = (mean - mu) / (s / sqrt(n)), df = n - 1 | t curve with n - 1 degrees of freedom |
| Two independent means | t = (mean 1 - mean 2) / standard error of the gap | t curve, Welch degrees of freedom |
| One share against a target | z = (share - p0) / sqrt(p0 x (1 - p0) / n) | Normal curve |
| Two shares compared | z = (share 1 - share 2) / standard error of the gap | Normal curve |
The denominator is always a standard error, which is the spread of the estimate divided by the square root of the sample size. That square root is the reason sample size dominates the discussion later on: to halve a standard error you need four times the data, not twice.
Degrees of freedom control how heavy the tails of the t curve are. With 5 degrees of freedom the t curve has fatter tails than the normal curve, so the same distance produces a larger p value. By 30 degrees of freedom the two curves are close, and many textbooks switch to the normal curve there, though software keeps using t.
Worked example: a z score of 2.1
A factory weighs filled bags and compares a sample mean against a target. The process spread is known from years of records, so the statistic is a z score. The sample mean comes out 0.2 pounds above target, the standard error is 0.0952 pounds, and the arithmetic is one division.
- z = 0.2 / 0.0952 = 2.101
- Area beyond 2.101 in one direction: 0.0179
- Two-tailed p value: 0.0179 x 2 = 0.0357
- Call at the 0.05 level: reject the null
- Call at the 0.01 level: do not reject
The same distance means different things at different thresholds, which is why a p value should be reported as a number instead of a verdict. A reader who wants a stricter test can apply it without rerunning anything.
| z score | One-tailed p | Two-tailed p | Below 0.05 two-tailed |
|---|---|---|---|
| 1.0 | 0.1587 | 0.3173 | No |
| 1.5 | 0.0668 | 0.1336 | No |
| 2.0 | 0.0228 | 0.0455 | Yes |
| 2.1 | 0.0179 | 0.0357 | Yes |
| 2.5 | 0.0062 | 0.0124 | Yes |
| 3.0 | 0.0013 | 0.0027 | Yes |
Notice how fast the area falls. Moving from 1.5 to 2.5 cuts the two-tailed p from 0.1336 to 0.0124, a factor of about 10.8, while the z score itself rises by two thirds. Tail areas shrink faster than the distance grows, which is why p values feel dramatic near the threshold and why the gap between 0.04 and 0.001 is wider than the numbers suggest.
Worked example: 25 bags of coffee
A roaster claims each bag holds 5.0 ounces. A buyer weighs 25 bags and finds a mean of 5.2 ounces with a standard deviation of 0.6 ounces. The spread now comes from the sample, so the test uses t.
- Standard error: 0.6 / 5 = 0.12
- t = (5.2 - 5.0) / 0.12 = 1.667
- Degrees of freedom: 25 - 1 = 24
- Two-tailed p value: 0.109
- Call at 0.05: not significant
The sample mean is high by 0.2 ounces, yet the p value says a gap this size shows up about 11 times in 100 when the fill is honest. Twenty five bags carry too much noise to separate a 4 percent shortfall from ordinary variation.
Now keep the gap and the spread and change only the sample size. A hundred bags make the standard error 0.06, the t score doubles to 3.333, and the p value falls to 0.0012. Nothing about the coffee changed. Only the amount of evidence did, which is the most useful thing to understand about p values.
| Bags weighed | Standard error | t score | Degrees of freedom | Two-tailed p |
|---|---|---|---|---|
| 10 | 0.190 | 1.054 | 9 | 0.319 |
| 25 | 0.120 | 1.667 | 24 | 0.109 |
| 50 | 0.085 | 2.357 | 49 | 0.023 |
| 100 | 0.060 | 3.333 | 99 | 0.0012 |
Two warnings about that table. Ten bags is a thin sample for estimating a standard deviation, so its p value deserves little weight. And a significant result on 100 bags still says nothing about whether 0.2 ounces matters to a shopper who cannot taste the difference, which is the effect size question covered below.
One tail or two tails
A one-tailed p value counts only the far end of the curve in the direction you predicted. A two-tailed p value counts both ends, so it is exactly twice the one-tailed figure on a symmetric curve. A z of 2.1 therefore gives 0.0179 one-tailed and 0.0357 two-tailed.
Pick the tail count before you look at the data. Two tails answer the question most people have, which is whether a difference exists in either direction. One tail is defensible when a result in the other direction would be ignored or would count against the same claim, such as testing whether a new seal leaks more than the old one.
What is not defensible is switching. A result of 0.07 two-tailed becomes 0.035 if you decide after the fact that you only care about one direction. That move turns a null result into a headline without new data, and anyone who spots it will discount the report.
| Two-tailed p | z critical value | t, 10 df | t, 20 df | t, 30 df |
|---|---|---|---|---|
| 0.10 | 1.645 | 1.812 | 1.725 | 1.697 |
| 0.05 | 1.960 | 2.228 | 2.086 | 2.042 |
| 0.01 | 2.576 | 3.169 | 2.845 | 2.750 |
The gap between the z column and the t columns is the price of not knowing the population spread. With 10 degrees of freedom, a t of 2.228 is needed to reach the same 0.05 as a z of 1.960, roughly 14 percent further from the null. That extra distance exists because the sample standard deviation is itself an estimate, and it can come out too small by chance.
What a p value cannot tell you
The American Statistical Association statement on p values from 2016 lists six principles, and three of them address the common misreadings head on. A p value does not measure the probability that the hypothesis is true. It does not measure the probability that the data came from random chance alone. And it does not measure the size or the importance of an effect.
Each error is easy to make out loud. Saying that p = 0.03 means a 97 percent chance the treatment works flips the conditional: the p value is computed assuming the null, not the other way around.
Effect size is a separate question. A pill that drops 0.1 pounds per person becomes significant on a sample of 200,000 people, and nobody would call that result meaningful. Reporting the gap in its own units, next to a confidence interval, gives readers what the p value leaves out.
Multiple testing is the other trap. With an alpha of 0.05, each clean test still fires 5 percent of the time. Run 20 independent tests on data with no real effect and the chance of at least one false positive is 1 - 0.95 to the 20th power, which is 0.6415, or about 64 percent. That arithmetic is why a single striking result from a wide search deserves a repeat before it deserves belief.
A p value of 0.049 and one of 0.051 carry almost the same information, so a rule that treats them as different outcomes is a rule about paperwork. NIST puts it plainly: decide the threshold before the test, then report the number itself.
P values, intervals and sample size
A two-tailed p value and a confidence interval are two views of one calculation. If the 95 percent interval for a difference excludes zero, the two-tailed p value is below 0.05. Slide the interval until it touches zero and the p value reaches 0.05, not by coincidence but by construction.
The coffee example shows the link with numbers. The gap is 0.2 ounces and the standard error is 0.12, so the 95 percent interval is 0.2 plus or minus 2.064 x 0.12. That works out to 0.2 plus or minus 0.248, which spans -0.048 to 0.448. The interval contains zero, and the matching p value is 0.109, above 0.05.
On 100 bags the interval is 0.2 plus or minus 1.984 x 0.06, or 0.081 to 0.319. Zero is outside, and the p value is 0.0012. The interval also shows why the result is thin: the lower bound of 0.081 ounces is a gap a shopper would never notice, so the finding is real in the statistical sense and small in the practical one.
Sample size planning runs the same math backwards. Decide the smallest gap worth detecting, guess the spread, and choose the sample that puts the standard error small enough for that gap to reach significance. A pilot of 25 bags cannot detect a 0.2 ounce shortfall at the 0.05 level when the spread is 0.6, and no amount of analysis fixes that after the fact. A review of the ASA principles in clinical research makes the same point for trials: an underpowered study that reports a large p value has not shown that the effect is absent.
Frequently asked questions
How do I find the p value from a z score?
Look up the area beyond the z score on a normal curve. A z of 1.96 leaves 0.025 in each tail, so the two-tailed p value is 0.05. For a z of 2.1 the one-tailed value is 0.0179 and the two-tailed value is 0.0357.
What does p = 0.05 mean in plain words?
If the null hypothesis were true, a result this far from it would appear about 5 times in 100. It is a statement about how unusual the data are under the null, not a 95 percent chance that your hypothesis is correct.
When do I use t instead of z?
Use t when the spread comes from your own sample. On 24 degrees of freedom the 0.05 cutoff is 2.064 rather than 1.960, so a t of 1.667 gives p = 0.109 where a z of the same size gives 0.096.
Why is my two-tailed p twice the one-tailed value?
Because the two-tailed test counts both ends of a symmetric curve. A z of 2.1 puts 0.0179 in the upper tail, and the lower tail holds the same area, so 0.0179 x 2 = 0.0357.
Is a smaller p value always better?
No. A tiny p value can come from a gap too small to matter, especially in a large sample. Report the gap and its interval next to the p value, and treat 0.001 from a 0.05 ounce difference as a detail rather than a finding.
Can a p value prove the null hypothesis?
No. A large p value means the data are compatible with the null, not that the null is true. With 10 bags the coffee test gives p = 0.319, which reflects a noisy sample as much as an honest fill.
What is statistical significance at the 0.01 level?
It means the p value is below 0.01, a stricter bar than 0.05. On 20 degrees of freedom that needs a t of 2.845 instead of 2.086, and a normal curve needs a z of 2.576 instead of 1.960.
How many tests before a false positive shows up?
Each clean test at alpha 0.05 has a 5 percent false positive rate. Twenty independent tests on noise give at least one hit about 64 percent of the time, and 100 tests push that above 99 percent.
Does the p value depend on sample size?
Yes, strongly. The same 0.2 ounce gap gives p = 0.109 on 25 bags, 0.023 on 50 bags and 0.0012 on 100 bags, because the standard error shrinks as the sample grows.
What is a good p value for an A/B test?
0.05 is the common default, though a test that peeks at the data week after week inflates the false positive rate. Fix the sample size in advance, or use a correction that accounts for the number of looks.
Can a p value be exactly 0.05?
In practice it lands just above or below, and software prints something like 0.0501 or 0.0499. The line is a convention, so treat results within a few thousandths of it as inconclusive rather than as a clean verdict.
What is the difference between a p value and a confidence interval?
They carry the same information in different shapes. A 95 percent interval that excludes zero matches a two-tailed p below 0.05. The interval adds the size of the effect, which the p value hides.
Why do some studies report p below 0.001?
Software often caps the printed value. On a normal curve, p below 0.001 needs a z beyond 3.291, and on 20 degrees of freedom it needs a t beyond 3.850. The exact value adds little once it is that small.
Spotted a wrong number or a broken result?
More Math tools
Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.