Skip to main content

P-value Calculator - From z, t, or Chi-Square

Free online tool to turn a z-score, t-statistic, or χ² statistic into a left-, right-, or two-tailed p-value. Runs in your browser.

Input Values

The p-value updates as you type. df is required only for t and chi-square and must be > 0. Chi-square statistics must be non-negative.

P-value Result

The p-value will appear here

What Is a P-value Calculator and Why Do You Need One?

A p-value is the probability, under a stated null hypothesis H0, of seeing a test statistic at least as extreme as the one you observed. It is not the probability that H0 is true, and it is not the probability that you made a mistake. It is a tail probability on a reference distribution - usually the standard normal (z), Student’s t, or chi-square.

This free online p-value calculator takes that statistic and reports a left-tailed, right-tailed, or two-tailed probability. Many homework keys and papers still compare the result to α = 0.05. That cutoff is a convention used in a lot of fields, not a law of nature. A result just below 0.05 is not magically “true,” and a result just above it is not magically “false.”

Everything runs in your browser. Nothing is uploaded. Pair it with the average calculator when you are summarizing a sample, or with the scientific notation calculator when a tiny p-value is easier to read as a × 10n.

How to Use This Free Online P-value Calculator

Using this z, t, and chi-square tail tool is straightforward:

  1. Choose the distribution: normal (z-score), Student’s t (t-statistic plus df), or chi-square (χ² plus df).
  2. Enter the test statistic. Chi-square values must be ≥ 0. Degrees of freedom, when shown, must be a finite number greater than 0.
  3. Select the tail: left P(X ≤ statistic), right P(X ≥ statistic), or two-tailed.
  4. Read the p-value. Very small results (below 10−6) are shown in scientific notation. Copy the number, or clear the fields to start over. The last inputs are saved locally in your browser for up to 30 days.

Note: these tails are numerical approximations (erf, incomplete beta, incomplete gamma). They are not a substitute for R, SPSS, or a published statistical library.

H0, Tails, and the α = 0.05 Convention

p = P(as extreme | H0)
Compare to α only if your protocol named α in advance

Under H0 the test statistic is assumed to follow the distribution you picked. A one-tailed p-value (left or right) matches a directional alternative: you only count probability in one direction. A two-tailed p-value on a symmetric null (z or t) is twice the more extreme one-sided tail, so both large positive and large negative statistics count as evidence against H0.

Chi-square tests in practice are usually right-tailed(Pearson goodness-of-fit, independence in a table). A two-tailed χ² option is included for completeness; it is not the usual Pearson setup because the chi-square density is not symmetric.

Many labs still call p < 0.05 “statistically significant.” That line is a conventional cutoff, not a scientific law. Effect size, design, and whether the hypothesis was pre-registered matter more than whether the third decimal happened to land at 0.049 or 0.051.

z vs. t vs. Chi-Square

FamilyStatisticNeeds df?Typical use
Normal (z)z-scoreNoKnown σ, large-n Wald tests, proportions
Student’s ttYes, df > 0Unknown σ, one-sample or two-sample means
Chi-squareχ² ≥ 0Yes, df > 0Goodness-of-fit, independence, variance tests

The z tail uses the error function (erf) to approximate the standard normal CDF Φ. The t tail uses a regularized incomplete beta. The chi-square survival function is a regularized incomplete gamma Q(df/2, χ²/2). All three are approximations implemented in this page - honest enough for a homework check, not a claim of library-grade precision.

Worked Examples

1. z = 1.96, two-tailed

Φ(1.96) is about 0.975. The right tail 1 − Φ(1.96) is about 0.025, so the two-tailed p-value is 2 × (1 − Φ(|1.96|)) ≈ 0.05. That is why 1.96 is the textbook two-sided normal critical value at α = 0.05. This calculator should land very close to 0.05; leftover digits are from the erf approximation, not from a different definition of Φ.

2. t = 2.0, df = 10

Student’s t with 10 degrees of freedom has heavier tails than z. For t = 2.0 the two-tailed p-value is about 0.073 - larger than the normal two-tailed value for z = 2 (about 0.046). Same statistic, extra uncertainty in the variance, weaker evidence against H0 if you insist on the 0.05 convention. The one-sided complementary probability is about 0.037.

3. χ² = 3.84, df = 1, right tail

For one degree of freedom, χ² is a squared standard normal, so P(χ²1 ≥ 3.84) matches the two-tailed normal p-value at |z| ≈ 1.96, again about 0.05. Use the right tail for a Pearson statistic; a left tail would ask how surprisingly small the chi-square was.

This Is an Approximation

Tail probabilities here are evaluated with classical numerical recipes: an Abramowitz–Stegun erf for the normal, Lanczos log-gamma plus a continued-fraction incomplete beta for t, and series/continued-fraction incomplete gamma for chi-square. Double-precision JavaScript will underflow extremely far tails toward 0, and the approximations are weaker than a well-tested C library behind R or SPSS.

Use this page to check a homework step, to see whether a published z or t is in the same ballpark as p = 0.05, or to convert a statistic you already computed. Do not treat the last displayed digit as a published p-value, and do not skip the design, assumptions, and effect size that the number cannot capture.

Frequently Asked Questions (FAQ) - P-value

How do I find a p-value from a z-score?

Treat the z-score as a standard normal deviate. A left-tailed p-value is Φ(z), a right-tailed p-value is 1 − Φ(z), and a two-tailed p-value is 2 × (1 − Φ(|z|)). This calculator approximates Φ with the error function (erf).

How do I calculate a p-value from a t-statistic and degrees of freedom?

Use the Student’s t distribution with the given df (df must be positive). Left, right, and two-tailed probabilities follow the same pattern as z, but the tails are heavier for small df. The CDF is evaluated with an incomplete-beta approximation.

What is the difference between a one-tailed and two-tailed p-value?

One-tailed (left or right) measures probability in a single direction, matching a directional alternative hypothesis. Two-tailed doubles the more extreme one-sided tail for a symmetric null (z or t). Chi-square tests are usually right-tailed; a two-tailed χ² option is not the usual Pearson goodness-of-fit setup.

How do I get a p-value from a chi-square statistic?

Enter the χ² statistic and positive degrees of freedom. The usual p-value is the right-tail probability P(χ²_df ≥ statistic), approximated with the incomplete gamma function. A left tail is P(χ²_df ≤ statistic).

Is this p-value calculator as accurate as R or SPSS?

No. Tail probabilities here are numerical approximations (erf, incomplete beta, incomplete gamma) in the browser. They are fine for homework checks and rough significance calls, not a substitute for a statistics package when you need published-precision p-values.

Why does the p-value calculator require positive degrees of freedom?

The t and chi-square families are defined only for df > 0. Zero or negative df would make the density undefined. Enter the df from your test (n − 1 for a one-sample t, (r−1)(c−1) for a contingency table, and so on).

Why Choose Our P-value Calculator?

  • Free, no account. Unlimited z, t, and χ² tail conversions.
  • Private. All arithmetic stays in the browser.
  • Left, right, and two tails so the number matches the alternative you actually used.
  • Honest about α = 0.05 - a convention, not a law - and honest that the math is an approximation.
  • Scientific notation for tiny p-values, with a complementary one-sided probability shown beside the result.
  • Works offline after the first page load. Last inputs are stored locally for 30 days.