Hypothesis Test Calculator — Z-Test, T-Test, P-Value & Critical Value
Test inputs
Hypothesis test result
Your test result will appear here.
Choose a test, enter the summary values, and calculate.
Advertisement
Hypothesis-test formulas
| Test | Statistic under H₀ | Reference distribution |
|---|---|---|
| One mean, unknown σ | t = (x̄ − μ₀) / (s/√n) | Student t with n − 1 df |
| One mean, known σ | z = (x̄ − μ₀) / (σ/√n) | Standard normal |
| Two independent means | t = [(x̄₁ − x̄₂) − Δ₀] / √(s₁²/n₁ + s₂²/n₂) | Welch t with Welch–Satterthwaite df |
| One proportion | z = (p̂ − p₀) / √[p₀(1 − p₀)/n] | Standard normal approximation |
| Two proportions, H₀: p₁ = p₂ | z = (p̂₁ − p̂₂) / √[p̂(1 − p̂)(1/n₁ + 1/n₂)] | Standard normal with pooled p̂ = (x₁ + x₂)/(n₁ + n₂) |
For a two-sided test, the p-value is twice the smaller tail probability and the critical values are ±q1−α/2. For a one-sided test, the p-value uses the selected tail and the cutoff is q1−α or its negative.
How to use the calculator
- Choose the parameter and test design.
- Enter sample summary statistics and the value claimed by the null hypothesis.
- Select the alternative before inspecting the data, then enter α.
- Calculate and compare the p-value with α or the statistic with the critical region.
- Save the result with Copy or Download CSV; inputs never leave the browser.
How to interpret the result
If p ≤ α, the result is statistically significant at that preselected level and the calculator reports “reject H₀.” If p > α, it reports “fail to reject H₀.” Failing to reject is not evidence that the null is true; the study may have limited precision or power.
A small p-value is not the probability that H₀ is true, the chance the result occurred “by accident,” or a measure of effect size. Interpret it alongside a confidence interval, the study design, data quality, and practical importance.
Assumptions and limits
- Observations are random or representative and independent within samples; groups are independent for the two-sample tests.
- Small-sample t inference for means assumes an approximately normal population. Severe skew or influential outliers can make the result unreliable.
- The one- and two-proportion procedures are large-sample normal approximations. The calculator flags when expected counts under H₀ are below 5.
- Welch’s test does not assume equal variances. For paired data, test the within-pair differences as a one-sample mean.
- The alternative hypothesis and α should be chosen before examining the result. Selecting a tail after seeing the statistic invalidates the nominal error rate.
- No multiplicity adjustment is applied when many hypotheses are tested.
Statistical limit: A test measures compatibility with a null model; it does not establish causality, remove bias, guarantee replication, or determine practical importance.
Frequently asked questions
When should I use z instead of t for a mean?
Use z only when the population standard deviation σ is genuinely known independently of the sample. If the entered SD is a sample estimate, choose t.
What does the p-value mean?
Assuming H₀ and the selected model are true, it is the probability of a statistic at least as extreme in the direction specified by Hₐ. It is not the probability that H₀ is true.
What is a critical value?
It is a cutoff from the null distribution determined by α and the selected tail. Values beyond the cutoff form the rejection region.
Why does the choice of tail matter?
A right-tailed test looks only for an increase, a left-tailed test only for a decrease, and a two-sided test for either direction. The choice changes both the p-value and critical value and should follow the research question.
Does “fail to reject” mean H₀ is true?
No. It only means the evidence did not cross the selected threshold. A wide range of effects may remain compatible with the data.
Which two-sample t-test is used?
Welch’s t-test. It permits unequal variances and unequal sample sizes and uses approximate Welch–Satterthwaite degrees of freedom.
Can I test paired measurements?
Yes. Calculate one difference for every pair, then enter the mean, sample SD, and number of differences in the one-mean t-test with a null mean of zero.
Are my inputs tracked?
No. Calculations run locally in your browser, and entered values are not sent, stored, or attached to analytics events.
Methodology and references
Last reviewed: August 4, 2026. Test statistics, tail rules, p-value interpretation, and large-sample proportion conditions were checked against the NIST/SEMATECH e-Handbook of Statistical Methods.