Skip to content
Statistics CalculatorStatistics Calculator

Hypothesis Test Calculator

Run a one-sample z- or t-test for a population mean. Enter your data or summary statistics and a hypothesized mean to get the test statistic, p-value, and a clear reject / fail-to-reject decision.

Tested against reference valuesLast reviewed August 2026
Test statistic (t)1.0000
P-value0.3434
Fail to reject H₀ at α = 0.05

p = 0.3434 ≥ 0.05: not enough evidence to reject the null hypothesis.

Sample mean
5.0700
Std. error
0.0700
df
9
n
10

Test statistic & rejection area

p = 0.3434
t = -1.00t = 1.00
Distribution P-value area Test statistic

How to use this calculator

  1. Enter raw data, or switch to summary statistics and type the sample mean, standard deviation, and size.
  2. Enter the hypothesized mean (μ₀) from your null hypothesis.
  3. Choose the alternative hypothesis (two-tailed, right-tailed, or left-tailed) and your significance level α.
  4. Read the test statistic, p-value, and the reject / fail-to-reject decision, with the rejection area shaded on the chart.

What is hypothesis testing?

Hypothesis testing is a procedure for deciding whether sample data provides enough evidence to reject a claim about a population. You start with a null hypothesis (H₀), usually a statement of “no effect” or “no difference,” and an alternative hypothesis (H₁) that you are testing for.

  • H₀ (null): the population mean equals the hypothesized value, μ = μ₀.
  • H₁ (alternative): the mean is different, greater, or less than μ₀, depending on your test.

The steps of a hypothesis test

  1. State the null and alternative hypotheses.
  2. Choose a significance level α (commonly 0.05).
  3. Compute the test statistic from your sample.
  4. Find the p-value for that statistic under the null hypothesis.
  5. Reject H₀ if the p-value is less than α; otherwise fail to reject it.

Z-test vs. t-test

Use a z-test when the population standard deviation is known (or the sample is very large); the test statistic is compared to the standard normal distribution. Use a t-test when the population standard deviation is unknown and estimated from the sample; the statistic follows the t-distribution with n − 1 degrees of freedom.

t=xˉμ0s/nt=\dfrac{\bar{x}-\mu_0}{s/\sqrt{n}}One-sample t statistic

Interpreting the decision

Rejecting H₀ means the data is inconsistent with the null hypothesis at your chosen α. Failing to reject H₀ does not prove it is true — it only means there was not enough evidence to reject it.

Frequently asked questions

What is the difference between the null and alternative hypothesis?

The null hypothesis (H₀) is the default claim of no effect or no difference, such as μ = μ₀. The alternative hypothesis (H₁) is what you are testing for — that the mean is different from, greater than, or less than μ₀.

When do I reject the null hypothesis?

Reject the null hypothesis when the p-value is less than your significance level α (for example, p < 0.05). This means the observed result would be unlikely if the null hypothesis were true.

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

Use a two-tailed test when you are testing for any difference from μ₀. Use a one-tailed test only when you have a specific directional prediction — that the mean is greater than, or less than, the hypothesized value.

What is a test statistic?

A test statistic measures how far your sample result is from the null hypothesis, in standard-error units. For a one-sample test of a mean it is (x̄ − μ₀) divided by the standard error, and it is compared to the z or t distribution.

Related calculators

Was this calculator helpful?