A p-value calculator turns a test statistic into a p-value. Choose a z score, a t statistic or a chi-square statistic, enter its value and, for t and chi-square, the degrees of freedom, pick one or two tails, and this p-value calculator gives the exact p-value and whether the result is significant at your chosen significance level, such as 0.05.
What a p-value is
In null-hypothesis significance testing, the p-value is the probability of obtaining test results at least as extreme as the result actually observed, assuming the null hypothesis is correct. A very small p-value means such an extreme result would be very unlikely if the null hypothesis were true. Working it out needs a null hypothesis, a test statistic, a decision about whether the test is one-tailed or two-tailed, and the cumulative distribution of the statistic under the null hypothesis, which is what this calculator computes.
Significance level
In a significance test, the null hypothesis is rejected if the p-value is less than a predefined threshold α, called the alpha level or significance level. α isn't derived from the data; the researcher sets it before looking at the data. It's commonly set to 0.05, though lower levels such as 0.01 are sometimes used. The calculator compares your p-value with α and says whether to reject the null hypothesis.
What a p-value doesn't tell you
Misinterpreting p-values is common. In 2016 the American Statistical Association stated that p-values do not measure the probability that the studied hypothesis is true, or the probability that the data were produced by random chance alone, and that a p-value does not measure the size of an effect or the importance of a result. A small p-value with a tiny effect may matter little in practice, and a large p-value doesn't prove there's no effect. Report the effect size and confidence interval alongside the p-value.
The three tests
- Z score: for statistics that follow the standard normal distribution, such as a z test with a known standard deviation or a large-sample test of proportions.
- t statistic: for t tests, which use Student's t distribution with the degrees of freedom of your test, such as n − 1 for a one-sample test.
- Chi-square: for chi-square tests of goodness of fit or independence. The degrees of freedom are, for example, the number of categories minus one, or (rows − 1) × (columns − 1) for a table. Chi-square tests are right-tailed.
One tail or two?
A two-tailed test asks whether the result differs from the null hypothesis in either direction, so it counts extreme results on both sides. A right-tailed test asks only whether it's larger, and a left-tailed test only whether it's smaller. For the same statistic, a two-tailed p-value is twice the smaller one-tailed p-value. Decide which you need before you look at the data.
Examples
- z = 1.96, two-tailed: p ≈ 0.05, right at the usual threshold.
- z = 1.645, right-tailed: p ≈ 0.05.
- t = 2.0 with 10 degrees of freedom, two-tailed: p ≈ 0.0734, not significant at 0.05.
- t = 2.228 with 10 degrees of freedom, two-tailed: p ≈ 0.05.
- χ² = 3.841 with 1 degree of freedom: p ≈ 0.05.
How to use the p-value calculator
- Choose the distribution of your test statistic.
- Enter the statistic and, for t and chi-square, the degrees of freedom.
- Choose the tails for a z or t test.
- Set the significance level, usually 0.05.
- Press Calculate.
How it's calculated
Statistical software usually computes p-values numerically rather than from printed tables, and so does this calculator. It uses the incomplete gamma function for the normal and chi-square distributions and the incomplete beta function for the t distribution, which give accurate results even for very small p-values, shown in scientific notation.
Finding your test statistic
The calculator starts from a test statistic you've already worked out. A z score is (observed value − expected value) ÷ standard error. A one-sample t statistic is (sample mean − hypothesized mean) ÷ (sample standard deviation ÷ √n), with n − 1 degrees of freedom. A chi-square statistic adds up (observed − expected)² ÷ expected over every category or cell. Spreadsheet programs and statistics software report these statistics, and our z-score calculator can help with the first step.
Reading the result
The large figure is the p-value. Under it, the calculator states whether the result is significant at your α and repeats the distribution and tails used, so you can copy the whole result into a report. Very small p-values are shown in scientific notation, such as 2.4 × 10⁻⁶, rather than rounded to zero. When you report a result, give the statistic, the degrees of freedom and the exact p-value, for example t(10) = 2.0, p = 0.073, rather than only saying significant or not significant.
Choosing α
Set α before you collect or look at the data, and keep it fixed. A smaller α, such as 0.01, makes a false positive less likely but means you need stronger evidence to reject the null hypothesis. If you run many tests at once, the chance that at least one is significant by luck grows, so some fields use a stricter α or adjust p-values for multiple comparisons.
Common mistakes
- Choosing tails after seeing the data.
- Wrong degrees of freedom, especially for two-sample t tests.
- Reading p as the chance the null is true. It isn't.
- Treating 0.05 as a magic line. p = 0.049 and p = 0.051 are very similar evidence.
What next
Use this often? Add P-Value to your Home screen.
Frequently asked questions
How does the p-value calculator work?
It computes the probability of a result at least as extreme as your z, t or chi-square statistic under the null hypothesis, for one or two tails, and compares it with α.
What does a p-value of 0.05 mean?
If the null hypothesis were true, a result at least this extreme would happen about 5% of the time.
What is the p-value for z = 1.96?
About 0.05 for a two-tailed test.
When is a result significant?
When the p-value is less than the significance level α you chose in advance, commonly 0.05.
Does a small p-value mean a big effect?
No. A p-value doesn't measure the size of an effect or the importance of a result.
Sources
Was this tool helpful?
What went wrong?
We only receive the reason you pick, never what you typed into the tool.
Thanks for your feedback.