P-Value Calculator
Enter a z, t, chi-square, or F test statistic to find the p-value for two-tailed, left-tailed, or right-tailed tests. Choose the distribution, degrees of freedom, and significance level to see whether your result is statistically significant.
Find the P-Value of Your Test
P-Value Formula
- \(T\) — the test statistic's random variable (Z, t, χ², or F) under the null hypothesis \(H_0\)
- \(t\) — the observed value of your test statistic
- \(P(T \ge t)\) — the probability of observing a value at least as extreme as \(t\), in the right tail
For each distribution the tail probabilities come from the corresponding cumulative distribution function: the standard normal CDF \(\Phi(z)\) for Z, the Student t CDF with \(df\) degrees of freedom, the chi-square CDF, or the F CDF with \(df_1\) and \(df_2\) degrees of freedom. The calculator evaluates these numerically, so no statistical tables are needed.
P-Value – Calculation Example
Example: a two-sample t-test produced a test statistic of \(t = 2.5\) with \(df = 20\), and the alternative hypothesis is two-sided (\(\neq\)).
\[ p = 2 \cdot P(T \ge 2.5) = 2 \times 0.0106 = 0.0213 \]
Result: the p-value is 0.0213. Since \(0.0213 \le 0.05\), the result is statistically significant at \(\alpha = 0.05\) — reject \(H_0\).
How to Use the Calculator
- Enter your Test statistic (the z, t, χ², or F value you already computed from your data).
- Select the Distribution the statistic follows under \(H_0\): Standard normal (Z), Student t, Chi-square (χ²), or F-distribution.
- Choose the Tails that match your alternative hypothesis: Two-tailed (≠), Right-tailed (>), or Left-tailed (<).
- If you selected t or χ², enter the Degrees of freedom (df). If you selected the F-distribution, enter both Numerator df (df₁) and Denominator df (df₂); these fields appear automatically.
- Pick your Significance level (α) — 0.05, 0.01, or 0.10 — so the calculator can state the conclusion of the test.
- Read the P-value, the Tail probability in the direction of your statistic, and the Details & conclusion, which lists both tail probabilities and the reject/fail-to-reject decision at α.
What Is a P-Value?
The p-value answers one specific question: if the null hypothesis were true, how likely is it to obtain a test statistic at least as extreme as the one you observed? It is a probability between 0 and 1, not the probability that the null hypothesis is true or false. A small p-value means the observed data would be surprising under \(H_0\), which is evidence against the null hypothesis.
Researchers compare the p-value to a pre-chosen significance level \(\alpha\), usually 0.05. If \(p \le \alpha\), the result is called statistically significant and the convention is to reject \(H_0\). If \(p > \alpha\), you fail to reject \(H_0\). Note that failing to reject is not the same as proving \(H_0\) true — it only means the data do not provide enough evidence against it.
The number of tails matters. A two-tailed test detects deviations in either direction, so the p-value includes both extreme tails. A right-tailed test is used when the alternative claims a value is greater than the null value (common for χ² and F tests, which are naturally right-tailed). A left-tailed test applies when the alternative claims a smaller value. Choosing the wrong tail can make a real result look non-significant, so the tails must match the alternative hypothesis you formulated before looking at the data.
To interpret the strength of evidence informally: \(p < 0.001\) is very strong, \(p < 0.01\) is strong, \(p < 0.05\) is moderate, and \(p < 0.10\) is weak. Values above 0.10 provide little evidence against \(H_0\). These are conventions, not thresholds with magical meaning.
Which Distribution Should You Choose?
- Standard normal (Z) — large-sample tests about means and proportions when the population variance is known or the sample is large enough for the Central Limit Theorem. If you need the statistic itself first, use the Z-Score Calculator.
- Student t — tests about means with small samples or unknown population variance; requires one df value, usually \(n - 1\) or \(n_1 + n_2 - 2\).
- Chi-square (χ²) — goodness-of-fit tests and independence tests on contingency tables; the df depends on the number of categories or cells. These tests are almost always right-tailed.
- F-distribution — ANOVA and comparisons of variances; requires numerator df \(df_1\) and denominator df \(df_2\). Also almost always right-tailed.
If you are not yet at the testing stage, our Normal Distribution Calculator and Confidence Interval Calculator cover the related probability and estimation tasks.
Assumptions, Limitations, and Practical Tips
- The calculator needs an already-computed statistic. It does not compute z, t, χ², or F from raw data — you must supply the statistic from your test. Check your statistics software or course notes for the value.
- The statistic must follow the chosen distribution under \(H_0\). This requires the test's own assumptions to hold: random sampling, approximate normality or large samples for Z/t, expected cell counts of at least 5 for χ², and homogeneity of variance for standard ANOVA.
- Set α before the test. Choosing the significance level after seeing the p-value inflates false-positive rates. If your significance level is not listed, compare the reported p-value to your α manually.
- For χ² and F, use right-tailed tests. These statistics are non-negative, and their tests are conventionally one-sided; the calculator's two-tailed option doubles the smaller tail, which rarely matches a real hypothesis for these distributions.
- Statistical significance is not practical importance. With a large enough sample, tiny, meaningless differences become significant. Report the effect size and a confidence interval alongside the p-value, and make sure your sample size was planned sensibly — see the Sample Size Calculator.
- Very small p-values are reported in scientific notation (e.g., 2.1e−05, meaning \(2.1 \times 10^{-5}\)).
Frequently Asked Questions
How do I calculate a p-value by hand without a calculator?
For a z-test, use the standard normal CDF: for a right-tailed test, \(p = 1 - \Phi(z)\), and for a left-tailed test, \(p = \Phi(z)\). Values of \(\Phi(z)\) come from a normal distribution table: look up your z-value (rounded to two decimals), read the table probability, and take the complement for the right tail. For t, χ², and F tests you would need the corresponding statistical tables, which is exactly what this calculator replaces by computing the CDF numerically.
What is a good or normal p-value?
There is no objectively "good" value — the p-value depends on your data and sample size. By convention, results with \(p \le 0.05\) are called statistically significant, and \(p \le 0.01\) highly significant. However, these thresholds are conventions, not proof. A small p-value indicates strong evidence against the null hypothesis, not that your finding is large or important. Always report the effect size and confidence interval alongside the p-value.
Is the p-value the probability that the null hypothesis is true?
No — this is the most common misinterpretation. The p-value is the probability of observing a test statistic at least as extreme as yours, assuming the null hypothesis is true. A p-value of 0.03 does not mean there is a 3% chance the null hypothesis is correct. It also cannot tell you the probability that your alternative hypothesis is true; that would require a Bayesian approach.
Why is my p-value different from the one in SPSS, R, or Excel?
Check the number of tails first: software may report a two-tailed p-value by default, which is roughly double the one-tailed value. Also verify the degrees of freedom, since tests like Welch's t-test use a different df than the standard pooled version. Finally, rounding of the test statistic or the use of continuity corrections in χ² tests can shift the p-value slightly. Small differences in the third or fourth decimal are usually just rounding.
Can I convert a two-tailed p-value into a one-tailed one (or vice versa)?
If the test statistic points in the direction of your one-sided alternative, the one-tailed p-value is half the two-tailed value: \(p_{one} = p_{two}/2\). If it points in the opposite direction, the one-tailed p-value exceeds 0.5 and the result cannot be significant. Importantly, you should decide on the number of tails before running the test — switching afterward just to reach significance inflates the false-positive rate and is considered p-hacking.
What if my test statistic is negative?
Negative values are perfectly normal for z and t statistics — they simply indicate the sample mean lies below the hypothesized value. Enter the negative number as is; the calculator uses the left tail automatically. However, χ² and F statistics can never be negative because they are built from squared quantities. If your χ² or F value is negative, a calculation error occurred somewhere upstream — recheck your formulas.
Can a p-value be 0 or greater than 1?
A p-value is always strictly between 0 and 1, because it is a probability. It can be extremely small (for example \(2.1 \times 10^{-5}\), displayed as 2.1e-05), but never exactly zero — software that prints "0.000" is just rounding. If you get a value above 1 or a negative number, an input error was made, such as entering a probability instead of a test statistic or misreading the output field.