P-Value Calculator
Turn a test statistic into a p-value, or paste your numbers and run the t-test, chi-square test or Fisher’s exact test directly, with the critical value and a plain-English verdict.
What a p-value means
A p-value is the probability of getting a result at least as extreme as yours if the null hypothesis were true (no difference, no effect, no association). A small p-value means your data would be surprising under the null, so you reject it.
| p-value vs α | Decision |
|---|---|
| p < α (for example p = 0.03 with α = 0.05) | Statistically significant: reject the null hypothesis |
| p ≥ α (for example p = 0.18 with α = 0.05) | Not significant: you can’t reject the null hypothesis |
A p-value isn’t the chance that the null hypothesis is true, and a significant result isn’t automatically a large or important one. Report an effect size or a confidence interval with it; the calculator gives both for t-tests.
How to calculate a p-value from a test statistic
Pick the distribution your test uses, enter the statistic and degrees of freedom, and choose the tail:
| Tail | Alternative hypothesis | p-value |
|---|---|---|
| Two-tailed | Different (≠) | Area beyond the statistic in both directions |
| Left-tailed | Less than (<) | Area to the left |
| Right-tailed | Greater than (>) | Area to the right |
Example: t = 2.1 with 15 degrees of freedom gives a two-tailed p-value of 0.0531, just above 0.05, and a one-tailed (right) p of 0.0265. For z-scores alone, the z-score calculator also shows percentiles.
t-tests
| Test | Use it for | Degrees of freedom |
|---|---|---|
| One-sample | One mean vs a known or claimed value | n − 1 |
| Two-sample, Welch | Two independent groups (the safer default) | Welch–Satterthwaite formula |
| Two-sample, pooled | Two independent groups with equal variances | n₁ + n₂ − 2 |
| Paired | Before/after on the same subjects, matched pairs | pairs − 1 |
t = (difference in means) ÷ standard error. For a one-sample test the standard error is s ÷ √n; for Welch’s test it’s √(s₁²/n₁ + s₂²/n₂). A paired test is a one-sample test on the differences.
Example: a sample of 30 with mean 52 and SD 8, tested against μ₀ = 50, gives t = 1.369, df = 29, two-tailed p = 0.181: not significant. Two groups (mean 20, SD 4, n 25 vs mean 17.5, SD 5, n 30) give Welch’s t = 2.06 with 52.9 df and p = 0.044.
Chi-square tests
Test of independence: enter a table of counts, one row per line. Each expected count is row total × column total ÷ grand total, and χ² = Σ (observed − expected)² ÷ expected, with (rows − 1) × (columns − 1) degrees of freedom. The table 20, 15 / 30, 35 gives χ² = 1.099, df = 1, p = 0.295. The calculator doesn’t apply Yates’ continuity correction, so a 2×2 result can differ slightly from software that does.
Goodness of fit: compare observed counts with expected counts or proportions (blank means all categories equally likely); df = categories − 1. Counts of 18, 22, 30, 30 against equal expectations give χ² = 4.32, df = 3, p = 0.229.
The chi-square approximation needs expected counts of about 5 or more in each cell; the calculator warns you when they’re lower.
Fisher’s exact test
For a 2×2 table with small counts, Fisher’s exact test computes the exact probability instead of the chi-square approximation. The table a = 8, b = 2, c = 1, d = 5 gives a two-tailed p of 0.035 and an odds ratio of 20.
Critical value tables
Two-tailed critical values of t:
| df | α = 0.05 | α = 0.01 |
|---|---|---|
| 1 | 12.706 | 63.657 |
| 2 | 4.303 | 9.925 |
| 5 | 2.571 | 4.032 |
| 10 | 2.228 | 3.169 |
| 20 | 2.086 | 2.845 |
| 30 | 2.042 | 2.750 |
| ∞ (z) | 1.960 | 2.576 |
Right-tail critical values of chi-square:
| df | α = 0.05 | α = 0.01 |
|---|---|---|
| 1 | 3.841 | 6.635 |
| 2 | 5.991 | 9.210 |
| 3 | 7.815 | 11.345 |
| 4 | 9.488 | 13.277 |
| 5 | 11.070 | 15.086 |
| 10 | 18.307 | 23.209 |
If your statistic is further out than the critical value, p is below α. The calculator gives the critical value for any df and α you choose.
Frequently asked questions
Should I use a one-tailed or two-tailed test?
Use two-tailed unless you decided before seeing the data that only one direction matters. A one-tailed p is half the two-tailed p when the effect is in the predicted direction, so switching after the fact overstates significance.
Welch or pooled t-test?
Welch’s test doesn’t assume equal variances and loses very little when they are equal, which is why many statisticians recommend it as the default.
How accurate are the p-values?
They’re computed from the exact t, chi-square, F and normal distributions, not from a printed table, and match standard statistical software to at least 4 significant figures. For normal-curve background, see the standard deviation calculator.