Enter Values

Sample mean from your data
Hypothesized value under H₀
Known population standard deviation
Sample standard deviation from your data
Sample proportion (0 to 1)
Hypothesized proportion under H₀
Number of observations

Formula Reference

z-test for Mean
z = (x̄ − μ₀) / (σ / √n)

t-test for Mean
t = (x̄ − μ₀) / (s / √n), df = n − 1

z-test for Proportion
z = (p̂ − p₀) / √(p₀(1−p₀)/n)

Test Results

Decision
Reject H₀
Statistically Significant
z-statistic
2.0000
p-value
0.0455
Critical Value
±1.9600
Degrees of Freedom
--
At the 5% significance level, we reject H₀. The sample mean provides sufficient evidence that the population mean differs from the null value.

Standard Normal Distribution

Formula Breakdown

Model Assumptions

  • The sample is a simple random sample from the population.
  • Observations are independent.
  • z-test for mean: The population standard deviation σ is known and the population is normal, or n is large enough for the Central Limit Theorem to apply (typically n ≥ 30).
  • t-test for mean: The population is approximately normal, or n is large. Uses sample standard deviation s; degrees of freedom = n − 1.
  • z-test for proportion: Data are Bernoulli trials. Normal approximation requires n·p₀ ≥ 10 and n·(1−p₀) ≥ 10.
  • Reported p-values assume the null hypothesis is true.
  • This calculator implements the one-sample case only.

For educational purposes. Not financial advice.

Ryan O'Connell, CFA
CALCULATOR BY
Ryan O'Connell, CFA
CFA Charterholder & Finance Educator

Finance professional building free tools for options pricing, valuation, and portfolio management.

Download This Calculator as an Excel Template Interactive model with editable formulas — customize, save, and share.
Get Excel Template

Frequently Asked Questions

A z-test for a mean requires that the population standard deviation (σ) is known and uses the standard normal distribution. A t-test for a mean uses the sample standard deviation (s) when the population σ is unknown and uses the t-distribution with n − 1 degrees of freedom. As the sample size increases, the t-distribution approaches the standard normal, so the distinction matters most for small samples.

Use a one-sided test when you have a strong prior expectation about the direction of the effect (e.g., a new treatment increases the mean). Use a two-sided test when you want to detect a difference in either direction. The choice should be made before seeing the data. One-sided tests have more power in the predicted direction but cannot detect effects in the opposite direction.

For a two-sided test, the p-value is 2 times the probability of observing a test statistic as extreme as the one calculated in either tail. For a one-sided greater test, it is the probability of observing a value at least as large as the test statistic. For a one-sided less test, it is the probability of observing a value at least as small as the test statistic.

Use a z-test for a proportion when your data consists of binary outcomes (success/failure) and you want to test whether the population proportion equals a specific value. The test requires that both n·p₀ and n·(1−p₀) are at least 10 for the normal approximation to be accurate. For smaller samples, consider an exact binomial test instead.

The critical value is the threshold at which the p-value equals the significance level (α). For a two-sided test, you reject the null hypothesis if the absolute value of the test statistic exceeds the critical value. For a one-sided test, you reject if the test statistic falls in the appropriate tail beyond the critical value. The critical value provides an equivalent decision rule to comparing the p-value against α.

The p-value is the probability of observing data as extreme as yours assuming the null hypothesis is true. It is not the probability that the null hypothesis is true given the data. A small p-value suggests the data are unlikely under the null, but it does not tell you the probability that the null is actually false. This distinction is one of the most common misinterpretations in statistics.

The test statistic formulas divide by the standard error. For a z-test of a mean, the standard error involves σ, which must be positive. For a proportion test, the standard error is √(p₀(1−p₀)/n), which equals zero when p₀ is 0 or 1. A zero standard error makes the test statistic undefined, so these boundary values are not allowed.

This calculator supports one-sample hypothesis tests: a z-test for a population mean (when sigma is known), a t-test for a population mean (when sigma is unknown), and a z-test for a population proportion. Each test can be configured for two-sided or one-sided alternatives at standard significance levels.

Disclaimer: This calculator is for educational purposes only. It uses simplified assumptions and is not investment advice. Results do not constitute a recommendation to buy or sell any financial instrument. Consult a qualified professional for personalized financial analysis.