Skip to content
Statculator

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 now

Updated · 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.

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.

Full T-Test Calculator page with formulas and FAQ
Try

Not sure? Same subjects measured twice → paired. Two separate groups → Welch is the safe default.

Use two-tailed unless you predicted the direction before seeing the data.

Usually 0.05 or 0.01.

Data input
Sample 1
Sample 2

Results

t statistic
1.9629
Welch’s t-test
p-value
0.0554
Two-tailed, df = 48.72

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.

t distribution curve with the shaded probability region, markers at t = 1.963t = 1.963-4-3-2-101234t distribution, df = 48.72
Shaded area: rejection region at the chosen α. Dashed line: your test statistic.

Step-by-step solution

  1. 1

    State the hypotheses

    This is a two-tailed test.

    H₀: μ₁ − μ₂ = 0
    H₁: μ₁ − μ₂ ≠ 0
  2. 2

    Choose the significance level

    α = 0.05
  3. 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.3844
    s₂² / n₂ = 2.8² / 28 = 0.28
  4. 4

    Find the standard error of the difference

    SE = √(s₁²/n₁ + s₂²/n₂) = √(0.3844 + 0.28) = 0.8151
  5. 5

    Calculate the test statistic

    t = (x̄₁ − x̄₂) / SE = (14.2 − 12.6) / 0.8151 = 1.9629
  6. 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. 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. 8

    Find the critical value

    Critical value: ±2.0099
    Reject H₀ if |t| ≥ 2.0099
  9. 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. 10

    Effect size and confidence interval

    d = (x̄₁ − x̄₂) / √[(s₁² + s₂²)/2] = 1.6 / 2.9538 = 0.5417
    95% CI for μ₁ − μ₂ = 1.6 ± 2.0099 × 0.8151 = (-0.0383, 3.2383)

All 22 hypothesis test calculators

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

  1. 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.
  2. Choose the significance level α. α = 0.05 is the usual default; use 0.01 when a false positive is costly.
  3. Pick the test from the type of outcome, the number of groups and the design (see the chooser below), and check its assumptions.
  4. 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.
  5. 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 α.
  6. 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.

  1. 01Hypotheses. σ is unknown, so use a one-sample t-test.
    H₀: μ = 250, H₁: μ ≠ 250 (two-tailed)
  2. 02Test statistic. Divide the difference from 250 by the standard error of the mean.
    SE = s / √n = 6 / √16 = 1.5
    t = (246.5 − 250) / 1.5 = −2.333, df = 15
  3. 03p-value and critical value. Take both tails of the t distribution with 15 degrees of freedom.
    p = 2 × P(T₁₅ ≤ −2.333) = 0.0340
    t∗ = ±2.131 for α = 0.05
  4. 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?

  1. 01Hypotheses.
    H₀: p_A = p_B, H₁: p_A ≠ p_B
  2. 02Pooled proportion and standard error under H₀.
    p̂ = (120 + 150) / 2000 = 0.135
    SE = √(0.135 × 0.865 × (1/1000 + 1/1000)) = 0.01528
  3. 03Test statistic and p-value.
    z = (0.12 − 0.15) / 0.01528 = −1.963
    p = 2 × Φ(−1.963) = 0.0496
  4. 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

TestStatisticReference distribution
One-sample tt = (x̄ − μ₀) / (s / √n)t with df = n − 1
Pooled two-sample tt = (x̄₁ − x̄₂) / [sₚ √(1/n₁ + 1/n₂)]t with df = n₁ + n₂ − 2
Welch’s tt = (x̄₁ − x̄₂) / √(s₁²/n₁ + s₂²/n₂)t with Welch–Satterthwaite df
Paired tt = d̄ / (s_d / √n)t with df = n − 1, where n is the number of pairs
One-sample zz = (x̄ − μ₀) / (σ / √n)Standard normal
One-proportion zz = (p̂ − p₀) / √(p₀(1 − p₀) / n)Standard normal
Two-proportion zz = (p̂₁ − p̂₂) / √(p̂(1 − p̂)(1/n₁ + 1/n₂)), with p̂ the pooled proportionStandard normal
Chi-squareχ² = Σ(O − E)² / Eχ² with df = k − 1 (fit) or (r − 1)(c − 1) (independence)
One-way ANOVAF = MSB / MSWF with df = (k − 1, N − k)
F-test for variancesF = s₁² / s₂²F with df = (n₁ − 1, n₂ − 1)
One-sample varianceχ² = (n − 1)s² / σ₀²χ² with df = n − 1
Levene’s testOne-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–WilkW = (Σ aᵢ · x(i))² / Σ(xᵢ − x̄)², where x(i) is the i-th smallest valuep-value from Royston’s approximation; a small W signals non-normality
Kolmogorov–SmirnovD = max |Fₙ(x) − F(x)|, the largest gap between the sample and reference CDFsKolmogorov 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

TermMeaning
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 statisticA number such as t, z, χ² or F that measures how far the sample is from what H₀ predicts, in standard-error units.
p-valueThe 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 valueThe 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 regionThe range of test statistic values that leads to rejecting H₀.
Degrees of freedom, dfA count that fixes the exact shape of the t, χ² or F distribution, such as n − 1 for a one-sample t-test.
Type I errorRejecting 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 sizeHow 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?

Start with the outcome: numeric outcomes lead to t-tests, z-tests or ANOVA, and categorical outcomes lead to proportion tests, chi-square tests or Fisher’s exact test. Then count the groups and check whether they are independent or paired. The guide How to Choose the Right Statistical Test turns those questions into a decision table.

What does it mean to reject the null hypothesis?

Rejecting H₀ means the data would be unusual if the null hypothesis were true, specifically that the p-value is at or below your significance level α. It does not prove the alternative hypothesis, and it says nothing about whether the effect is large or important. Report an effect size (see the Effect Size Calculator) or a confidence interval alongside the decision.

Should I use a one-tailed or a two-tailed test?

Use a two-tailed test unless you had a specific directional prediction before seeing the data and a result in the other direction would be treated the same as no effect. A one-tailed test puts all of α in one tail, so it is easier to reach significance in the predicted direction. Choosing the tail after looking at the data inflates the false-positive rate.

Should I use Welch’s t-test or the pooled two-sample t-test?

Welch’s t-test is the safer default because it does not assume the two populations have equal variances and loses very little power when they do. The pooled test is appropriate when equal variances are justified by design or prior knowledge. When the group sizes are unequal and the variances differ, the pooled test can give misleading p-values. The Independent Samples t-Test Calculator shows both results side by side, together with Levene’s test.

When should I use Fisher’s exact test instead of a chi-square test?

Use Fisher’s exact test for a 2×2 table when expected counts are small; a common rule is any expected count below 5. The chi-square test relies on a large-sample approximation, while Fisher’s test computes the p-value exactly from the hypergeometric distribution. Statculator’s two-sided Fisher p-value adds up every table with the same margins whose probability is no larger than the observed table’s.

What is the difference between a t-test and a z-test?

A z-test assumes the population standard deviation σ is known, while a t-test estimates it from the sample and uses the t distribution to account for that extra uncertainty. In practice σ is rarely known, so t-tests are far more common for means. Proportion tests use z because, under H₀, the standard error is fixed by the hypothesized or pooled proportion.

How do I calculate the t test statistic?

For a one-sample t-test, subtract the hypothesized mean from the sample mean and divide by the standard error: t = (x̄ − μ₀) / (s / √n), with df = n − 1. For example, x̄ = 246.5, μ₀ = 250, s = 6 and n = 16 give t = −3.5 / 1.5 = −2.333. Two-sample and paired t statistics follow the same pattern with a different standard error; the formula table above lists each one, and the T-Test Calculator computes all four.

What is 0.05 in hypothesis testing?

0.05 is the most common significance level α: you reject H₀ when the p-value is 0.05 or less. It means you accept a 5% chance of rejecting a null hypothesis that is actually true (a Type I error). The value is a convention, not a law; fields that need stronger evidence use 0.01 or smaller.

What does beta mean in statistics?

In hypothesis testing, β is the probability of a Type II error, failing to reject H₀ when it is false. Its complement, 1 − β, is the power of the test. Studies are usually planned for β = 0.20, which means 80% power. In regression, β instead denotes a coefficient, a different use of the same letter.

Looking for something else? See all calculators or search the site.