Skip to content
CornerTools

P-Value Calculator

Turn a z, t, chi-square or F statistic into a p-value, or α into a critical value, one- or two-tailed, on a shaded curve.

Find
Distribution

Decimals allowed; ∞ for z

Tail
Two-tailed p-value

0.03145

Significant at α = 0.05: p is below α, so the null hypothesis is rejected.

Critical values at α = 0.05
±2.228
Reject the null hypothesis when
|t| > 2.228
−2.52.5
Across: the t statistic; up: the probability density. Shaded: the p-value, the area beyond ±2.5.

Enter a test statistic and its degrees of freedom to get the p-value, whether it is significant at your α, and the critical value it is compared with. Switch to Critical value for the value a statistic has to pass at a given α, the number a printed t, chi-square or F table gives, here for any degrees of freedom and any α.

What a p-value says

The p-value is the chance of a statistic at least this extreme if the null hypothesis is true. A small p-value means the data would be unusual under that hypothesis, so the hypothesis is rejected when p falls below the significance level α chosen in advance, most often 0.05. The tool says which side of α the p-value falls, and the critical value gives the same verdict: a statistic past it has a p-value below α.

A p-value is not the chance that the null hypothesis is true, and it does not measure how large or important an effect is: a tiny difference measured on a huge sample can give a tiny p-value. Report the effect itself beside it, with its confidence interval.

How to use it

Choose the distribution your test produces: z for a z-test, t for a t-test or a regression coefficient, χ² for a chi-square test and F for ANOVA or a comparison of variances. t and χ² take their degrees of freedom, F a numerator and a denominator; any number above 0 works, decimals included, and t also takes ∞, which is z. χ² and F take up to 10,000,000 degrees of freedom; past that, t is computed as z.

z and t are two-tailed to start, and also right-tailed or left-tailed; χ² and F are right-tailed to start, or left-tailed. α is typed or set to 0.10, 0.05, 0.01, 0.001 in one click, and 5% reads as 0.05. A p-value is shown to 4 significant figures, in scientific notation below 0.0001, and with more figures where 4 would round it onto α. A critical value is shown as tables print it, to 3 decimals, and copies with 10 significant figures. Nothing you enter leaves your browser.

How it is worked out

Each distribution's tail is a special function. The z tail is the normal CDF Φ. The t-distribution's two tails together are the regularised incomplete beta function Iₓ(ν/2, ½) at x = ν/(ν + t²), and an F tail is Iₓ(d₁/2, d₂/2) at x = d₁F/(d₁F + d₂). A chi-square tail is the regularised incomplete gamma function at k/2 and χ²/2. The tool evaluates these directly, by the continued fractions and series of the NIST Digital Library of Mathematical Functions (DLMF 8.17.22, 8.7.1, 8.9.2), rather than reading a table.

Each tail is computed from its own side, so a p-value of 10⁻⁷⁰ keeps its figures instead of becoming 1 − 1. A two-tailed p-value for t is the beta function itself, not double a rounded tail. A critical value is the point whose tail equals α, found by Newton's method from a normal approximation, to about 12 significant figures. Against the NIST e-Handbook's printed t, chi-square and F tables, the values agree in every entry but a few, where the printed value is off in its last place.

Two-tailed p = 2 × P(T > |t|) = Iₓ(ν/2, ½), x = ν ÷ (ν + t²)
Right-tailed p (χ²) = Q(k/2, χ²/2)
Right-tailed p (F) = 1 − Iₓ(d₁/2, d₂/2), x = d₁F ÷ (d₁F + d₂)
Two-tailed critical value: the t with α/2 above it

Examples

A t-test with t = 2.5 and 10 degrees of freedom

Two-tailed, with α = 0.05, the p-value is 0.03145. Significant at α = 0.05: p is below α, so the null hypothesis is rejected.

  1. The two-tailed p-value is the chance of a t at least 2.5 from 0 on either side, if the null hypothesis is true. p = 2 × P(T₁₀ > 2.5)
  2. The t-distribution's tails are a regularised incomplete beta function of x = ν ÷ (ν + t²). x = 10 ÷ (10 + 2.5²) ≈ 0.6154
  3. Iₓ(ν ÷ 2, ½) is the area beyond ±t together. p = Iₓ(5, 0.5) ≈ 0.03145
  4. Compare p with the significance level α. p ≈ 0.03145 < 0.05, so the result is significant

A chi-square of 7.8 with 3 degrees of freedom

Right-tailed, the p-value is 0.05033, just above 0.05: the statistic falls short of the critical value 7.815, so it is not significant at α = 0.05.

The critical F at α = 0.05 for 3 and 12 degrees of freedom

Right-tailed, the critical value is 3.490: reject the null hypothesis when F > 3.490.

  1. A right-tailed test puts all of α in the upper tail.
  2. The critical value is the point with that area beyond it, found by solving the incomplete beta function for it. P(F₃,₁₂ > F) = 0.05: F ≈ 3.490
  3. A statistic past it falls in the rejection region. Reject the null hypothesis when F > 3.490

Critical value tables

Critical values of t: each column's α is two-tailed, so α/2 lies above the value; for a one-tailed test, use the column for twice your α
dfα = 0.2α = 0.1α = 0.05α = 0.02α = 0.01α = 0.001
13.0786.31412.70631.82163.657636.619
21.8862.9204.3036.9659.92531.599
31.6382.3533.1824.5415.84112.924
41.5332.1322.7763.7474.6048.610
51.4762.0152.5713.3654.0326.869
61.4401.9432.4473.1433.7075.959
71.4151.8952.3652.9983.4995.408
81.3971.8602.3062.8963.3555.041
91.3831.8332.2622.8213.2504.781
101.3721.8122.2282.7643.1694.587
111.3631.7962.2012.7183.1064.437
121.3561.7822.1792.6813.0554.318
131.3501.7712.1602.6503.0124.221
141.3451.7612.1452.6242.9774.140
151.3411.7532.1312.6022.9474.073
161.3371.7462.1202.5832.9214.015
171.3331.7402.1102.5672.8983.965
181.3301.7342.1012.5522.8783.922
191.3281.7292.0932.5392.8613.883
201.3251.7252.0862.5282.8453.850
211.3231.7212.0802.5182.8313.819
221.3211.7172.0742.5082.8193.792
231.3191.7142.0692.5002.8073.768
241.3181.7112.0642.4922.7973.745
251.3161.7082.0602.4852.7873.725
261.3151.7062.0562.4792.7793.707
271.3141.7032.0522.4732.7713.690
281.3131.7012.0482.4672.7633.674
291.3111.6992.0452.4622.7563.659
301.3101.6972.0422.4572.7503.646
401.3031.6842.0212.4232.7043.551
601.2961.6712.0002.3902.6603.460
1201.2891.6581.9802.3582.6173.373
∞ (z)1.2821.6451.9602.3262.5763.291
Critical values of chi-square, right-tailed: α lies above the value
dfα = 0.1α = 0.05α = 0.025α = 0.01α = 0.001
12.7063.8415.0246.63510.828
24.6055.9917.3789.21013.816
36.2517.8159.34811.34516.266
47.7799.48811.14313.27718.467
59.23611.07012.83315.08620.515
610.64512.59214.44916.81222.458
712.01714.06716.01318.47524.322
813.36215.50717.53520.09026.124
914.68416.91919.02321.66627.877
1015.98718.30720.48323.20929.588
1117.27519.67521.92024.72531.264
1218.54921.02623.33726.21732.909
1319.81222.36224.73627.68834.528
1421.06423.68526.11929.14136.123
1522.30724.99627.48830.57837.697
1623.54226.29628.84532.00039.252
1724.76927.58730.19133.40940.790
1825.98928.86931.52634.80542.312
1927.20430.14432.85236.19143.820
2028.41231.41034.17037.56645.315
2534.38237.65240.64644.31452.620
3040.25643.77346.97950.89259.703
4051.80555.75859.34263.69173.402
5063.16767.50571.42076.15486.661
100118.498124.342129.561135.807149.449

Sources

The tables and their use follow the NIST/SEMATECH e-Handbook of Statistical Methods; the special functions follow the NIST Digital Library of Mathematical Functions.

Sources

Reviewed

Frequently asked questions

Two, unless the hypothesis named a direction before the data was seen. A two-tailed test asks whether the statistic is unusually far from its expected value in either direction; a one-tailed test looks only one way, and gives half the p-value when the statistic points that way. χ² and F tests are right-tailed as a rule: large values are the evidence against the null hypothesis.
No: it is a p-value smaller than the last decimal shown. Here, t = 50 with 100 degrees of freedom gives p = 1.447 × 10⁻⁷². A p-value below 10⁻³⁰⁰ reads "< 10⁻³⁰⁰", since a computer number holds no smaller figures; it is exactly 0 only at the end of the range, such as χ² = 0 left-tailed. A t of 0 gives p = 1. Write a tiny p-value as p < 0.001.
Yes. Welch's t-test gives decimal degrees of freedom, and the distributions are defined for any value above 0, so the tool uses them as they are rather than rounding down as a printed table would. With t = 2 and 7.43 degrees of freedom the two-tailed p-value is 0.08326.

See also

  • T-Test Calculator — to run the t-test itself from raw data or means, with the confidence interval and effect size.
  • Z-Score Calculator — for a value's z-score and percentile under a normal curve.
  • Sample Size Calculator — for the sample a survey or study needs at a confidence level.