P-value Calculator — Statistical Significance from Z & T Test Scores
Compute p-values from Z-scores or T-scores for one-tailed and two-tailed hypothesis tests. Free online calculator with formula guide and step-by-step results.
See it worked out
Example — Test Statistic (Z or T) 2.13, Degrees of Freedom (df) 30:
p-value
0.0165857
Significance Level (α)
0.01
Confidence Level
99%
Critical Value (one-tailed)
2.326
Statistically Significant?
No
Action
Fail to reject the null hypothesis H₀
Evidence Strength
Moderate evidence against the null hypothesis
Conclusion
Since p = 0.016586 ≥ α = 0.01, the results are not statistically significant. You fail to reject the null hypothesis. Moderate evidence against the null hypothesis.
Test Statistic
2.13
Test Distribution
Standard Normal (Z)
Test Direction
One-tailed (directional)
The formula
p = P(Z ≥ |z|) for two-tailed | p = P(Z ≥ z) for one-tailed | Reject H₀ if p < α
- p
- p-value
- α (alpha)
- Significance Level
- Z
- Z-test Statistic
- T
- T-test Statistic
- df
- Degrees of Freedom
Worked example — Test Statistic (Z or T) 2.13, Degrees of Freedom (df) 30
p-value = 0.0165857
How P-value Calculator — Statistical Si Works
p = P(Z ≥ |z|) for two-tailed | p = P(Z ≥ z) for one-tailed | Reject H₀ if p < α
The p-value is the probability of observing a test statistic at least as extreme as the one computed from your data, assuming the null hypothesis (H₀) is true. A small p-value (p < α) suggests the observed effect is statistically significant — meaning it is unlikely to have occurred by random chance alone. The significance level α is chosen BEFORE looking at the data (typically 0.05). For a Z-test, the p-value is computed from the standard normal distribution. For a T-test, it is computed from Student's t-distribution with n−1 degrees of freedom, which has heavier tails than the normal distribution to account for the uncertainty in estimating the population standard deviation from the sample.
- p
- p-value — Probability of observing data at least as extreme as the test statistic, assuming the null hypothesis is true. Ranges from 0 to 1. Smaller values indicate stronger evidence against H₀. NOT the probability that H₀ is true.
- α (alpha)
- Significance Level — The threshold for statistical significance, chosen before data collection. Common values: 0.05 (95% confidence, standard in most fields), 0.01 (99% confidence, medical trials), 0.10 (90% confidence, exploratory research). If p < α, reject H₀.
- Z
- Z-test Statistic — Calculated as (x̄ − μ₀) / (σ/√n). Used when the population standard deviation σ is known. Follows the standard normal distribution N(0,1) under H₀. Large sample sizes (n > 30) approximate normality via the Central Limit Theorem.
- T
- T-test Statistic — Calculated as (x̄ − μ₀) / (s/√n). Used when σ is unknown and estimated by sample standard deviation s. Follows Student's t-distribution with df = n−1. Has heavier tails than normal for small samples.
- df
- Degrees of Freedom — A parameter of the t-distribution controlling its shape. Typically n − 1 for a single sample t-test. As df → ∞, the t-distribution converges to the standard normal distribution. For df > 30, the normal approximation is reasonable.
How to Use
- Select Z-test or T-test based on your data. Use Z when the population standard deviation is known or the sample size is large (n > 30). Use T when the standard deviation is estimated from the sample.
- Enter the test statistic (Z-score or T-score). For Z-tests, typical values between -4 and +4 are common; values beyond ±6 indicate extremely strong evidence.
- For T-tests, enter the degrees of freedom (df). For a single sample, df = n − 1. For a two-sample test with equal variances, df = n₁ + n₂ − 2.
- Choose your significance level α: 0.05 is standard for most research fields; 0.01 is used in medical and safety-critical contexts where false positives are costly; 0.10 is for exploratory or preliminary research.
- Select the test direction: one-tailed if your hypothesis predicts a specific direction (e.g., "the new drug lowers blood pressure"), two-tailed if it only predicts a difference (e.g., "the drug changes blood pressure"). Two-tailed is more conservative and is the default in most scientific publications.
- Interpret the results: the calculator provides the p-value, the evidence strength category, a plain-English conclusion, and the critical value for your chosen α.
Quick Reference
| p < α | Reject H₀ — result is statistically significant |
| p ≥ α | Fail to reject H₀ — insufficient evidence |
| α = 0.05 | Standard threshold in most research fields |
| α = 0.01 | Strict threshold (medical, safety-critical) |
| α = 0.10 | Liberal threshold (exploratory research) |
| One-tailed | Tests for effect in one direction only |
| Two-tailed | Tests for effect in either direction (×2 p-value) |
| Type I Error (α) | False positive — rejecting a true H₀ |
| Type II Error (β) | False negative — failing to reject false H₀ |
| Statistical Power | 1 − β — probability of detecting a real effect |
Common Uses
- •Medical and pharmaceutical research: comparing treatment vs. placebo groups in randomized controlled trials, with p < 0.05 typically required for FDA drug approval
- •A/B testing for websites and apps: comparing conversion rates between two versions of a landing page to determine if design changes significantly improve user behavior
- •Quality control in manufacturing: testing whether a production batch meets specifications by comparing the sample mean to the target value
- •Psychology and social sciences: testing hypotheses about human behavior using surveys and experiments — the replication crisis has led to calls for lower α thresholds (e.g., 0.005)
- •Economics and finance: testing whether market anomalies (like the January effect or momentum) are statistically significant or explainable by random variation
- •Agricultural field trials: comparing crop yields between different fertilizer treatments or seed varieties to determine which is genuinely superior
Understanding the Result
The p-value approach to hypothesis testing, developed by Ronald Fisher in the 1920s and later integrated with the Neyman-Pearson framework, is the dominant paradigm for statistical inference across scientific research. A p-value less than the chosen significance level α indicates that the observed result would be unlikely under the null hypothesis — suggesting the effect is real rather than due to random chance. However, the p-value is one of the most widely misunderstood concepts in statistics. A common but incorrect interpretation is that the p-value is the probability that the null hypothesis is true — it is NOT. It is the probability of observing data at least as extreme as yours IF the null hypothesis were true: P(data | H₀), not P(H₀ | data). Also, statistical significance does NOT imply practical significance: with a very large sample size, even a trivially small effect can achieve p < 0.05. Always consider the effect size (Cohen's d, r², or confidence intervals) alongside the p-value. The American Statistical Association's 2016 statement on p-values emphasized these points and recommended reporting effect sizes and confidence intervals alongside p-values. The calculator computes p-values using the Abramowitz and Stegun approximation for the normal CDF and a regularized incomplete beta function for the t-distribution, providing accuracy to approximately 6 decimal places.
Worked Examples
A pharmaceutical company tests a new blood pressure medication against a placebo. The sample of 100 patients taking the drug has a mean systolic reduction of 5.2 mmHg (SD = 15). The null hypothesis is that the drug has no effect (μ = 0). The test statistic is Z = (5.2 − 0) / (15/√100) = 5.2 / 1.5 = 3.467. Use a two-tailed test at α = 0.05.
testType = z · score = 3.467 · alpha = 0.05 · tails = two
p ≈ 0.00053. Significant at α = 0.05 — reject H₀. Critical value: 1.96. Very strong evidence against the null hypothesis.
p ≈ 0.00053. Since p < 0.05, the result is statistically significant — the drug does lower blood pressure. The p-value of 0.00053 means that if the drug truly had no effect, you would observe a reduction this large or larger only about 5 times in 10,000 experiments. This is very strong evidence. The critical value for a two-tailed Z-test at α = 0.05 is 1.96, and |3.467| > 1.96, confirming significance.
An education researcher wants to know if a new teaching method improves test scores. A class of 25 students is taught with the new method and their mean score is 78 (SD = 10). The traditional method has a known mean of 75. Is the improvement significant? Use a one-tailed t-test at α = 0.05 with df = 24.
testType = t · score = 1.5 · df = 24 · alpha = 0.05 · tails = one
p ≈ 0.073. Not significant at α = 0.05 — fail to reject H₀. The improvement could be due to random variation; consider increasing sample size.
T = (78 − 75) / (10/√25) = 3 / 2 = 1.5. The one-tailed p-value for T=1.5 with df=24 is approximately 0.073. Since p ≥ 0.05, the result is NOT statistically significant at the 5% level. The improvement could be due to random variation. The researcher might consider increasing the sample size — with 25 students, the test has limited power to detect small effects. If the same T-score were observed with df=100, the p-value would drop below 0.05, illustrating how larger samples provide more statistical power.
A data scientist runs an A/B test on a website's checkout button. Variant A (original, blue button) had 1,000 visitors and 50 purchases (5.0% conversion). Variant B (new, green button) had 1,000 visitors and 65 purchases (6.5% conversion). The Z-score for the difference in proportions is approximately 1.46. Is the green button significantly better at α = 0.05, two-tailed?
testType = z · score = 1.46 · alpha = 0.05 · tails = two
p ≈ 0.144. Not significant at α = 0.05 — fail to reject H₀. Despite the 1.5pp improvement, the sample size is insufficient to rule out chance. Run the test longer.
The two-tailed p-value is approximately 0.144. Since p ≥ 0.05, the difference is NOT statistically significant at the 5% level. Despite the 1.5 percentage point improvement in observed conversion rate, the sample size is insufficient to rule out chance. The data scientist should either run the test longer to collect more data or accept that the current evidence is suggestive but not conclusive. This illustrates why A/B test calculators usually require minimum sample sizes before declaring a winner.
Frequently Asked Questions
- What does "statistically significant" actually mean?
- A result is statistically significant when the p-value is less than the chosen significance level α (usually 0.05). This means the observed effect is unlikely to have occurred by random chance alone — specifically, if the null hypothesis were true, you would see a result this extreme less than 5% of the time. It does NOT mean the effect is practically important, large, or even real — it only quantifies how surprising the data would be under H₀. The American Statistical Association (2016) emphasized that p-values should be reported alongside effect sizes and confidence intervals, not as a binary "significant/not significant" judgment.
- What is the difference between one-tailed and two-tailed tests?
- A one-tailed test checks for an effect in one specific direction only (e.g., "the new drug LOWERS blood pressure"). A two-tailed test checks for an effect in either direction (e.g., "the new drug CHANGES blood pressure"). The two-tailed p-value is always twice the one-tailed p-value for the same test statistic, making it more conservative (harder to reject H₀). Two-tailed tests are the standard in most scientific publications because they do not assume you know the direction of the effect in advance. Only use a one-tailed test when you have a strong theoretical reason to predict the direction AND you genuinely would not care about a finding in the opposite direction.
- What significance level (α) should I use for my research?
- α = 0.05 (95% confidence) is the conventional standard across most fields. α = 0.01 (99% confidence) is used for more stringent tests where false positives are very costly — medical device trials, drug safety studies, and confirmatory research. α = 0.10 (90% confidence) is sometimes used for exploratory or pilot research where the goal is to identify promising effects for further study. In fields affected by the replication crisis (psychology, social science), some have advocated for lowering the default threshold to α = 0.005. The critical rule: set your α BEFORE collecting data, and report the actual p-value alongside your α threshold so readers can make their own judgments.
- What is the difference between a Z-test and a T-test?
- Both test whether a sample mean differs from a hypothesized population mean, but they differ in what they assume about the population variance. A Z-test requires knowing the true population standard deviation σ — this is rare in practice, but the Z-test is valid for large samples (n > 30) by the Central Limit Theorem. A T-test uses the sample standard deviation s as an estimate of σ, which adds uncertainty — the t-distribution has heavier tails than the normal distribution to account for this. As the sample size increases, the t-distribution converges to the normal distribution. In practice, most real-world hypothesis testing uses t-tests because σ is almost never truly known.
- If my p-value is 0.051, should I conclude "almost significant"?
- No. The α = 0.05 threshold is a convention, not a law of nature. A p-value of 0.051 is not meaningfully different from 0.049 — both indicate roughly the same strength of evidence. The practice of describing results as "marginally significant" or "trending toward significance" is controversial because it treats the 0.05 cutoff as a cliff rather than a continuous measure. If your p-value is near the threshold, the honest approach is to report the exact p-value, discuss the practical significance of the effect size, and acknowledge the uncertainty. Do not round down (p = 0.054 is not p < 0.05) — that is p-hacking. If the result is borderline, consider collecting more data or reporting that the evidence is suggestive but not conclusive.
- How do degrees of freedom (df) affect the p-value?
- Degrees of freedom control the shape of the t-distribution. With df = 1, the t-distribution has very heavy tails — you need a large T-score to achieve significance. With df = 5, the tails are still noticeably heavier than the normal distribution. With df = 30, the t-distribution is very close to normal. With df → ∞, the t-distribution IS the normal distribution. In practice, this means that the same T-score produces a higher (less significant) p-value when df is small, because the extra uncertainty from estimating σ from a small sample is correctly accounted for. For Z-tests, df is not needed because σ is assumed known — the distribution is always standard normal.
Pro Tips
- →Always choose your significance level α BEFORE collecting data. "Data dredging" or "p-hacking" — choosing α after seeing the p-value — inflates the Type I error rate and is a major contributor to the replication crisis in science.
- →For A/B testing, set a minimum sample size before starting. Use a sample size calculator to determine how many observations you need to detect the minimum effect size you care about (statistical power analysis).
- →Report the actual p-value (not just "p < 0.05") along with the effect size and confidence interval. A p-value of 0.049 and 0.001 are very different levels of evidence, even though both are "significant" at α = 0.05.
- →When in doubt, use a two-tailed test. One-tailed tests should only be used when you have a strong directional hypothesis with a theoretical basis — and you genuinely would not care about an effect in the opposite direction.
Limitations to Know
- •For extreme Z-scores (|Z| > 8), the p-value may be reported as 0 or 1 due to floating-point precision limits — the effect is overwhelmingly significant or non-significant and the exact p-value is not meaningful.
- •The t-distribution approximation becomes less accurate for very small degrees of freedom (df < 3) and very large T-scores.
- •This calculator does NOT compute the test statistic from raw data — you must compute the Z-score or T-score yourself using the appropriate formula.
- •It does not compute confidence intervals, effect sizes, or perform power analysis.
- •Do not use for non-parametric tests (Mann-Whitney, Wilcoxon, Kruskal-Wallis), F-tests (ANOVA), chi-square tests, or multiple comparisons without correction (Bonferroni, Holm, Benjamini-Hochberg).
Cite this calculator
TheCalcUniverse. "P-value Calculator — Statistical Significance from Z & T Test Scores." TheCalcUniverse, 2026, https://thecalcuniverse.com/math/p-value-calculator/. Accessed July 24, 2026.
Embed this calculator on your site
You may also like
-
Z-Score Calculator — Free Online Ca
Calculate the Z-score from a raw score, population mean, and standard deviation. Visualizes the result on a st…
-
Confidence Interval
Calculate confidence intervals for a population mean. Breaks out the Margin of Error (MOE), critical Z-value, …
-
Sample Size
Determine the ideal sample size for surveys and research studies. Adjust for population size, confidence level…
-
Statistics
Comprehensive descriptive statistics calculator with a dynamic box-and-whisker plot. Computes the five-number …