P-value calculator
Enter your values. The answer and the full worked solution update as you type.
Result
Turn a test statistic into a p-value. Choose the distribution (standard normal z, Student’s t, chi-square or F), enter the statistic and its degrees of freedom, and pick a left-tailed, right-tailed or two-tailed test. The calculator gives the exact p-value, both tail areas and the decision at the 10%, 5% and 1% significance levels.
Step-by-step solution
Distribution of the test statistic
Tail areas
p-value
Compare with α
Key formulas
- z-test for a mean
- z = (x̄ − μ0)/(σ/√n)
- t-test for a mean
- t = (x̄ − μ0)/(s/√n), df = n − 1
- Two-sided at 5%
- reject H0 if |z| > 1.96
How to find a p-value
- Compute the test statistic of your test, for example z = (x̄ − μ₀)/(σ/√n) or t = (x̄ − μ₀)/(s/√n).
- Identify its distribution under H₀ and the degrees of freedom: n − 1 for a one-sample t-test, (rows − 1)(columns − 1) for a chi-square test of independence, and d₁ and d₂ for an F test.
- Choose the tail from the alternative hypothesis: “greater than” is right-tailed, “less than” is left-tailed and “not equal to” is two-tailed.
- For a two-tailed z or t test, double the area beyond |statistic|.
- Compare the p-value with α: reject H₀ when p ≤ α.
Questions and answers
Are chi-square and F tests one-tailed?
Goodness-of-fit tests, tests of independence and ANOVA use the right tail only, because large values of the statistic are evidence against H₀. A two-tailed chi-square or F test is used in a few cases, such as testing a variance against a given value or comparing two variances.
How is a two-tailed p-value calculated?
For a symmetric distribution (z and t) it is twice the area beyond the absolute value of the statistic. For chi-square and F the calculator doubles the smaller of the two tail areas.
Why does my t-table only give a range?
A printed table lists critical values for a few significance levels only, so you can only say, for example, 0.02 < p < 0.05. This calculator evaluates the distribution itself, so it gives the exact p-value.
Can the degrees of freedom be a decimal?
Yes. Welch’s t-test produces non-integer degrees of freedom, and the calculator accepts them for the t, chi-square and F distributions.
What is the difference between the p-value and α?
α is the significance level you choose before the test, usually 0.05. The p-value comes from your data. The decision rule compares them: reject H₀ when p ≤ α.
Practise it yourself
Practise Hypothesis tests & confidence intervals
A calculator gives the answer. In the exam you need the method: practise it with new problems, hints and worked solutions.