Z-Test Calculator

z statistic—
Two-sided p-value—
One-sided p-value—
Decision at 5%—

How Z-Test Calculator is calculated: One-sample z = (x̄ − μ₀) ÷ (σ/√n); two-sample z = (x̄₁ − x̄₂) ÷ √(σ₁²/n₁ + σ₂²/n₂). P-values from the standard normal CDF.

What is a Z-Test Calculator?

Z-Test Calculator is a free online tool that runs a one-sample or two-sample z-test when the population standard deviation is known, giving the z statistic and the p-value. Type your numbers into the boxes above and the answer appears at once, with no sign-up, no download and no waiting. It runs fully in your browser, so your numbers never leave your device.

The z-test asks whether a sample mean is far enough from a hypothesised value to matter, measuring the distance in standard errors. It needs the population standard deviation to be known — that is what separates it from the t-test. This calculator runs the one-sample and two-sample versions and gives the two-sided and one-sided p-values.

Students use it most, but teachers, tutors and anyone checking homework use it too. The page shows the main answer first, then the supporting values underneath, so you can see the full picture without scrolling through a long report. Every value on the page comes from the same calculation, so the parts always agree with each other.

This page is free to use as often as you like. There is nothing to install and no account to create, and the tool works the same on a phone, a tablet or a laptop. If you are working through a set of problems, you can change one number at a time and watch each answer update on the spot.

How a Z-Test Calculator works

The method behind this tool is straightforward. One-sample: z = (x̄ − μ₀) ÷ (σ/√n). Two-sample: z = (x̄₁ − x̄₂) ÷ √(σ₁²/n₁ + σ₂²/n₂). The p-value comes from the standard normal CDF, computed with the Abramowitz-Stegun approximation, which is accurate to about 0.0000001. The decision row compares the two-sided p-value with the 5% level. The calculator applies that rule to the numbers you enter and shows each result with its label, so you can follow what happened at every step instead of getting one unexplained number.

The formula the tool uses is: One-sample z = (x̄ − μ₀) ÷ (σ/√n); two-sample z = (x̄₁ − x̄₂) ÷ √(σ₁²/n₁ + σ₂²/n₂). P-values from the standard normal CDF.. That single line is the whole method. Everything else on the page — the extra rows, the worked example below — is that formula applied to your numbers, with the intermediate steps shown so you can check the working by hand.

Edge cases are handled openly rather than hidden. When an input has no valid answer, the tool shows a dash instead of a made-up number, and the article below explains why that input has no answer. That matters for homework and exams, where a wrong-looking answer is worse than a clear statement that the input does not work.

The calculation is exact arithmetic on the numbers you type, not a rounded table lookup. Small rounding appears only in how answers are displayed — usually to two decimal places — while the working underneath keeps full precision. If you need more digits, work from the formula with the unrounded inputs shown on the page.

The the population standard deviation σ explained

The input that trips people up most is the population standard deviation σ. σ is the population standard deviation, which must be known for a z-test — if you only have the sample standard deviation, the t-test is the right tool instead. The sample size goes in the denominator as √n, so a larger sample gives a smaller standard error and a larger z for the same difference. Getting this one value right is what decides whether the answer is right, because every other step follows from it. Take a moment to check it against the problem statement before trusting the result.

A common slip is to enter a value in the wrong unit or the wrong form — a percentage where a decimal belongs, or a count where a rate belongs. The labels next to each box state the unit or form expected, so read them before typing. When a problem gives a value in a different form, convert it first; the calculator cannot guess which form you meant.

Another point worth care is the range of sensible values. Very large numbers, zeros and negative values are allowed in the boxes, but they do not always make sense for the problem. If the answer looks strange, check the inputs first — a misplaced decimal point in one box is the usual cause, not a fault in the method.

Once the inputs look right, the results follow at once. The main answer is highlighted at the top of the results box, and the supporting rows sit below it. Read them together: the supporting rows often explain why the main answer came out the way it did, and they make it easy to spot a typing slip.

A worked example

Here is a worked example using the default values on this page. With Test type = one; Sample mean (x̄) = 105; Hypothesised mean (μ₀) = 100; Population SD (σ) = 15; Sample size (n) = 36; Sample mean 2 (x̄₂, two-sample only) = 110; Population SD 2 (σ₂, two-sample only) = 15; Sample size 2 (n₂, two-sample only) = 36, the tool returns z statistic: 2; Two-sided p-value: 0.0455; One-sided p-value: 0.0228; Decision at 5%: Reject H₀ at the 5% level.

The same method works on any other values. With Test type = two; Sample mean (x̄) = 105; Hypothesised mean (μ₀) = 100; Population SD (σ) = 15; Sample size (n) = 36; Sample mean 2 (x̄₂, two-sample only) = 110; Population SD 2 (σ₂, two-sample only) = 15; Sample size 2 (n₂, two-sample only) = 36, it returns z statistic: -1.4142; Two-sided p-value: 0.1573; One-sided p-value: 0.0786; Decision at 5%: Fail to reject H₀ at the 5% level. The method is identical in both cases — only the inputs change, and the answers follow the same formula.

You can repeat this check with your own numbers. Change one input at a time and watch how the answer moves — that habit builds a feel for the formula that reading alone does not. If you change two inputs at once and the answer jumps, change them back one at a time to see which one caused the move.

For homework, write down the inputs, the formula and the answer, in that order. Showing the formula with your numbers substituted is what earns method marks, even if a later step slips. The worked example above follows exactly that pattern, so it doubles as a model for how to set out your own solution.

Who uses a Z-Test Calculator and why

This tool earns its place in three kinds of work. First, testing a sample mean against a known value in statistics homework Second, comparing two sample means when both population SDs are known Third, checking z-test working and p-values against a worked answer Each of these uses the same calculation, just with different numbers and a different reason for needing the answer.

In class, it is a checking tool rather than a replacement for learning. Work the problem by hand first, then use the calculator to confirm the answer. When the two disagree, the disagreement is useful: it points to the exact step where the hand working went off track, and finding that step is where the learning happens.

Tutors and teachers use it the same way, to prepare answer keys and to check a batch of student answers quickly. Because the method is stated on the page, a teacher can point a student at the formula line and the worked example and ask them to find where their own working diverged from it.

Outside school, the same calculation turns up in planning and checking real quantities — wherever the relationship in the formula describes something concrete. The tool stays the same; only the numbers and the stakes change. That is why a plain, honest calculator with its method on show is worth more than a black box that only prints an answer.

A Z-Test Calculator vs T-Test Calculator

Z-Test Calculator answers a different question from the T-Test Calculator, so the two tools complement each other rather than compete. The t-test calculator is the version to use when the population standard deviation is not known and must be estimated from the sample. This page is the version for when σ is known. The formulas look alike, but the t-test uses the t distribution and this page uses the normal distribution — pick the tool that matches what the question gives you.

A good rule is to pick the tool that matches the question you were actually asked. If the question names the quantity this page computes, use this page. If it names the quantity the other tool computes, use that one instead. Using the wrong tool and then converting the answer by hand is slower and invites slips.

Many students keep both pages open while revising, because the topics sit next to each other in most courses. Working a problem on one tool and checking the related quantity on the other builds the link between the two ideas, which is exactly the link exam questions like to test. The T-Test Calculator link in this article goes to the related tool.

Both tools are free and run in the browser the same way, so there is no cost to switching between them. The habit that pays off is not collecting tools, but knowing which question each one answers and reaching for the right one first.

Common mistakes with a Z-Test Calculator

The first mistake is using a z-test when σ is unknown — that is a t-test.

The second is using the sample standard deviation in place of the population one.

The third is reporting the one-sided p-value when the question asks for two-sided.

The fourth is reading a non-significant result as proof that the null hypothesis is true. And a last general point: always read the answer with its label and unit. A bare number copied into homework without its unit or its meaning is an easy mark lost, and it is the most avoidable slip of all.

How to use this Z-Test Calculator

Using this z test calculator takes four steps. First, read the labels and type your values into the boxes — or keep the defaults to see a worked example. Second, check the inputs once, especially the one explained above. Third, read the main answer at the top of the results box, then the supporting rows below it. Fourth, compare the answer with a rough mental check: does the size and sign look right for the numbers you entered?

If the answer looks wrong, change one input at a time and watch what moves. That isolates the slip fast. If a result shows a dash, the input has no valid answer for this method — read the note in the section above to see why, and adjust the input rather than guessing a value.

The tool stores nothing and sends nothing anywhere. Your numbers stay in your own browser tab, and closing the tab clears them. That makes it safe for classwork and for quick checks on shared devices, and it means there is no history to delete afterwards.

For more practice, the related tools linked in this article cover the neighbouring ideas in the same chapter. Working through them in order — this tool first, then the related one — gives a short revision loop that covers the topic properly. Start with the worked example above, then try your own numbers. z-scores, normal distribution, p-values cover the ideas that sit closest to this one, so they are the natural next pages to open.

Frequently Asked Questions

It computes runs a one-sample or two-sample z-test when the population standard deviation is known, giving the z statistic and the p-value. You enter the inputs listed on the page and it returns the answer at once, together with the supporting values that explain how the answer was reached. The method and the formula are shown on the page, so you can check the working by hand.

z = 2. The standard error is 15 ÷ √36 = 2.5, and (105 − 100) ÷ 2.5 = 2. The two-sided p-value is 0.0455, so the result is significant at the 5% level.

The z statistic is exact arithmetic from the inputs. The p-value uses the Abramowitz-Stegun approximation to the normal CDF, accurate to about 0.0000001 — far beyond the two decimals displayed.

When the population standard deviation σ is known. In practice that is rare outside textbooks, which is why the t-test is used more often in real work. Large samples make the two tests agree closely, since the t distribution approaches the normal one.

More free tools

More calculators and utilities from Sortrun — free, no sign-up.