Calculate a p-value from a Z, Student's t, chi-square or F statistic, or test a Pearson correlation. Choose the alternative-hypothesis tail, compare the unrounded result with alpha and review critical values, formulas and shaded probability areas.
P-Value Calculator for Z, T, Chi-Square and F Tests
Select the null distribution and enter an already calculated test statistic. The tool uses unrounded probabilities for its alpha decision.
P-value result
Standard normal, two-sided test
The selected tail probability and alpha comparison will appear here.
Null distribution and selected tail
Calculated measures
| Measure | Value | Meaning or method |
|---|
Calculation steps
- Select a null distribution and enter a valid statistic.
Recent calculations
A p-value is valid only for the selected test, null model, tail and assumptions. This tool converts supported statistics to probabilities. It does not decide whether your study design or statistical test is appropriate.
How to Use This P-Value Calculator
- Select Z, Student's t, chi-square, F or Pearson correlation.
- Enter the test statistic and every required degree-of-freedom value. Correlation mode needs r and the number of complete pairs.
- Select the tail specified by the alternative hypothesis: less than, greater than or not equal.
- Enter the significance level chosen before examining the result. The default is 0.05.
- Select Calculate p-value. Review the probability, critical value, alpha decision, shaded distribution and substituted steps.
The numeric fields accept signed decimals, simple fractions and scientific notation. Degrees of freedom must be positive, while chi-square and F statistics cannot be negative. Correlation sample size must be a safe whole number of at least 3. Inputs stay in the current browser page.
Enter the statistic produced by the correct statistical procedure. For example, a one-sample mean problem may produce Z when population variability is treated as known or t when variability is estimated under the usual model. This calculator does not infer the test from a research question or raw dataset.
What a P-Value Means
A p-value measures compatibility between observed data and a specified null model. It is the probability, assuming the null model and its supporting assumptions, of obtaining the observed test statistic or a result more extreme in the direction defined by the alternative hypothesis.
The phrase "as extreme" depends on the tail. A greater-than alternative counts the upper tail. A less-than alternative counts the lower tail. A not-equal alternative commonly counts both tails. The direction must come from the question and analysis plan, not from whichever option produces the smallest p-value.
A p-value is not the probability that the null hypothesis is true. It is not the probability that results happened "by chance." It also does not measure effect size, measurement quality, practical importance or the chance that another study will reproduce the result. Those questions need estimates, uncertainty intervals, design review and subject knowledge.
Choose the Correct Distribution
| Mode | Required values | Typical use | Important caution |
|---|---|---|---|
| Z | Z statistic | Tests with a standard normal null statistic | Do not substitute Z when the procedure requires t. |
| Student's t | t and df | Mean, coefficient or contrast tests using a t reference | Degrees of freedom come from the fitted test. |
| Chi-square | χ2 and df | Goodness-of-fit, independence and variance procedures | Many common chi-square tests use only the upper tail. |
| F | F, df1 and df2 | ANOVA, nested-model and variance-ratio procedures | Numerator and denominator order changes the result. |
| Correlation | r and n | Classical test of zero Pearson population correlation | Requires paired, independent observations and a suitable linear model. |
Z and t distributions are symmetric around zero. Chi-square and F distributions are nonnegative and usually right-skewed. Therefore the same numerical statistic and tail label do not have interchangeable meanings across distributions.
P-Value Formulas and Tail Areas
Let G(s) be the cumulative distribution function for the selected null statistic S. The lower area is G(s), and the upper survival area is P(S ≥ s). For Z and t, symmetry makes the familiar two-sided result twice the smaller one-sided area.
Right-tail p = 1 − G(s), evaluated as a direct survival probability
Two-sided equal-tail p = min[1, 2 × min(G(s), 1 − G(s))]
The calculator evaluates extreme upper tails directly instead of subtracting a rounded cumulative probability from 1. Student's t and F probabilities use the regularized incomplete beta function. Chi-square probabilities use regularized lower and upper gamma functions. These methods retain useful precision farther into a tail.
For asymmetric chi-square and F distributions, the two-sided option is explicitly an equal-tail convention. It doubles the smaller tail and caps the result at 1. This convention is suitable only when the intended procedure defines that calculation. Goodness-of-fit chi-square tests, chi-square independence tests and common ANOVA F tests normally use the right tail.
Worked P-Value Examples
Two-sided Z example
For Z = 1.96 and a not-equal alternative, the upper standard-normal area is approximately 0.024997895. Symmetry gives p = 2 × 0.024997895 = 0.049995790. With alpha = 0.05, the unrounded p-value is below alpha, so the rule rejects the null hypothesis at that threshold.
Two-sided Student's t example
For t = 2.228 with 10 degrees of freedom, the two-sided p-value is approximately 0.050011772. It is slightly above 0.05, despite the statistic being close to a familiar critical table value. The correct conclusion under the stated rule is fail to reject at alpha 0.05.
Upper-tail chi-square example
For χ2 = 9.488 with 4 degrees of freedom, the right-tail probability is approximately 0.049994406. A rounded table may show the statistic near the 5 percent critical point. The calculator keeps unrounded numerical values for the comparison.
Upper-tail F example
For F = 3.09839121214 with numerator df 3 and denominator df 20, the upper-tail p-value is approximately 0.05. Reversing the degree-of-freedom order describes a different F distribution and changes the probability.
One-Tailed Versus Two-Tailed Tests
A one-tailed alternative states a direction before the result is known. Examples include a mean greater than a target or a coefficient less than zero. A two-tailed alternative asks whether the parameter differs in either direction. It usually allocates the significance level across both tails.
Do not change a planned two-sided test to one-sided after seeing the sign. That choice changes the reference event and can make evidence appear stronger than the original question justified.
P-Value, Alpha and the Statistical Decision
Alpha is a decision threshold chosen before testing. Under the common rule, reject the null hypothesis when p ≤ alpha. Otherwise fail to reject it. Failing to reject does not prove the null is true. It says the test did not cross the selected evidence threshold under its model.
| Comparison | Decision wording | What it does not establish |
|---|---|---|
| p ≤ alpha | Reject H0 at the selected alpha | A large or important effect |
| p > alpha | Fail to reject H0 | That H0 is correct |
| p near alpha | Report the exact p-value and uncertainty | A sharp scientific boundary |
The calculator also reports critical values for the selected distribution and alpha. The p-value rule and critical-region rule should agree before display rounding. A result close to alpha deserves transparent reporting, not a change in precision designed to move it across the line.
Assumptions Still Matter
Accurate probability code cannot repair an unsuitable test. Independence, sampling or assignment, distribution shape, variance assumptions, model specification and data quality affect whether the claimed null distribution applies. Degrees of freedom must match the actual procedure.
- A t test may require independent observations and a model for the sampling distribution of the statistic.
- A chi-square count test needs appropriate expected counts and correctly defined categories.
- An ANOVA-style F test depends on the fitted model and its residual assumptions.
- A Pearson correlation test targets linear association and can be distorted by outliers, nonlinearity or dependent pairs.
- Repeated testing, optional stopping and selecting only favorable analyses change the error behavior.
Use the p-value with an effect estimate and confidence interval where appropriate. Document exclusions, transformations, tail choice and every tested outcome. For regulated, clinical or high-stakes work, reproduce the result in approved statistical software and follow the analysis protocol.
Common P-Value Mistakes
- Using the wrong distribution: Z, t, chi-square and F reference different null statistics.
- Guessing degrees of freedom: Calculate df from the exact test and design.
- Reversing F degrees of freedom: Keep numerator and denominator sources in their defined order.
- Choosing the tail after seeing results: State the alternative first.
- Calling p the probability H0 is true: The probability is conditional on H0, not assigned to it.
- Saying "accept the null": Use fail to reject when p exceeds alpha.
- Equating significance with importance: Examine effect size, cost, benefit and uncertainty.
- Rounding before comparing: Use the unrounded p-value for the alpha decision.
Calculation Method and Review Sources
The p-value definition, alpha comparison and critical-region language were reviewed against the NIST guide to critical values and p-values. Distribution formulas and numerical direction were checked against NIST references for the normal distribution, Student's t distribution, chi-square distribution and F distribution.
Interpretation cautions follow the American Statistical Association statement on p-values. Browser calculations use finite-precision numbers, log-gamma formulas, continued fractions and direct tail evaluations. Extremely small mathematical probabilities may fall below the numeric display range and are labelled as a bound rather than exact zero.
Related Calculators
Frequently Asked Questions
What is a p-value?
A p-value is the probability, under the null model and its assumptions, of obtaining a test statistic at least as extreme as the observed statistic in the direction defined by the alternative hypothesis.
How do you calculate a p-value?
Select the null distribution, enter the test statistic and required degrees of freedom, then take the lower tail, upper tail or two-tail area specified by the alternative hypothesis.
What does p = 0.05 mean?
It means the selected null model would produce the observed statistic or a more extreme result about 5 percent of the time. It does not mean the null hypothesis has a 5 percent chance of being true.
Should I use a one-tailed or two-tailed p-value?
Use the tail defined by the alternative hypothesis before inspecting the data. A directional alternative uses one tail, while a not-equal alternative commonly uses two tails.
Does a p-value show the probability that the null hypothesis is true?
No. A p-value is calculated conditional on the null model. It does not assign a probability to the truth of the null or alternative hypothesis.
What is the difference between a Z p-value and a t p-value?
A Z p-value uses the standard normal distribution. A t p-value uses Student's t distribution and degrees of freedom, producing heavier tails when degrees of freedom are small.
What are degrees of freedom?
Degrees of freedom describe how much independent information determines a reference distribution. The correct value comes from the statistical test, design and estimated parameters.
Can a p-value equal zero?
For a continuous central distribution and a finite statistic, the mathematical tail probability is positive. Software may underflow, so this calculator reports a value below its numeric display range instead of claiming an exact zero.
When do I reject the null hypothesis?
Under a preselected alpha rule, reject the null hypothesis when the unrounded p-value is less than or equal to alpha. Otherwise fail to reject it; do not describe that outcome as accepting the null.
Does statistical significance prove practical importance?
No. A p-value does not measure effect size, practical value, data quality or model validity. Review estimates, uncertainty, assumptions and subject context together.
Educational, statistical and financial disclaimer: This calculator provides mathematical estimates for learning and general analysis. It does not provide statistical, academic, medical, legal, employment or financial advice. Verify important results, assumptions and test selection with approved software or a qualified professional.