P-Value Calculator

Last updated October 2026

QUICK ANSWER

The p-value is the area in the tail of the test distribution beyond your statistic. Right-tailed p = P(X ≥ statistic), left-tailed p = P(X ≤ statistic), and two-tailed p = 2 × the smaller tail for a symmetric test. If p ≤ α, reject the null hypothesis. For example, z = 2 gives a two-tailed p of about 0.0455, which is below 0.05.

This p-value calculator finds the exact p-value from a z-score, t-statistic, F-statistic, chi-square statistic or Pearson correlation coefficient, for a left-tailed, right-tailed or two-tailed test. It draws the distribution with the p-value area shaded, compares the result with your significance level, and shows every step of the working with a critical value check. No signup is needed.

Calculation

P-value from a z-score

Type of test
Significance level (α)
Press Enter to calculate

Formula

What Is a P-Value?

A p-value is the probability of getting a result at least as extreme as the one observed, assuming the null hypothesis is true. A small p-value means the observed result would be unlikely if there were really no effect, which is evidence against the null hypothesis. A p-value does not tell you the probability that the null hypothesis is true; it only tells you how surprising your data would be if it were. Laerd Statistics covers the full reasoning behind hypothesis testing if you want to go deeper than the summary below.

Null Hypothesis vs Alternative Hypothesis

TermMeaning
Null hypothesis (H₀)The default assumption that there is no effect or no difference. The p-value is calculated assuming this is true.
Alternative hypothesis (H₁)The claim you're testing for, that there is an effect or a difference. A small p-value gives evidence for this instead.
Significance level (α)The threshold you decide in advance, commonly 0.05. If the p-value is below α, the result is called statistically significant.

P-Value Formula Explained

From a Z-Score (Known Population Standard Deviation)

When the population standard deviation is known, first calculate a z-score, then convert it to a p-value using the standard normal distribution. The Standard Deviation Calculator can help you find that population standard deviation if you don't already have it.

z = (x̄ − μ) / (σ / √n) Where: x̄ = sample mean μ = population mean σ = population standard deviation n = sample size One-tailed p-value = the area beyond z in one direction of the standard normal curve Two-tailed p-value = the combined area beyond +z and beyond −z (double the one-tailed value)

From a T-Score (Unknown Population Standard Deviation)

When the population standard deviation is not known, the more common real-world case, use the sample standard deviation and the t-distribution instead.

t = (x̄ − μ) / (s / √n) Where: s = sample standard deviation Degrees of freedom (df) = n − 1 The t-distribution is wider than the normal distribution for small samples, which is why the same t-value can produce a larger p-value than the equivalent z-value.

How to Use This P-Value Calculator

  1. Pick the tab that matches your test statistic: Z-score, t-statistic, F-statistic, Chi-square, Correlation r, or Raw value to z.
  2. Enter the statistic and the extra values the test needs, such as degrees of freedom or the sample size. Decimals are fine.
  3. Choose Left-tailed, Right-tailed or Two-tailed to match your hypothesis, and choose the significance level α (0.10, 0.05, 0.025, 0.01 or 0.001).
  4. Click Calculate or press Enter. The Step-by-Step Solution box opens directly under the inputs.
  5. Read the p-value and the decision, look at the shaded distribution picture, then follow the numbered steps and the Check your answer line.
  6. Use Share result or Download PDF to keep the full working as a PDF.

What the Step-by-Step Solution Shows

After you press Calculate, the answer box shows the reasoning as well as the number.

Which Test Statistic Do I Have?

TabUse it forNeedsUsual tail
Z-scorez-test with a known population standard deviation, or large sampleszTwo-tailed
t-statistict-test, paired t-test, regression coefficientst, degrees of freedomTwo-tailed
F-statisticANOVA, regression F-test, comparing two variancesF, df₁, df₂Right-tailed
Chi-squareGoodness of fit, test of independenceχ², degrees of freedomRight-tailed
Correlation rIs a Pearson correlation different from zero?r, sample size nTwo-tailed
Raw value to zHow unusual is one value, with its percentilex, mean, standard deviationAny

Accuracy and Limits

P-values are computed directly from the normal, t, F and chi-square distributions using the incomplete gamma and incomplete beta functions, not from a lookup table, so results match statistical software to many digits. Each tail is calculated on its own side, which keeps very small p-values accurate instead of rounding them to zero. Degrees of freedom can be decimals (as in Welch’s t-test) up to 1,000,000. P-values smaller than 1 × 10⁻³⁰⁰ are reported as p < 1 × 10⁻³⁰⁰. On the Correlation r tab, r must be strictly between −1 and 1, and n must be a whole number of at least 3. For F and chi-square tests the two-tailed p-value doubles the smaller tail, because those distributions are not symmetric.

Worked Examples, Step by Step

Example 1: Calculate a Z-Score and Its P-Value

A population has a mean IQ of 100 and a standard deviation of 15. A sample of 25 people has a mean IQ of 106. Test whether this sample differs significantly from the population.

  1. Write the known values: μ = 100, σ = 15, x̄ = 106, n = 25
  2. Write the z-score formula: z = (x̄ − μ) / (σ / √n)
  3. Calculate the standard error: 15 / √25 = 15 / 5 = 3
  4. Substitute: z = (106 − 100) / 3 = 6 / 3
  5. Calculate: z = 2
  6. Look up the two-tailed p-value for z = 2 using the standard normal distribution: p ≈ 0.0455
z = 2 │ Two-tailed p-value ≈ 0.0455

Example 2: One-Tailed vs Two-Tailed, Same Z-Score, Different Answer

Using the same z-score of 2 from Example 1, compare the one-tailed and two-tailed p-values directly. Choose Right-tailed and then Two-tailed on the Z-score tab to see both answers and the shaded areas.

+z −z Shaded regions = tail areas
  1. Start with the test statistic: z = 2
  2. One-tailed p-value: the area in a single tail beyond z = 2 → p ≈ 0.0228
  3. Two-tailed p-value: double the one-tailed area, since you're checking both directions → p ≈ 0.02275 × 2 = 0.0455
  4. Compare to α = 0.05: both the one-tailed (0.0228) and two-tailed (0.0455) results are below 0.05, significant either way, but the exact numbers differ
One-tailed p ≈ 0.0228 │ Two-tailed p ≈ 0.0455 (always use the tail type that matches your hypothesis)

Example 3: Interpreting a P-Value Against the Significance Level

A study reports a p-value of 0.03. The significance level was set in advance at α = 0.05. Decide whether the result is statistically significant.

  1. Write the p-value: p = 0.03
  2. Write the significance level: α = 0.05
  3. Compare: is p less than α? 0.03 < 0.05 → yes
  4. Decision: reject the null hypothesis, the result is statistically significant
p = 0.03 < 0.05 → statistically significant, reject H₀

Contrast case: if the study had instead reported p = 0.12, then 0.12 > 0.05, so you would fail to reject the null hypothesis, the result would not be considered statistically significant at the 0.05 level.

Example 4: P-Value from a T-Score (Small Sample)

A small sample of 10 measurements produces a t-statistic of 2.5. Find the approximate two-tailed p-value.

  1. Write the known values: t = 2.5, n = 10
  2. Calculate degrees of freedom: df = n − 1 = 10 − 1 = 9
  3. Look up t = 2.5 with df = 9 in the t-distribution: two-tailed p ≈ 0.034
  4. Compare to α = 0.05: 0.034 < 0.05 → statistically significant
t = 2.5, df = 9 │ Two-tailed p ≈ 0.034 → significant

Example 5: P-Value from an F-Statistic (ANOVA)

A one-way ANOVA comparing three teaching methods produces F = 4.62, with df₁ = 2 and df₂ = 27. Find the p-value.

  1. Write the known values: F = 4.62, df₁ = 2, df₂ = 27
  2. ANOVA F-tests use a right-tailed p-value
  3. Evaluate the F-distribution at F = 4.62: right-tailed p ≈ 0.018809
  4. Compare to α = 0.05: 0.018809 < 0.05 → statistically significant
F = 4.62, df₁ = 2, df₂ = 27 │ Right-tailed p ≈ 0.018809 → significant

Example 6: P-Value from a Chi-Square Statistic

A chi-square test of independence produces χ² = 9.84 with df = 3. Find the p-value.

  1. Write the known values: χ² = 9.84, df = 3
  2. Chi-square independence tests use a right-tailed p-value
  3. Evaluate the chi-square distribution at χ² = 9.84: right-tailed p ≈ 0.019976
  4. Compare to α = 0.05: 0.019976 < 0.05 → statistically significant
χ² = 9.84, df = 3 │ Right-tailed p ≈ 0.019976 → significant

Example 7: P-Value from a Correlation Coefficient (r)

A sample of 25 students produces a Pearson correlation coefficient of r = 0.46 between study time and exam score. Find the two-tailed p-value.

  1. Write the known values: r = 0.46, n = 25
  2. Degrees of freedom: df = n − 2 = 23
  3. Convert r to a t-statistic: t = 0.46 × √(23/(1−0.46²)) ≈ 2.4846
  4. Two-tailed p-value from t = 2.4846, df = 23 ≈ 0.020686
  5. Compare to α = 0.05: 0.020686 < 0.05 → statistically significant
r = 0.46, n = 25 │ Two-tailed p ≈ 0.020686 → significant

When to Use a P-Value Calculator

P-values are the standard way to report whether a result is likely due to chance. Common uses include:

One-Tailed vs Two-Tailed Tests, Choosing the Right One

Choosing between a one-tailed and two-tailed test depends on your hypothesis, not on which one gives a smaller p-value. This choice must be made before looking at your data.

Test typeWhen to use it
Two-tailed testUse when your hypothesis only claims there is a difference, in either direction. Example: "the new process produces a different average than the old one."
One-tailed test (right-tailed)Use when your hypothesis claims the result is specifically higher. Example: "the new process produces a higher average than the old one."
One-tailed test (left-tailed)Use when your hypothesis claims the result is specifically lower. Example: "the new process produces a lower average than the old one."

A common mistake is switching from a two-tailed to a one-tailed test after seeing the data, just to get a smaller p-value. This inflates the chance of a false positive and is considered poor statistical practice. Decide the tail direction based on your hypothesis, before you calculate anything.

Common Mistakes When Working with P-Values

  • Treating a high p-value as proof the null hypothesis is true: a p-value above 0.05 only means there wasn't enough evidence to reject the null hypothesis, it doesn't prove there is no effect.
  • Using a z-test when the population standard deviation is unknown: this is one of the most common test-selection errors, use a t-test instead whenever the population standard deviation must be estimated from the sample.
  • Confusing statistical significance with practical significance: a large enough sample can produce a very small p-value even for a tiny, real-world-meaningless effect. Always look at the size of the effect, not just the p-value.
  • Rounding the test statistic too early: rounding a z-score or t-score before looking up the p-value can shift the result across a common threshold like 0.05, keep full precision until the final step.

Frequently Asked Questions

What is a p-value?
A p-value is the probability of observing a result at least as extreme as your data, assuming the null hypothesis is true. A small p-value suggests your result would be unlikely under the null hypothesis, which counts as evidence against it. A p-value does not tell you the probability that the null hypothesis itself is true.
How do you calculate a p-value?
First calculate a test statistic: a z-score if the population standard deviation is known, or a t-score if it is not. Then find the area under the matching distribution beyond that statistic. That area is the p-value, and for a two-tailed test it is doubled. For example, a z-score of 2 gives a two-tailed p-value of about 0.0455.
What does it mean if the p-value is less than 0.05?
A p-value below 0.05 means the result is statistically significant at the 5% level. The observed effect would be unlikely to happen by chance alone if the null hypothesis were true, so you reject the null hypothesis in favor of the alternative. The calculator compares your p-value with the significance level α that you choose.
What is the difference between a one-tailed and two-tailed p-value?
A two-tailed p-value checks for a difference in either direction and counts both tail areas. A one-tailed p-value checks one specific direction and uses a single tail area, so for a symmetric test it is exactly half of the two-tailed value. Choose the tail from your hypothesis, not to get a smaller number.
What is the difference between a z-test and a t-test?
A z-test is used when the population standard deviation is known. A t-test is used when it must be estimated from the sample, which is the more common situation in real research. The t-distribution has heavier tails than the normal distribution, especially for small samples, so the same statistic gives a larger p-value.
What is the null hypothesis?
The null hypothesis is the default assumption that there is no effect or no difference between groups. Every p-value is calculated by assuming the null hypothesis is true, then measuring how surprising the observed data would be under that assumption.
Can a p-value be exactly 0?
In practice a calculated p-value is never exactly zero, although it can be extremely small. This calculator shows very small values in scientific notation, such as 5.733 × 10⁻⁷. Below 1 × 10⁻³⁰⁰ it reports p < 1 × 10⁻³⁰⁰ because computers cannot store smaller numbers.
What is a good significance level to use?
The most common significance level is α = 0.05, which accepts a 5% chance of a false positive. Stricter thresholds such as 0.01 or 0.001 are used for higher-stakes research, while exploratory work sometimes uses 0.10. Choose α before you collect data, not after seeing the results.
Why do chi-square and F tests usually use right-tailed p-values?
Chi-square and F statistics are never negative, and larger values give stronger evidence against the null hypothesis. ANOVA, regression F-tests and chi-square goodness-of-fit and independence tests therefore use the right tail. The calculator sets Right-tailed by default on those two tabs.
How do I find a p-value from a correlation coefficient?
Convert r to a t-statistic with t = r × √[(n − 2) / (1 − r²)] and n − 2 degrees of freedom, then read the p-value from the t-distribution. The Correlation r tab does both steps for you and shows the t-statistic in the working.
What is a critical value?
A critical value is the cutoff statistic that has a tail area exactly equal to α. If your statistic is beyond the critical value, the p-value is below α and you reject the null hypothesis. The Check your answer line shows the critical value for your test so you can confirm the decision a second way.
Which tab should I use?
Use the tab that matches the statistic you already have: Z-score for a z-test, t-statistic for a t-test, F-statistic for ANOVA or regression, Chi-square for goodness-of-fit or independence tests, and Correlation r for a Pearson correlation. If you only have a raw value, a mean and a standard deviation, use Raw value to z.
Can I use decimal degrees of freedom?
Yes. Welch's t-test often gives decimal degrees of freedom such as 17.43, and the calculator accepts them for the t, F and chi-square tabs. Degrees of freedom must be greater than 0 and no more than 1,000,000.

Related Calculators

Author

StepSolvers Team

StepSolvers is a free collection of step-by-step math calculators. The StepSolvers team builds every calculator to show its full working, not just the final answer, so you can follow each step and learn the method. About StepSolvers