Home / Statistics Guides

7 min read

T-Test vs Z-Test: Which One Should You Use?

T-test or z-test is one of the first real forks students hit in inference, and the two look almost identical on paper: both compare an estimate to a hypothesized value in standard-error units, and both produce a statistic you turn into a p-value. The difference is not in the mechanics but in one question about your situation — do you know the population standard deviation, or are you estimating it from your sample? Answer that and the choice is usually made.

This guide explains what separates the two tests, when each applies, and why the distinction exists at all. It connects to StatRise's calculators, which run both tests and show the steps, and its lessons, where the underlying distributions are explained.

The core difference in one question

Both tests answer 'how far is my estimate from the null, measured in standard errors'. The split comes from how the standard error is known. A z-test is appropriate when the population standard deviation is known, which lets you use the standard normal (z) distribution directly. A t-test is appropriate when the population standard deviation is unknown and you estimate it from the sample standard deviation, which introduces extra uncertainty and calls for the t-distribution.

In practice, the population standard deviation is almost never known — if you do not know the population mean you are testing, you rarely know its standard deviation either. That is why the t-test is the workhorse of real analysis and the z-test shows up mostly in textbook problems where the standard deviation is handed to you, or in large-sample situations.

  • Population standard deviation known → z-test (standard normal distribution).
  • Population standard deviation estimated from the sample → t-test (t-distribution).
  • In real data the standard deviation is usually unknown, so the t-test is the default.

Why the t-distribution has heavier tails

When you estimate the standard deviation from a small sample, that estimate is itself uncertain — a small sample can give a standard deviation that happens to be too low or too high. The t-distribution accounts for this added uncertainty by having heavier tails than the normal distribution, meaning it assigns more probability to extreme values. The practical effect is that t-based critical values are larger, so you need slightly stronger evidence to reach significance, which is exactly right given the extra uncertainty.

The shape of the t-distribution depends on the degrees of freedom, which for a one-sample test is the sample size minus one. With few degrees of freedom the tails are noticeably heavy; as the sample grows, the estimate of the standard deviation becomes reliable and the t-distribution converges to the normal. For large samples the two are nearly indistinguishable.

  • Estimating the standard deviation adds uncertainty, so t has heavier tails than z.
  • Heavier tails mean larger critical values — you need a bit more evidence.
  • Degrees of freedom (n − 1 for one sample) set the shape; more data means lighter tails.

When sample size lets them converge

As the sample size grows, the t-distribution approaches the normal distribution because the sample standard deviation becomes an increasingly accurate estimate of the population value. By the time you have a large sample, the t and z results are almost identical, which is why some textbooks allow a z-test for large samples even when the standard deviation is estimated.

Because they agree for large samples and the t-test is correct for small ones, a simple rule keeps you safe: when the population standard deviation is unknown, use the t-test regardless of sample size. You will never be wrong doing so, and for large samples it matches the z-test anyway. Reserve the z-test for the cases where the population standard deviation is genuinely known.

  • t converges to z as the sample grows and the standard-deviation estimate stabilizes.
  • For large samples the two tests give nearly the same answer.
  • Safe rule: unknown population standard deviation → use the t-test, any sample size.

Beyond one sample: the same logic scales

The known-versus-estimated logic extends to two-sample and paired settings. A two-sample t-test compares the means of two independent groups when their standard deviations are estimated from the data; a paired t-test compares two measurements on the same subjects by analyzing the within-pair differences. Proportions have their own parallel: a one- or two-proportion z-test is standard, because for proportions the standard error is determined by the proportion itself under the null, so a z approach fits naturally.

The through-line is that the distribution you use reflects how much you know about variability. Estimating variability from the data means the t-distribution; a variability that is pinned down by the null (as with proportions) or genuinely known means a z approach. Running both kinds in StatRise's calculators, with the steps shown, makes the pattern concrete quickly.

  • Two-sample and paired t-tests apply the same estimated-standard-deviation logic to two groups.
  • Proportion tests use a z approach because the null pins down the standard error.
  • Which distribution you use reflects how much you know about the variability.

Frequently asked questions

What is the main difference between a t-test and a z-test?

Whether the population standard deviation is known. Use a z-test when it is known (or the sample is large), which uses the standard normal distribution. Use a t-test when you estimate the standard deviation from your sample, which uses the t-distribution to account for the extra uncertainty.

Should I use a t-test or z-test if my sample is large?

If the population standard deviation is unknown, the t-test is always valid, and for large samples it gives nearly the same answer as a z-test because the t-distribution converges to the normal. The safe default is to use the t-test whenever the standard deviation is estimated from data.

Why does the t-distribution have heavier tails?

Because estimating the standard deviation from a small sample adds uncertainty. The heavier tails assign more probability to extreme values, producing larger critical values so you need slightly stronger evidence — which correctly reflects that you know less than if the standard deviation were given.

Keep going

Try it in StatRise

Turn this into practice — run the numbers in a calculator, drill questions, or read the matching lesson.

CalculatorsStatistics lessonsPractice questionsAll guides
CalculatorsLessonsPracticeGuidesPremiumRestore purchasePrivacyTerms

© 2026 StatRise. Statistics calculators, lessons, practice, and simulations — progress stays in your browser, no account required.

More study tools: CalcRef · Discretica · ScoreMint · PhysRef