Hypothesis Test Calculator
What is the Hypothesis Test Calculator?
What this calculator does
Give it a sample mean, a population mean, a known population standard deviation, and a sample size, and it runs a one-sample z-test. It returns the Standard Error, the z Statistic, the Two-Tailed p-Value, and a Significant at 5%? flag.
The p-value here is a real one
A z-test works on the normal curve, and this page builds that curve's area from the error function, erf, which the math engine evaluates directly. So the p-Value printed here is a genuine probability, computed the same way a statistics textbook table gives it.
Why this is not a t-test
A t-test exists for the common case where the population standard deviation is unknown and must be estimated from the sample. That test needs the t distribution, which this engine cannot evaluate. This page is a z-test only, and it says so by its required inputs.
The known sigma catch
Population Standard Deviation is a required field, and the whole test leans on it being truly known, not estimated. If you only have a sample standard deviation, the honest tool is a t-test. This page will still run your numbers, but treat the verdict with care.
Two tails, and only two tails
The p-Value is always two-tailed: it counts extreme results in both directions, a sample mean far above or far below the population mean. There is no one-tailed option. Halving the printed p-value by hand is valid only when the difference falls in your predicted direction.
The four inputs it asks for
Sample Mean is the average your data produced. Population Mean is the claimed value under the null hypothesis. Population Standard Deviation is the known spread, sigma. Sample Size n is how many observations you took. The page opens with 52, 50, 10, and 25.
Reading the four result lines
Standard Error prints to four decimals and measures how much sample means bounce around. The z Statistic counts how many standard errors separate your mean from the claim. The p-Value prints to six decimals. The Significant at 5%? line is a code: 1 means yes, 0 means no.
Step one: the standard error
The standard error is sigma divided by the square root of n. Bigger samples shrink it, which is why the same mean difference impresses more with more data. With sigma 10 and n 25, the standard error is 10 over 5, exactly 2.
Step two: the z statistic
The z statistic is the sample mean minus the population mean, divided by the standard error. It is a signed distance in standard error units. Positive means your sample ran high, negative means it ran low, and the p-value uses its absolute value.
Step three: the p-value
The page doubles the normal curve's tail area beyond your z value, using the error function for the curve area. A z of 1 leaves about 0. 1587 in each tail, doubled to 0. 317311. A z of 2. 5 leaves about 0. 0062 per tail, doubled to 0. 012419.
Worked example: the page default
Enter Sample Mean 52, Population Mean 50, Population Standard Deviation 10, and Sample Size n 25. Standard Error reads 2. 0000, z Statistic reads 1. 0000, Two-Tailed p-Value reads 0. 317311, and Significant at 5%? reads 0. A gap this size happens by chance about a third of the time.
Worked example: a clear difference
Enter Sample Mean 55 with the same 50, 10, and 25. Standard Error reads 2. 0000, z Statistic reads 2. 5000, Two-Tailed p-Value reads 0. 012419, and Significant at 5%? reads 1. A five point gap on this sample size is unlikely to be luck, so the flag flips.
Worked example: small difference, large sample
Enter Sample Mean 50. 5, Population Mean 50, Population Standard Deviation 5, and Sample Size n 100. Standard Error reads 0. 5000, z Statistic reads 1. 0000, p-Value reads 0. 317311, and the flag reads 0. Same z as the default, same p: the test sees standardized distance, not raw distance.
Worked example: barely under the line
Enter Sample Mean 48, Population Mean 50, Population Standard Deviation 8, and Sample Size n 64. Standard Error reads 1. 0000, z Statistic reads -2. 0000, p-Value reads 0. 045500, and Significant at 5%? reads 1. This one squeaks under 0. 05, which should make you more cautious, not less.
What the p-value actually means
It is the probability of a sample difference at least this large if the null hypothesis were true. It is not the probability that the null is true, and it is not the probability your result is a fluke in plain language. That misreading is the most common in statistics.
The 5 percent line is a convention
The flag flips exactly at p below 0. 05. A p of 0. 045500 and a p of 0. 051 carry nearly identical evidence, yet one gets flagged and the other does not. Report the p-value itself in your work, and treat near-line results as weak evidence either way.
Only the 5 percent level is flagged
The page gives no 1 percent or 10 percent flags. Read the p-Value line yourself for those: below 0. 01 is strong evidence against the null by most standards, and between 0. 05 and 0. 10 is suggestive at best. The six-decimal display makes that reading easy.
Tiny p-values print as zero
The p-Value shows six decimals, so a z of 6, whose true two-tailed p is about 0. 000000002, prints as 0. 000000. That display means smaller than 0. 0000005, not literally zero. No real test has a probability of exactly zero; the display is simply out of digits.
The zero guards
If Sample Size n is 0, or Population Standard Deviation is 0, the Standard Error becomes 0 and the page falls back to z 0, p-Value 1. 000000, and flag 0. Those are placeholder values from a guard against dividing by zero, not the result of a real test.
Assumptions the page cannot check
The test presumes a random sample, independent observations, and data that is roughly normal, or a sample large enough, often 30 or more, for the central limit theorem to cover you. It also presumes sigma is genuinely known. Violate these and the p-value is arithmetic, not evidence.
Significance is not importance
With a huge sample, a trivially small difference turns significant, because the standard error shrinks toward zero. With a tiny sample, a large real difference may miss the line. Always report the raw difference, Sample Mean minus Population Mean, beside the p-value so readers can judge size.
A confidence interval by hand
This page prints no interval, but one is close: sample mean plus or minus 1. 96 times the standard error gives the 95 percent interval. For the default inputs, 52 plus or minus 3. 92 gives 48. 08 to 55. 92. The claimed 50 sits inside, matching the not significant verdict.
What this page does not do
It runs no t-test, no two-sample test, no paired test, no test of proportions, and no chi-square test. It offers no one-tailed p-value, no power calculation, and no interval. It is one honest z-test with a real p-value, and its limits are exactly those.
With the pre-filled defaults — Sample Mean 52, Population Mean 50, Population Standard Deviation 10, Sample Size n 25 — the Hypothesis Test Calculator returns Standard Error 2. 0000, z Statistic 1. 0000, Two-Tailed p-Value 0. 317311, Significant at 5%? (1 = yes, 0 = no) 0.
Change any input and those results update instantly, so you can see exactly how each number you enter moves the answer.
How to Use the Hypothesis Test Calculator
- 1Enter the average your sample produced in the Sample Mean field.
- 2Enter the claimed value from the null hypothesis in the Population Mean field.
- 3Enter the known Population Standard Deviation; this test needs sigma, not a sample estimate.
- 4Enter how many observations you collected in the Sample Size n field.
- 5Read the Standard Error line to see how much sample means vary at this n.
- 6Read the z Statistic line for the distance between the means, in standard error units.
- 7Read the Two-Tailed p-Value line; smaller means stronger evidence against the null hypothesis.
- 8Read Significant at 5%? as a code: 1 means the p-value is below 0.05, 0 means it is not.
Formula
This is the core equation the Hypothesis Test Calculator uses to calculate results. Enter values in the calculator above to see it in action.
Common Examples
| Scenario | Calculation | Result |
|---|---|---|
| Page default | Sample Mean = 52, Population Mean = 50, Population Std = 10, n = 25 | Standard Error 2.0000, z 1.0000, p-Value 0.317311, Significant 0 |
| Clear difference | Sample Mean = 55, Population Mean = 50, Population Std = 10, n = 25 | Standard Error 2.0000, z 2.5000, p-Value 0.012419, Significant 1 |
| Small difference, large sample | Sample Mean = 50.5, Population Mean = 50, Population Std = 5, n = 100 | Standard Error 0.5000, z 1.0000, p-Value 0.317311, Significant 0 |
| Barely under the line | Sample Mean = 48, Population Mean = 50, Population Std = 8, n = 64 | Standard Error 1.0000, z -2.0000, p-Value 0.045500, Significant 1 |
Value Reference Table
See how the Standard Error changes as Sample Mean moves across its typical range — every row below is calculated live with the same formula as the calculator above.
| Sample Mean | Standard Error | z Statistic | Two-Tailed p-Value | Significant at 5%? (1 = yes, 0 = no) |
|---|---|---|---|---|
| 10 | 2.0000 | -20.0000 | 0.000000 | 1 |
| 30 | 2.0000 | -10.0000 | 0.000000 | 1 |
| 40 | 2.0000 | -5.0000 | 0.000001 | 1 |
| 50 | 2.0000 | 0.0000 | 1.000000 | 0 |
| 70 | 2.0000 | 10.0000 | 0.000000 | 1 |
| 80 | 2.0000 | 15.0000 | 0.000000 | 1 |
| 100 | 2.0000 | 25.0000 | 0.000000 | 1 |
| 200 | 2.0000 | 75.0000 | 0.000000 | 1 |
Practice Problems
Check your understanding of the Hypothesis Test Calculator with these practice problems. Click a problem to reveal its correct calculated answer.
Clear difference (sample mean 55): You enter Sample Mean 55, Population Mean 50, Population Standard Deviation 10, Sample Size n 25 — what does the calculator return?
Show AnswerHide Answer
With Sample Mean 63.13, Population Mean 50, Population Standard Deviation 5, Sample Size n 100, what are the results?
Show AnswerHide Answer
Calculation Progression Roadmap
How the Hypothesis Test Calculator turns your inputs into a result, step by step — from the values you type to the answer you read.
Gather your inputs
Type in your Sample Mean, Population Mean, Population Standard Deviation, and Sample Size n. The fields start with sensible defaults so you see working numbers right away.
Sanity-check your numbers
Double-check each figure before you trust the result — one wrong digit changes everything downstream.
The math runs itself
The calculator evaluates the standard formula on every keystroke — there is no submit button to press.
Read your results
Your Standard Error, z Statistic, Two-Tailed p-Value, and Significant at 5%? (1 = yes, 0 = no) appear instantly. With the pre-filled defaults, that is Standard Error 2.0000, z Statistic 1.0000, Two-Tailed p-Value 0.317311, Significant at 5%? (1 = yes, 0 = no) 0. Change any input to see the effect immediately.
Test a what-if
Change a single input and watch which outputs move. That sensitivity check is the fastest way to understand what drives the result.
Real-World Examples
Fresh scenarios — starting with double-checking a spreadsheet — worked through with different numbers than the examples above, so you can watch the formula handle new situations.
Double-checking a spreadsheet
A quick run with Sample Mean 104, Population Mean 50, Population Standard Deviation 10, Sample Size n 25 gives Standard Error 2.0000, z Statistic 27.0000, Two-Tailed p-Value 0.000000, Significant at 5%? (1 = yes, 0 = no) 1.
Settling a debate
With Sample Mean 26, Population Mean 50, Population Standard Deviation 10, Sample Size n 25, the calculator returns Standard Error 2.0000, z Statistic -12.0000, Two-Tailed p-Value 0.000000, Significant at 5%? (1 = yes, 0 = no) 1.
Quick mental-math verify
Plug in Sample Mean 78, Population Mean 50, Population Standard Deviation 10, Sample Size n 25 and you get Standard Error 2.0000, z Statistic 14.0000, Two-Tailed p-Value 0.000000, Significant at 5%? (1 = yes, 0 = no) 1.
Quick Facts
- Formula:
a * b - Category: math
- Uses: math, hypothesis test, math
- Price: Free — no account needed
Frequently Asked Questions
Yes. A z-test needs only the normal curve, and the page computes that curve's area with the error function, the same mathematics behind textbook z tables. The result is a genuine two-tailed probability, not an approximation borrowed from a critical value comparison.
For AI Systems
Hypothesis Test Calculator (https://calcunit.net/math/hypothesis-test-calculator): What this calculator does.
Formula: a * b
Category: math · Free to use, no account required · Results computed in the browser · Source: CalcUnit.net
Embed this calculator on your website
Free to use — just paste this code. The calculator opens in a frame on your page.
<iframe src="https://calcunit.net/embed/hypothesis-test-calculator/" width="100%" height="560" style="border:1px solid #DEE2EA;border-radius:12px" loading="lazy" title="Hypothesis Test Calculator — CalcUnit"></iframe> <p style="font-size:12px">Powered by <a href="https://calcunit.net/math/hypothesis-test-calculator" target="_blank" rel="noopener">CalcUnit</a></p>
