P-value calculator

Enter your values. The answer and the full worked solution update as you type.

Result

p-value0.03665
P(T < 2.31)0.9817
P(T > 2.31)0.01832
Significant atα = 0.10, α = 0.05

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

T ~ t(14)

Tail areas

P(T > |t|) = ½·Ix(ν/2, ½), x = ν/(ν + t²) = 0.724
P(T < 2.31) = 0.9817
P(T > 2.31) = 0.01832

p-value

p = 2·min(0.9817, 0.01832) = 0.03665

Compare with α

p ≤ 0.10: reject H₀
p ≤ 0.05: reject H₀
p > 0.01: do not reject H₀

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

  1. Compute the test statistic of your test, for example z = (x̄ − μ₀)/(σ/√n) or t = (x̄ − μ₀)/(s/√n).
  2. 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.
  3. Choose the tail from the alternative hypothesis: “greater than” is right-tailed, “less than” is left-tailed and “not equal to” is two-tailed.
  4. For a two-tailed z or t test, double the area beyond |statistic|.
  5. 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.

</> Embed

Free for teachers and schools: paste this code into your course page, LMS or website. Students can use the calculator and its worked solution without an account.

More calculators