How it works
A p-value tells you how surprising your result would be if there were really no effect. Small values mean data this extreme would be rare under the null hypothesis, so you reject it when the p-value falls below the significance level you chose before running the test, usually 0.05.
Pick the distribution your test uses. Z tests (large samples, known standard deviation, proportions) use the standard normal curve. T tests (comparing means with a sample standard deviation) use Student's t with the degrees of freedom from your test. Chi-square tests (goodness of fit, independence in a contingency table) use the upper tail of the chi-square distribution.
A two-tailed test counts results that are extreme in either direction and doubles the smaller tail. Use one tail only if you set a direction (greater than or less than) before looking at the data.
The calculator works out exact tail areas with the regularized incomplete beta and gamma functions, the same method statistics software uses, so results match tables and programs such as R and Excel to at least four decimal places.
Formula
Z: p = 2 × (1 − Φ(|z|)) two-tailed · T: P(T > |t|) = ½ × I(df ÷ (df + t²); df/2, ½) · Chi-square: p = Q(df/2, χ²/2)
Sources
- NIST/SEMATECH e-Handbook of Statistical Methods: critical values of the t distribution
- NIST/SEMATECH e-Handbook of Statistical Methods: critical values of the chi-square distribution
Questions people ask
What is the p-value for a z-score of 1.96?
About 0.05 two-tailed (0.0500) and 0.025 one-tailed. That is why 1.96 is the critical value for a 95% confidence level.
How do I find the degrees of freedom?
For a one-sample or paired t test, df = n − 1. For a two-sample t test with equal variances, df = n₁ + n₂ − 2 (Welch's test gives a decimal df; round down). For a chi-square test of independence, df = (rows − 1) × (columns − 1).
Should I use a one-tailed or two-tailed test?
Use two-tailed unless you decided on a direction before collecting data and a result in the other direction would mean nothing to you. A one-tailed p-value is half the two-tailed one, so switching after the fact overstates significance.
Does p < 0.05 mean the result is important?
No. It means the result is unlikely to be chance alone under the null hypothesis. With a large sample, tiny and unimportant differences can be significant, so report the effect size and a confidence interval too.