Hypothesis Test Calculator

This hypothesis test calculator runs a one-tailed or two-tailed test for means, paired differences and proportions from summary numbers.

Checks on your data

  • Choose the hypotheses, α and the tail before looking at the data. A one-tailed test chosen after seeing the direction inflates false positives.
  • Statistical significance is not practical importance. Check the size of the effect as well as the p-value.

Results

Test used
Two-sample Welch t-test
Null hypothesis
H₀: μ₁ = μ₂
t statistic
1.99233
p-value
0.0506733
Decision
Fail to reject H₀ (p ≥ 0.05)
Critical value (±)
1.9984
Degrees of freedom
62.979
Observed effect (estimate − null)
4.3
Standard error
2.15827
95 % CI for the effect
-0.012993 to 8.613
two-sided interval for estimate − null
t distribution under H₀: shaded = p-value
-4-2024t = 1.992t
Show step-by-step solution
  1. Test: Two-sample Welch t-test. H₀: μ₁ = μ₂.
  2. Statistic = (estimate − null value) ÷ standard error = 4.3 ÷ 2.15827 = 1.99233, df = 62.979.
  3. Two-tailed p-value = 0.0506733.
  4. Compare p with α = 0.05: p ≥ α, so do not reject H₀.
StepsH₀, H₁, α, statistic, p
Reject ifp < α
Two-tailedH₁: ≠
One-tailedH₁: > or <

What Is Hypothesis Test?

A hypothesis test asks whether sample data give enough evidence to reject a null hypothesis. You state H₀ and H₁, choose a significance level α, compute a test statistic, find the p-value and reject H₀ if p < α.

Choose a one-sample t-test, a two-sample Welch t-test, a paired t-test, a one-proportion z-test or a two-proportion z-test, then enter the sample sizes, means, standard deviations or counts. Select a two-tailed, right-tailed or left-tailed alternative and the calculator returns the statistic, degrees of freedom, p-value, critical value, decision and a confidence interval for the effect, with the p-value shaded on the curve.

The article below explains each test, the formulas, a worked example and answers about two-tailed tests and what failing to reject means.

How to Use the Hypothesis Test Calculator

  1. Choose the test that matches your data.
  2. Enter the sample sizes, means, SDs or counts.
  3. Choose the alternative hypothesis and α.
  4. Read the statistic, p-value and decision.

Hypothesis Test Formula

One-sample t

t=xˉ−μ0s/nt=\frac{\bar x-\mu_0}{s/\sqrt n}

Welch two-sample t

t=xˉ1−xˉ2s12/n1+s22/n2t=\frac{\bar x_1-\bar x_2}{\sqrt{s_1^2/n_1+s_2^2/n_2}}

One-proportion z

z=p^−p0p0(1−p0)/nz=\frac{\hat p-p_0}{\sqrt{p_0(1-p_0)/n}}

Hypothesis Test Variables Explained

SymbolMeaningNotes
H₀, H₁Null and alternative hypotheses
αSignificance level
t or zTest statistic(estimate − null) ÷ SE
pp-value

Hypothesis Test Worked Example

Two groups: 30 people with mean 52.4 (SD 8.1) and 35 with mean 48.1 (SD 9.3). The standard error is √(8.1²/30 + 9.3²/35) = 2.158, so t = 4.3 ÷ 2.158 = 1.99 with about 63 degrees of freedom. The two-tailed p-value is about 0.051, just above α = 0.05, so you fail to reject H₀.

With the example values loaded in the calculator above, the steps are:

  1. Test: Two-sample Welch t-test. H₀: μ₁ = μ₂.
  2. Statistic = (estimate − null value) ÷ standard error = 4.3 ÷ 2.15827 = 1.99233, df = 62.979.
  3. Two-tailed p-value = 0.0506733.
  4. Compare p with α = 0.05: p ≥ α, so do not reject H₀.

Result: Test used = Two-sample Welch t-test; t statistic = 1.99233; p-value = 0.0506733; Decision = Fail to reject H₀ (p ≥ 0.05).

Where Hypothesis Test Is Used

Comparing two groups

Testing whether two means or proportions differ.

Checking a claim

Testing a mean or proportion against a target.

Before-and-after data

Running a paired test from summary values.

Coursework

Verifying hypothesis test answers.

Common Hypothesis Test Mistakes to Avoid

  • Write H₀ and H₁ before computing.
  • Use Welch for two means unless you have good reason to assume equal variances.
  • Report the effect size and a confidence interval, not just p.

Hypothesis Test Terms and Definitions

Null hypothesis
The default claim of no effect or no difference.
p-value
The probability of a result at least this extreme if H₀ is true.
α
The cut-off probability for rejecting H₀.

Hypothesis Test FAQs

How do I do a hypothesis test?

State H₀ and H₁, choose α, compute the test statistic, find the p-value and compare it with α.

What is a two-tailed hypothesis test?

A test where H₁ is "not equal", so extreme values in either direction count as evidence.

When do I use a z-test and when a t-test?

Use t for means with an estimated SD; use z for proportions or a known σ.

What does it mean to fail to reject H₀?

The evidence is not strong enough; it does not prove H₀ is true.

Related calculators

Last updated 2026-11-09. See our disclaimer.