P-Value Calculator: Z, T, and Chi-Square
Enter your test statistic, choose its distribution and tail, and get the p-value with calculation steps. For t and chi-square tests, enter the degrees of freedom from your test.
Calculate your p-value
Enter a test statistic you have already calculated. Choose the tail from your hypothesis before looking at the result.
Calculated in your browser. Supports |statistic| ≤ 1,000,000 and df from 1 to 100,000. Extreme probabilities may be below floating-point precision.
Choose the distribution used by your test
Use the standard normal option for a Z statistic, Student’s t for a t statistic, and chi-square for a chi-square statistic. This tool converts a statistic into a tail probability; it does not determine which test is appropriate for your data or calculate the statistic from raw observations.
The alternative hypothesis determines the tail
A right-tailed test measures area at or above the observed statistic; a left-tailed test measures area at or below it. For the symmetric Z and t distributions, a two-tailed p-value is twice the smaller tail area. Select the tail before viewing the result, according to the hypothesis you planned to test.
- Greater-than alternatives use the right tail.
- Less-than alternatives use the left tail.
- Different-from alternatives use both tails for Z and t tests.
- Chi-square independence and goodness-of-fit tests use the right tail. Two-sided chi-square variance tests are not implemented here.
Enter the correct degrees of freedom
Degrees of freedom change the distribution and the p-value. A one-sample t test often uses n − 1; a Welch test can have fractional degrees of freedom. A chi-square independence test uses (rows − 1)(columns − 1). Use the df produced by your test, because other test designs have different rules. The calculator does not infer df from the statistic.
A worked Z-test example
A Z statistic of 1.96 has about 0.025 in the right tail. A right-tailed test therefore gives p ≈ 0.025, while a two-tailed test gives p ≈ 0.050. The test direction changes the question being asked, so it must not be selected afterward to obtain a smaller p-value.
Interpret a p-value in context
A p-value describes how extreme a result is under a specified null model and its assumptions. Compare it with a significance level chosen in advance, and report effect size, uncertainty, and study design alongside it. A small p-value does not measure practical importance. A large p-value does not prove the null hypothesis. Very small probabilities are shown in scientific notation; underflow is labelled instead of being presented as an exact zero.
Related free tools
Frequently Asked Questions
How do I find a p-value from a Z score?
Select standard normal Z, enter the signed Z score, and choose the tail from your alternative hypothesis. No degrees of freedom are needed for the standard normal distribution.
Why do t and chi-square tests need degrees of freedom?
Their distribution shapes depend on degrees of freedom. The same statistic can have different tail probabilities for different df, so the calculator requires an explicit value.
Can I use fractional degrees of freedom?
Yes for a t test, including Welch’s t test. This calculator accepts df from 1 to 100,000; its chi-square mode requires whole-number df.
Is a p-value the probability that the null hypothesis is true?
No. It is a probability of results at least as extreme in the specified tail or tails, calculated under the null model and its assumptions. It is not a probability assigned to the hypothesis itself.
Why can a p-value be extremely small?
An extreme statistic can have a very small tail area under the null model. The calculator preserves small tails directly where possible and reports values below floating-point precision without calling them exact zero.
