P-Value Calculator

Turn a z, t, chi-square or F statistic and its degrees of freedom into an exact left, right or two-tailed p-value, with critical values and a shaded curve.

The interactive tool loads here when JavaScript runs.

About this tool

What is the P-Value Calculator?

Statistical software and papers report a test statistic, but you often need the p-value that goes with it, or you have a statistic from a hand calculation and no table. Choose the distribution (z, Student t, chi-square or F), enter the statistic and its degrees of freedom, pick the tail, and the P-Value Calculator returns the exact p-value along with both one-tailed areas, the two-tailed value and the critical value at your significance level.

A curve of the distribution is drawn with the p-value region shaded, so you can see whether the statistic sits in the tail or near the centre. Chi-square and F switch to right-tailed automatically, because that is how goodness-of-fit, independence and ANOVA tests are read. Upper tails are computed directly rather than as 1 minus a CDF, so tiny p-values such as 3e-7 keep their precision. Everything runs in your browser.

  • z, Student t, chi-square and F distributions
  • Left, right and two-tailed p-values together
  • Critical values and the decision at α = 0.1, 0.05, 0.01 or 0.001
  • Precise tiny p-values; fractional degrees of freedom accepted
  • Shaded distribution curve with the statistic marked
  • Verified against SciPy and closed-form results; runs in your browser
Read the guide: What Is a P-Value? Meaning, Calculation and Misuses

How to use the P-Value Calculator

  1. Choose the distribution your test statistic follows: z for z-tests and large-sample proportions, t for t-tests and regression coefficients, chi-square for goodness-of-fit and independence tests, F for ANOVA and regression F tests.
  2. Enter the statistic. For t and chi-square enter the degrees of freedom; for F enter the numerator and denominator degrees of freedom.
  3. Pick the tail: two-tailed for "different from", left or right for a directional hypothesis set in advance. Chi-square and F are normally right-tailed.
  4. Choose the significance level α to see the critical value and the decision.
  5. Read the p-value, both tails and the critical value, and check the shaded curve.

Worked examples

The classic z = 1.96

Input

z = 1.96, two-tailed

Output

p = 0.04999579, critical values ±1.959964 at α = 0.05

This is why 1.96 is the 95% multiplier: 2.5% of the normal curve lies above 1.96 and 2.5% below -1.96.

A t statistic just short of significance

Input

t = 2.1, df = 15, two-tailed

Output

p = 0.05306; right tail 0.02653; critical value 2.1314

A one-tailed test would give 0.0265, but switching tails after seeing the data is not allowed. With df = 15 the statistic needs to reach 2.131 for p < 0.05.

Chi-square at the 5% line

Input

χ² = 11.07, df = 5, right-tailed

Output

p = 0.05001

11.07 is the printed 5% critical value for 5 degrees of freedom, so the p-value lands on 0.05 to the table's precision.

An ANOVA F statistic

Input

F = 4.846, df = 2 and 27, right-tailed

Output

p = 0.01591, critical F = 3.3541 at α = 0.05

These are the degrees of freedom of a one-way ANOVA with 3 groups and 30 observations, as in R's PlantGrowth data.

Background and insight

A p-value is the probability, computed assuming the null hypothesis is true, of getting a test statistic at least as extreme as the one observed. Karl Pearson computed such tail probabilities for his chi-square test in 1900, and R. A. Fisher popularised them in Statistical Methods for Research Workers (1925), where he suggested 1 in 20 (0.05) as a convenient line for judging whether a result deserved attention. Printed tables only gave critical values at a few levels; exact p-values became routine once computers could evaluate the distributions directly.

Each distribution comes from a special function. The normal tail uses the error function, Student t and F use the regularized incomplete beta function, and chi-square uses the regularized incomplete gamma function. This calculator evaluates them with continued fractions (the modified Lentz method described in Numerical Recipes) and checks the results against SciPy reference values and exact closed forms, such as exp(-x/2) for chi-square with 2 degrees of freedom and the Cauchy distribution for t with 1 degree of freedom.

The American Statistical Association's 2016 statement on p-values (Wasserstein and Lazar) lists what a p-value is not: it is not the probability that the null hypothesis is true, it does not measure the size or importance of an effect, and a result should not be judged by whether it crosses 0.05 alone. The calculator reports the decision at your chosen α because people need it, but the effect size and the confidence interval from the original test belong in any report.

Common use cases

  • Reading papers

    Recover an exact p-value from a reported "t(28) = 2.4" or "χ²(3) = 9.1" when only the statistic is given.

  • Replacing printed tables

    Get exact tail areas and critical values for any degrees of freedom, including fractional Welch df, without interpolating in a table.

  • Hand-calculated tests

    Finish a homework or exam-practice test where you computed the statistic yourself.

  • Checking software output

    Confirm what a spreadsheet's T.DIST.2T, CHISQ.DIST.RT or F.DIST.RT returns.

Tips and limitations

  • Two-tailed p-values for z and t double the smaller tail. For chi-square and F the calculator also doubles the smaller tail, which is the convention for variance-ratio tests; tests of fit, independence and ANOVA are right-tailed.
  • Degrees of freedom can be fractional, which is what Welch's t-test produces. Enter them as given.
  • p = 0.051 and p = 0.049 are practically the same evidence. Report the exact value rather than only "significant" or "not significant".
  • A tiny p-value with a huge sample can come from a trivial effect. Look at the effect size and interval from the original analysis.
  • Negative chi-square or F values are impossible and are rejected; check the calculation that produced them.

Frequently asked questions

What is a p-value in simple terms?

It is how surprising your data would be if there were really no effect. Formally, it is the probability of a test statistic at least as extreme as yours, assuming the null hypothesis is true. A p-value of 0.03 means a result this extreme would happen about 3% of the time by chance alone.

How do I get a p-value from a t statistic?

Select t, enter the statistic and the degrees of freedom (n - 1 for a one-sample or paired test, n₁ + n₂ - 2 for a pooled two-sample test, or the Welch df), and choose the tail. The calculator evaluates the Student t distribution's tail area exactly.

Should I use a one-tailed or a two-tailed test?

Use two-tailed unless you decided before collecting data that only one direction matters and you would treat an effect in the other direction the same as no effect. A one-tailed p-value is half the two-tailed one, so choosing it after seeing the data inflates false positives.

Why are chi-square and F tests right-tailed?

Both statistics grow as the data move away from the null hypothesis: more mismatch between observed and expected counts, or more spread between group means than within groups. Only large values count as evidence, so the p-value is the right-tail area.

Is p < 0.05 the same as proof?

No. It means the data are unlikely under the null hypothesis at the 5% level. About 1 in 20 true null hypotheses will still give p < 0.05, and the cut-off itself is a convention Fisher proposed, not a law. Replication and effect sizes matter more than crossing a line.

What is the difference between a p-value and a critical value?

The critical value is the statistic you must exceed to reject the null at a chosen α. The p-value is the smallest α at which your statistic would be significant. They give the same decision: p ≤ α exactly when the statistic is beyond the critical value.

Why does my table give a slightly different p-value?

Printed tables round the statistic and list only a few levels, so you interpolate. The calculator evaluates the distribution directly, giving the exact tail area for your statistic and degrees of freedom.

Is there an in-depth guide to the P-Value Calculator?

Yes. “What Is a P-Value? Meaning, Calculation and Misuses” covers the background, how it works, common pitfalls and worked examples. Read the full guide.

People also search for

  • p value from t score and degrees of freedom
  • p value from chi square statistic
  • p value from f statistic calculator
  • two tailed p value from z score
  • convert test statistic to p value
  • critical value calculator t chi square f
  • one tailed vs two tailed p value calculator
  • p value for z = 1.96