P-Value Calculator

Enter your test statistic (z-score) and choose the test type: two-tailed, left-tailed, or right-tailed. You'll get the p-value and whether it's statistically significant at the 0.05 and 0.01 levels.

Put this calculator on your website for free

Copy one snippet and give your visitors a working P-Value Calculator.

Bell curve with both tails shaded beyond plus and minus the test statistic, showing that a two-tailed p-value is the combined tail area −|z| 0 +|z| p ÷ 2 p ÷ 2
A two-tailed p-value is the shaded area in both tails: the chance of a result at least this far from the mean in either direction. A one-tailed test counts one side only, which is why it returns half the figure.

How the p-value calculator works

A p-value answers a very specific question: if the null hypothesis were true, how often would random chance alone produce a result at least this extreme? The calculator takes your z-score and measures the tail area of the standard normal distribution beyond it. A two-tailed test counts extremes in both directions; a one-tailed test counts only the direction you predicted in advance.

The formula

Two-tailed: p = 2 × (1 − Φ(|z|))
Left-tailed: p = Φ(z)    Right-tailed: p = 1 − Φ(z)

Here Φ(z) is the standard normal cumulative distribution function (the share of the distribution at or below z), and |z| is the absolute value of your z-score.

Worked example

Your A/B test produces a z-score of 2.5, and you're running a two-tailed test:

Φ(2.5) ≈ 0.9938, so the upper tail is 1 − 0.9938 = 0.0062. Doubling for both tails:

p = 2 × 0.0062 = 0.0124

That's significant at α = 0.05 (0.0124 < 0.05) but not at α = 0.01 (0.0124 > 0.01). A result this extreme would occur by chance about 1.2% of the time under the null.

What a p-value is not

The single most common misreading: a p-value of 0.0124 does not mean there's a 1.24% chance the null hypothesis is true, and it does not mean a 98.76% chance your effect is real. The p-value is computed assuming the null is true, so it can't turn around and tell you the probability of that assumption. It also says nothing about the size or importance of an effect: with a huge sample, a difference too small to matter can still produce p < 0.001. Read a p-value as a measure of surprise under the null, then look at the effect size and confidence interval to decide whether the finding actually matters.

Frequently asked questions

What is a p-value in simple terms?

It's the probability of seeing data at least as extreme as yours if the null hypothesis were true. A small p-value says "this result would be surprising under the null," which counts as evidence against it. It is not the probability that the null hypothesis is true.

Is p = 0.05 significant?

The usual convention requires the p-value to be below the threshold, so p = 0.05 exactly does not clear α = 0.05. In practice, results that close to the line deserve skepticism either way; the difference between p = 0.049 and p = 0.051 is scientifically meaningless.

When do I use a two-tailed vs. a one-tailed test?

Use two-tailed when a difference in either direction would matter (the default in most research). Use a one-tailed test only when you specified the direction before collecting data and the opposite direction is genuinely irrelevant. Choosing one-tailed after seeing the data, just to halve your p-value, is a classic form of p-hacking.

How do I get a z-score to put into this calculator?

A z-test statistic is typically (sample mean − hypothesized mean) ÷ standard error, where the standard error is the population standard deviation divided by √n. Many software outputs report the z (or t) statistic directly. For large samples, a t-statistic is approximately a z-score.

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

No. With a big enough sample, even a trivially tiny effect produces a tiny p-value. Statistical significance says an effect is probably not zero; it says nothing about whether it's big enough to care about. Always look at the effect size and confidence interval alongside the p-value.

Related calculators