Free tool P-value calculator and p-value formula
Your test gave you a z-score or a t-statistic. Enter it here to get the p-value: the chance of seeing a result at least this extreme if there were no real effect. Add degrees of freedom for a t-test.
- Normal or Student t
- One- or two-tailed
- Runs locally
Enter the test statistic
Leave degrees of freedom empty for a z-test. Fill them in and the calculator switches to the Student t distribution.
The z-score or t-value your test reported. Negative values work the same as positive ones.
Leave empty for a z-test. Values below 1 are ignored. Decimals are fine, for example from a Welch t-test.
Two-tailed tests for a difference in either direction. Use one-tailed only for a direction fixed before the test.
p-value
0.020
The probability of a statistic at least this extreme if there were no real effect.
Share these inputs: the values go after the # in the link, so they never reach a server.
https://tapcub.com/tools/p-value-calculator
Version v1.0Updated Update history
What the p-value tells you, and what it does not
A p-value measures how surprising your data would be if nothing were going on. It does not measure how likely your idea is to be true, or how large the effect is.
p-value
With z = 2.33, two-tailed, p = 0.020: if there were no real difference, a result this extreme would appear about 2 times in 100.
Critical value
The threshold for the statistic itself. Two-tailed at 5% it is 1.960 for z; for t it is larger and depends on the degrees of freedom (2.024 at df = 38).
The verdict
The calculator compares p with 0.05. Below it, the result is significant at the 5% level; at or above it, the data are consistent with no effect.
Significance is not size
A tiny effect measured on a huge sample can have a very small p-value. Read the effect size or a confidence interval next to it before deciding anything.
p-values near the threshold, such as 0.04 or 0.06, are weak evidence either way. Treat 0.05 as a convention, not a cliff.
Three inputs from your test output
Most statistics tools print a test statistic. This calculator turns it into a p-value when they do not, or lets you check the one they printed.
-
1
Copy the statistic
Take the z-score or t-value from your test. For two conversion rates, the conversion rate calculator gives z directly.
-
2
Add degrees of freedom for a t-test
For a one-sample t-test, df = n − 1. For a two-sample t-test with pooled variance, df = n₁ + n₂ − 2. Leave empty for a z-test.
-
3
Choose the tails
Two-tailed unless you decided on one direction before collecting data. Switching to one-tailed after the fact halves p and is not legitimate.
From a test statistic to a p-value
The p-value is the area in the tail of the distribution beyond your statistic. Without degrees of freedom the calculator uses the standard normal distribution; with them, Student’s t, whose tails are heavier for small samples.
- Two-tailed p counts both tails: values at least as far from zero in either direction
- One-tailed p is half the two-tailed p, which assumes the statistic points the way you predicted
- With many degrees of freedom, t and z give almost the same p-value
- The critical value is the statistic at which p equals 0.05
Two-tailed, z
p = 2 × (1 − Φ(|z|))
z = 2.33: 2 × (1 − 0.9901) = 0.020
One-tailed, z
p = 1 − Φ(|z|)
z = 2.33: 0.0099
Two-tailed, t
p = P(|T| ≥ |t|), T ~ Student t with df degrees of freedom
t = 2.10, df = 38: p = 0.042
5% critical value
z* = 1.960 two-tailed, 1.645 one-tailed; t* depends on df
df = 38: t* = 2.024 two-tailed
The same statistic, different settings
How tails and degrees of freedom change the p-value. The last column compares p with 0.05.
| Statistic | Degrees of freedom | Tails | p-value | 5% critical value | Significant at 5%? |
|---|---|---|---|---|---|
| z = 1.50 | — | Two | 0.134 | 1.960 | No |
| z = 2.33 | — | Two | 0.020 | 1.960 | Yes |
| z = 2.33 | — | One | 0.0099 | 1.645 | Yes |
| t = 2.10 | 38 | Two | 0.042 | 2.024 | Yes |
| t = 2.10 | 9 | Two | 0.065 | 2.262 | No |
| z = 3.30 | — | Two | < 0.001 | 1.960 | Yes |
The same 2.10 is significant with 38 degrees of freedom and not with 9: small samples have heavier tails, so the bar is higher. As a z-score, 2.10 would give 0.036. Sample figures.
How p-values get misread
The calculation is exact. The interpretation is where most errors happen.
"95% chance the variant wins"
p = 0.05 does not mean a 95% probability that the effect is real. It describes the data under "no effect", not the hypothesis.
Picking one tail afterwards
Choosing one-tailed after seeing which way the data went halves p for free. The calculator also halves p, so only use it for a direction fixed in advance.
Testing until something hits
Run twenty comparisons with no real effect and the chance that at least one comes out below 0.05 is about 64%. Decide the metric and the test before looking.
z for small samples
With a small sample the t distribution applies. Treating t = 2.10 with 9 degrees of freedom as z turns p = 0.065 into 0.036.
Clean counts before the test
A p-value is only as good as the numbers behind it. TapCub keeps those numbers consistent: one definition per converting event, funnels with a fixed time window, and bots kept out of the denominator.
P-value questions
Still have a question?
Chat with the team behind TapCub — we usually reply within a few hours on business days.
How do I calculate a p-value? What is the formula?
Compute the test statistic first, then take the tail area beyond it. For a z-score, the two-tailed p-value formula is p = 2 × (1 − Φ(|z|)), where Φ is the standard normal distribution function. For z = 2.33: 2 × (1 − 0.9901) = 0.020; one-tailed, halve it: 0.0099. For a t-statistic, use the t distribution with its degrees of freedom instead of Φ.
What is a p-value?
The probability of getting a test statistic at least as extreme as the one you observed, assuming there is no real effect (the null hypothesis). A small p-value means the data would be surprising if nothing were going on.
How do I get a p-value from a t-statistic?
You also need the degrees of freedom: n − 1 for a one-sample test, n₁ + n₂ − 2 for a two-sample test with pooled variance, or the fractional value a Welch test reports. t = 2.10 with 38 degrees of freedom gives p = 0.042 two-tailed.
Should I use a one-tailed or two-tailed test?
Two-tailed in almost every case, including most A/B tests, because a change can make things worse as well as better. One-tailed is only appropriate when you fixed the direction before collecting data and would treat an effect in the other direction the same as no effect.
Does p below 0.05 mean there is a 95% chance my result is real?
No. The p-value is calculated assuming there is no effect; it cannot give the probability that there is one. It says how unusual the data are under "no effect", nothing more.
What is a good p-value?
There is no good or bad p-value, only a threshold you choose before the test. 0.05 is the common convention; 0.01 is stricter. A p-value just above the threshold is not proof of no effect, and one just below is not proof of a large one.
Why does my software show a different p-value?
Check the tails, the distribution and the degrees of freedom. A two-tailed p is twice the one-tailed p, and a t-test with few degrees of freedom gives a larger p than a z-test for the same statistic.
Update history
New features, fixes and data refreshes for this tool, newest first.
-
· v1.0
LaunchedFirst release.
Missing something or found an error? Tell us — requests that come up often go into the next update. All tool updates
Size the next test before you run it
A p-value is only valid at a sample size decided in advance. Work that out before the next test starts.