FLXCode P-Value Calculator

FLXCode apps

Appearance

P-Value Calculator

Type a test statistic, choose the test and the tails, and read the p-value with a clear yes or no against your α.

Example p-value

0.0464215 p-value

Results
Testt with df = 24
TailsTwo-tailed
Left tail0.976789
Right tail0.0232108
Significant at α = 0.05?Yes, p < α. Reject the null hypothesis.

The steps, with your numbers

Test: t statistic 2.1 with df = 24

Left tail: P(T ≤ 2.1) = 0.976789

Right tail: P(T ≥ 2.1) = 0.0232108

Two-tailed: p = 2 × P(T ≥ |2.1|) = 2 × 0.0232108 = 0.0464215

No ads. No account. Nothing you type or record is uploaded. We count page events with a daily code. Check it.

Problem or idea? Email us

Quick start

  1. Choose the test that gave you the statistic: z, t, chi-square or F.
  2. Type the statistic and, except for z, the degrees of freedom. F needs two.
  3. Choose the tails and your α. The tool shows the p-value and whether it is below α.

Worked examples

TestStatisticTailsp-value
z-testz = 1.96two-tailed0.0499958
z-testz = 1.645right-tailed0.0499849
t-testt = 2.0, df = 5two-tailed0.101939
t-testt = 2.1, df = 24two-tailed0.0464215
Chi-squareχ² = 3.841, df = 1right-tailed0.05
Chi-squareχ² = 11.07, df = 5right-tailed0.0500096
F-testF = 4.9646, df = 1 and 10right-tailed0.05
F-testF = 3.5, df = 3 and 20right-tailed0.0344931

The chi-square 3.841 with 1 degree of freedom and the F of 4.9646 with 1 and 10 degrees of freedom are the textbook 5% critical values, so both come out at 0.05.

How each p-value is computed

TestDistributionTwo-tailed p
zStandard normal2 × P(Z ≥ |z|)
tStudent t, df degrees of freedom2 × P(T ≥ |t|)
Chi-squareGamma with shape df / 22 × the smaller tail (rarely used)
FBeta-based, df1 and df22 × the smaller tail (rarely used)

The t, chi-square and F tails come from the regularized incomplete beta and gamma functions, evaluated with continued fractions. They match published tables to six digits. To find a z for a given probability, use the z-score calculator. For a range around an estimate instead of a single p, see the confidence interval calculator.

What the p-value does and does not say

  • It does say how surprising the data are if the null hypothesis is true.
  • It does not say how big or important an effect is. With a large sample a tiny effect gets a tiny p.
  • It does not give the chance that your hypothesis is right.
  • A p of 0.049 and 0.051 are almost the same evidence, even though they fall on different sides of 0.05.

Numbers this uses

Every constant the tool uses is listed here with its source. Where a number varies, you can edit it in the tool.

  • Default α is 0.05. The common convention, editable in the tool.
  • Accuracy is about 10 digits for p above 1e-9. Checked against t = 2.0, df = 5 giving 0.101939 and χ² = 3.841459, df = 1 giving 0.05.
  • Degrees of freedom is any positive number, not only whole numbers. Needed for Welch's t-test, which gives fractional df.

Nothing you type is uploaded. We count events without cookies (details).

FAQ

What is a p-value?

It is the probability of getting a result at least as extreme as yours if the null hypothesis were true. A small p-value says your data would be surprising under the null hypothesis. It is not the probability that the null hypothesis is true.

What p-value counts as significant?

Most fields use α = 0.05: if p is below 0.05, reject the null hypothesis. Some use 0.01 or 0.001, and physics uses a far smaller one. Set your own α in the tool and it tells you which side p falls on. Choose α before you see the data.

One-tailed or two-tailed?

Use two-tailed when a difference in either direction matters, which is the usual case. Use one-tailed only if you decided before collecting data that you care about one direction. For t = 2.0 with 5 df the two-tailed p is 0.101939 and the right-tailed p is 0.0509697.

How do I find the p-value from a t statistic?

Pick the t-test, type the statistic and the degrees of freedom, and choose the tails. t = 2.1 with 24 degrees of freedom gives a two-tailed p of 0.0464215. The degrees of freedom for one sample are n − 1.

Why is chi-square usually right-tailed?

Chi-square tests such as goodness of fit and independence measure how far the data are from what you expected, and only a large value is evidence against the null. The p-value is the area to the right of the statistic. The same goes for the F-test in ANOVA.

What do I do with a p-value that shows 0?

A real p-value is never exactly 0. When the tool shows something like 1.2e−9 it means 0.0000000012. Report it as p < 0.001 in a paper.

What are the Excel and Google Sheets functions?

=NORM.S.DIST(z,TRUE) for z, =T.DIST.2T(ABS(t),df) for a two-tailed t, =T.DIST.RT(t,df) for right-tailed, =CHISQ.DIST.RT(x,df), and =F.DIST.RT(f,df1,df2). The tool gives the same values.

Is my input sent anywhere?

No. The statistic and degrees of freedom stay in your browser. We only count which test and which tail you chose.

More from FLXCode

Share P-Value Calculator