Hypothesis Testing Calculators
Free hypothesis testing calculators: 22 t, z, chi-square, ANOVA and F tests that find the test statistic, p-value and critical value, with every step shown.
Run a t-test nowUpdated · Formulas and conventions follow our methodology
In short
A hypothesis testing calculator takes your sample data, computes the test statistic, converts it into a p-value, and tells you whether to reject the null hypothesis H₀ at your significance level α (usually 0.05). Statculator rejects H₀ when p ≤ α. The 22 calculators on this hub cover t-tests, z-tests, proportion tests, chi-square tests, Fisher’s exact test, ANOVA, variance, normality and correlation tests, and effect sizes, each with the full working.
Run a hypothesis test now: t-test calculator
Most hypothesis tests on means are t-tests. Pick the one-sample, two-sample (pooled), Welch’s or paired test, enter raw data or summary statistics, and get the hypotheses, t, df, p-value, critical value, decision and every step. For proportions, counts, ANOVA and the other tests, choose a calculator from the list below.
Results
Fail to reject H₀ at α = 0.05
p = 0.0554 > 0.05. At the 5% level there is not enough evidence that the two population means differ.
- Mean difference, x̄₁ − x̄₂
- 1.6
- Welch df
- 48.7199
- Standard error
- 0.8151
- Critical t (α = 0.05)
- ±2.0099
- 95% CI for μ₁ − μ₂
- (-0.0383, 3.2383)
- Cohen’s d (average-variance SD)
- 0.5417 (medium)
- SD ratio, larger / smaller
- 1.1071
- Pooled t-test p (for comparison)
- 0.0538
- Sample 1: x̄₁, s₁, n₁
- 14.2, 3.1, 25
- Sample 2: x̄₂, s₂, n₂
- 12.6, 2.8, 28
Interpretation: The sample means differ by 1.6, which is 1.9629 standard errors from zero on 48.72 degrees of freedom. A difference this size could easily arise by chance if the population means were equal.
- Same calculation as the Welch’s t-Test Calculator, which has a worked example and assumptions for this test.
Step-by-step solution
- 1
State the hypotheses
This is a two-tailed test.
H₀: μ₁ − μ₂ = 0H₁: μ₁ − μ₂ ≠ 0 - 2
Choose the significance level
α = 0.05 - 3
Find each sample’s variance of the mean
Welch’s test keeps the two variances separate instead of pooling them.
s₁² / n₁ = 3.1² / 25 = 0.3844s₂² / n₂ = 2.8² / 28 = 0.28 - 4
Find the standard error of the difference
SE = √(s₁²/n₁ + s₂²/n₂) = √(0.3844 + 0.28) = 0.8151 - 5
Calculate the test statistic
t = (x̄₁ − x̄₂) / SE = (14.2 − 12.6) / 0.8151 = 1.9629 - 6
Find the Welch–Satterthwaite degrees of freedom
df = (s₁²/n₁ + s₂²/n₂)² / [ (s₁²/n₁)²/(n₁ − 1) + (s₂²/n₂)²/(n₂ − 1) ]df = (0.3844 + 0.28)² / [ 0.3844²/24 + 0.28²/27 ]df = 0.4414 / 0.0091 = 48.7199 - 7
Find the p-value
Use the t distribution with the Welch–Satterthwaite df = 48.7199. The df need not be a whole number; rounding it down (to 48) gives a slightly more conservative test.
p = 2 × P(t ≥ |1.9629|) = 0.0554 - 8
Find the critical value
Critical value: ±2.0099Reject H₀ if |t| ≥ 2.0099 - 9
Decision: fail to reject H₀
At the 5% level there is not enough evidence that the two population means differ.
p = 0.0554 > α = 0.05 - 10
Effect size and confidence interval
d = (x̄₁ − x̄₂) / √[(s₁² + s₂²)/2] = 1.6 / 2.9538 = 0.541795% CI for μ₁ − μ₂ = 1.6 ± 2.0099 × 0.8151 = (-0.0383, 3.2383)
All 22 hypothesis test calculators
Tests for means (t-tests and z-tests)
Compare a mean with a target value, or two means with each other.
- T-Test CalculatorOne-sample, two-sample (pooled or Welch) and paired t-tests in one place.
- One-Sample t-Test CalculatorTest a mean against a hypothesized value when σ is unknown.
- Two-Sample t-Test CalculatorCompare two independent means with a pooled or Welch two-sample t-test.
- Independent Samples t-Test CalculatorPooled and Welch results side by side, with Levene’s test, effect size and an APA-style summary.
- Welch’s t-Test CalculatorCompare two independent means without assuming equal variances.
- Paired t-Test CalculatorTest the mean difference of matched pairs or before-and-after measurements.
- Z-Test CalculatorOne- and two-sample z-tests for means and proportions in one tool.
- One-Sample Z-Test CalculatorTest a mean against a hypothesized value when the population σ is known.
- Two-Sample Z-Test CalculatorCompare two independent means when both population SDs are known.
Tests for proportions and counts
Success rates, A/B tests, contingency tables and goodness of fit.
- One Proportion Z-Test CalculatorTest a sample proportion against a claimed population proportion.
- Two Proportion Z-Test CalculatorCompare two independent proportions, such as conversion rates in an A/B test.
- Chi-Square Test of Independence CalculatorChi-square test of independence for any r × c table, with expected counts, steps and Cramér’s V.
- Chi-Square Goodness of Fit CalculatorTest whether observed counts match expected counts or proportions.
- Fisher’s Exact Test CalculatorExact p-value for a 2×2 table, ideal when expected counts are small.
ANOVA and tests for variances
Three or more group means, and whether spreads are equal.
- ANOVA CalculatorOne-way ANOVA for 2–10 groups with the full ANOVA table, Tukey HSD and effect size.
- F-Test CalculatorTest whether two population variances are equal using F = s₁² / s₂².
- Levene’s Test CalculatorTest whether two or more groups have equal variances (Levene and Brown–Forsythe).
- One-Sample Variance Test CalculatorChi-square test of a population variance or standard deviation against a claimed value.
Normality, correlation and effect size
Check assumptions, test a correlation, and measure how big an effect is.
- Shapiro–Wilk Test CalculatorTest whether a sample plausibly comes from a normal distribution.
- Kolmogorov–Smirnov Test CalculatorCompare a sample with a reference distribution, or two samples with each other.
- Pearson’s Correlation Test CalculatorTest whether a correlation is significantly different from zero.
- Effect Size CalculatorCohen’s d, Hedges’ g, Glass’s Δ, η², ω², Cramér’s V and r for common tests, with interpretation.
What a hypothesis test calculator does
Whether you call it a hypothesis test calculator, a statistical test calculator, a statistical hypothesis testing calculator or a test statistic calculator, the job is the same: set up a null hypothesis H₀ (no effect, no difference) and an alternative hypothesis H₁, measure how far the sample sits from what H₀ predicts, and decide whether that distance is too large to blame on chance. Each calculator here asks for the null and alternative hypothesis, the significance level and your data, then writes out every step with your numbers substituted, so you can check the method as well as the answer.
The right test depends on the outcome (numeric or categorical), the number of groups, whether the groups are independent or paired, and whether the population standard deviation is known. The guide How to Choose the Right Statistical Test walks through that decision, and the table further down maps common goals to calculators. Before a t-test or ANOVA, check its assumptions with a normality test such as the Shapiro–Wilk Test Calculator and an equal-variance test such as the Levene’s Test Calculator; afterwards, the Effect Size Calculator shows how large a difference is. If you already have a test statistic from software or a paper and only need its p-value or critical value, use the P-Value and Critical Value Calculators calculators instead.
How to calculate a hypothesis test, step by step
- State the hypotheses. Write H₀ with an equals sign (μ = 250, p₁ = p₂) and H₁ as ≠ for a two-tailed test, or < or > for a one-tailed test you chose before seeing the data.
- Choose the significance level α. α = 0.05 is the usual default; use 0.01 when a false positive is costly.
- Pick the test from the type of outcome, the number of groups and the design (see the chooser below), and check its assumptions.
- Calculate the test statistic. Most statistics have the form (estimate − null value) ÷ standard error, such as
t = (x̄ − μ₀) / (s / √n). The formula table below lists the statistic for every test on this hub. - Find the p-value or the critical value. The p-value is the probability, if H₀ were true, of a statistic at least as extreme as yours. The critical value marks the edge of the rejection region for your α.
- Decide and interpret. Reject H₀ if p ≤ α (equivalently, if the statistic falls in the rejection region); otherwise fail to reject H₀. State the result in the words of the problem and report an effect size or confidence interval with it.
Hypothesis testing worked examples
Two complete tests, one for a mean and one for proportions. Enter the same numbers in the One-Sample t-Test Calculator and the Two Proportion Z-Test Calculator to check each value.
One-sample t-test: is the machine underfilling?
Problem. A machine should fill cups with 250 ml. A sample of n = 16 cups has mean x̄ = 246.5 ml and standard deviation s = 6 ml. Test at α = 0.05 whether the true mean differs from 250 ml.
- 01Hypotheses. σ is unknown, so use a one-sample t-test.H₀: μ = 250, H₁: μ ≠ 250 (two-tailed)
- 02Test statistic. Divide the difference from 250 by the standard error of the mean.SE = s / √n = 6 / √16 = 1.5t = (246.5 − 250) / 1.5 = −2.333, df = 15
- 03p-value and critical value. Take both tails of the t distribution with 15 degrees of freedom.p = 2 × P(T₁₅ ≤ −2.333) = 0.0340t∗ = ±2.131 for α = 0.05
- 04Decision. 0.0340 ≤ 0.05, and |−2.333| > 2.131, so the statistic lies in the rejection region.Reject H₀
Answer. At the 5% level there is evidence that the mean fill differs from 250 ml; the sample suggests the machine underfills by about 3.5 ml.
Two-proportion z-test: did the new page convert better?
Problem. In an A/B test, page A converted 120 of 1,000 visitors (12%) and page B converted 150 of 1,000 (15%). Is the difference significant at α = 0.05?
- 01Hypotheses.H₀: p_A = p_B, H₁: p_A ≠ p_B
- 02Pooled proportion and standard error under H₀.p̂ = (120 + 150) / 2000 = 0.135SE = √(0.135 × 0.865 × (1/1000 + 1/1000)) = 0.01528
- 03Test statistic and p-value.z = (0.12 − 0.15) / 0.01528 = −1.963p = 2 × Φ(−1.963) = 0.0496
- 04Decision. 0.0496 ≤ 0.05, so reject H₀, but only just: |z| = 1.963 barely clears z∗ = 1.960.Reject H₀ at α = 0.05; fail to reject at α = 0.01
Answer. Page B’s 3-point lift is statistically significant at 5% but not at 1%. A result this close to the cutoff is a reason to report the confidence interval for p_B − p_A, not only the decision.
Which hypothesis test calculator should I use?
| If you want to… | Use |
|---|---|
| If you want one tool that covers every kind of t-test | |
| If you want to compare one sample mean with a target value and σ is unknown | |
| If you want to compare the means of two independent groups | |
| If you measured the same subjects twice, or your observations come in matched pairs | |
| If you know the population standard deviation σ | |
| If you want to test one proportion against a claimed value | |
| If you want to compare two proportions, such as A/B test conversion rates | |
| If you want to test whether two categorical variables are associated | |
| If you want to check whether observed counts match expected proportions | |
| If you want to compare the means of three or more groups | |
| If you want to test whether two or more groups have equal variances | |
| If you want to test one variance or standard deviation against a claimed value | |
| If you want to check whether a sample is plausibly normal, or matches another distribution | |
| If you want to test whether a correlation differs from zero | |
| If you want to know how large an effect is, not only whether it is significant |
p-value approach vs critical value approach
Both approaches always reach the same decision. The p-value approach compares the probability of your result under H₀ with α: in the cup example, p = 0.034 is below 0.05, so reject. The critical value approach compares the statistic itself with a cutoff from the t-table or z table: |t| = 2.333 is beyond t∗ = 2.131, so reject. The p-value carries more information, because it shows how far inside or outside the cutoff you landed, which is why most software and every calculator here report it.
For a one-tailed test all of α sits in one tail, so the critical value is smaller in size: with df = 15 and α = 0.05 it is 1.753 instead of 2.131. Choose the tail before looking at the data. To convert any statistic into a p-value, or α into a critical value, use the P-Value and Critical Value Calculators calculators.
Type I errors, Type II errors and power
A test can go wrong in two ways. A Type I error rejects a true H₀, a false positive, and happens with probability α. A Type II error fails to reject a false H₀, a false negative, and happens with probability β. Power, 1 − β, is the chance of detecting an effect that really exists. Lowering α from 0.05 to 0.01 cuts false positives but raises β, so the only way to shrink both at once is a larger sample. The guide Type I vs Type II Errors (Type 1 vs Type 2): Definitions and Examples works through examples, and the Sample Size Calculators calculators find the n needed for a target power, usually 80%.
How to find the test statistic for each test
| Test | Statistic | Reference distribution |
|---|---|---|
| One-sample t | t = (x̄ − μ₀) / (s / √n) | t with df = n − 1 |
| Pooled two-sample t | t = (x̄₁ − x̄₂) / [sₚ √(1/n₁ + 1/n₂)] | t with df = n₁ + n₂ − 2 |
| Welch’s t | t = (x̄₁ − x̄₂) / √(s₁²/n₁ + s₂²/n₂) | t with Welch–Satterthwaite df |
| Paired t | t = d̄ / (s_d / √n) | t with df = n − 1, where n is the number of pairs |
| One-sample z | z = (x̄ − μ₀) / (σ / √n) | Standard normal |
| One-proportion z | z = (p̂ − p₀) / √(p₀(1 − p₀) / n) | Standard normal |
| Two-proportion z | z = (p̂₁ − p̂₂) / √(p̂(1 − p̂)(1/n₁ + 1/n₂)), with p̂ the pooled proportion | Standard normal |
| Chi-square | χ² = Σ(O − E)² / E | χ² with df = k − 1 (fit) or (r − 1)(c − 1) (independence) |
| One-way ANOVA | F = MSB / MSW | F with df = (k − 1, N − k) |
| F-test for variances | F = s₁² / s₂² | F with df = (n₁ − 1, n₂ − 1) |
| One-sample variance | χ² = (n − 1)s² / σ₀² | χ² with df = n − 1 |
| Levene’s test | One-way ANOVA F computed on the absolute deviations from each group’s mean (Levene) or median (Brown–Forsythe) | F with df = (k − 1, N − k) |
| Shapiro–Wilk | W = (Σ aᵢ · x(i))² / Σ(xᵢ − x̄)², where x(i) is the i-th smallest value | p-value from Royston’s approximation; a small W signals non-normality |
| Kolmogorov–Smirnov | D = max |Fₙ(x) − F(x)|, the largest gap between the sample and reference CDFs | Kolmogorov distribution of D |
| Cohen’s d (effect size) | d = (x̄₁ − x̄₂) / sₚ | Not a test; by convention about 0.2 is small, 0.5 medium and 0.8 large |
Hypothesis testing terms
| Term | Meaning |
|---|---|
| Null hypothesis, H₀ | The default claim of no effect or no difference, such as μ = 250 or p₁ = p₂. The test measures the evidence against it. |
| Alternative hypothesis, H₁ or Hₐ | The claim you accept if H₀ is rejected: ≠ for a two-tailed test, < or > for a one-tailed test. |
| Test statistic | A number such as t, z, χ² or F that measures how far the sample is from what H₀ predicts, in standard-error units. |
| p-value | The probability, assuming H₀ is true, of a test statistic at least as extreme as the one observed. |
| Significance level, α | The p-value cutoff chosen before the test, usually 0.05. It is also the Type I error rate. |
| Critical value | The value of the test statistic at the edge of the rejection region for a given α, such as z∗ = 1.960 for a two-tailed test at α = 0.05. |
| Rejection region | The range of test statistic values that leads to rejecting H₀. |
| Degrees of freedom, df | A count that fixes the exact shape of the t, χ² or F distribution, such as n − 1 for a one-sample t-test. |
| Type I error | Rejecting H₀ when it is true (a false positive). Its probability is α. |
| Type II error, β | Failing to reject H₀ when it is false (a false negative). Its probability is β. |
| Power, 1 − β | The probability of rejecting H₀ when a real effect of a given size exists. |
| Effect size | How large a difference or relationship is, independent of sample size, such as Cohen’s d. |
Frequently asked questions
How do I choose the right hypothesis test?
What does it mean to reject the null hypothesis?
Should I use a one-tailed or a two-tailed test?
Should I use Welch’s t-test or the pooled two-sample t-test?
When should I use Fisher’s exact test instead of a chi-square test?
What is the difference between a t-test and a z-test?
How do I calculate the t test statistic?
What is 0.05 in hypothesis testing?
What does beta mean in statistics?
Looking for something else? See all calculators or search the site.