What this calculator does
The t-statistic measures how many standard errors a sample mean sits from a reference value. A sample of 25 with a mean of 52 and standard deviation of 8, tested against 50, gives t = 1.250 on 24 degrees of freedom.
It is the workhorse of mean comparison precisely because it does not require the population standard deviation. Using the sample estimate instead adds uncertainty, and the t-distribution accounts for that with heavier tails than the normal. The penalty is severe for small samples and negligible above about 30 observations.
The formula
The one-sample statistic is the difference between the sample mean and the reference, divided by the standard error s/√n, with n−1 degrees of freedom. The two-sample version uses the pooled standard deviation and gives n₁+n₂−2 degrees of freedom. The statistic alone is not a conclusion: it must be compared with a critical value or converted to a p-value.
| Term | Meaning |
|---|---|
| t-statistic | The difference expressed in standard errors. |
| Degrees of freedom | n−1 for one sample, n₁+n₂−2 for two pooled samples. |
| Standard error | s/√n, using the sample standard deviation. |
| Critical value | The threshold from a t-table for your degrees of freedom and significance level. |
The inputs explained
| Field | What to enter |
|---|---|
| Test type | One sample tests against a fixed reference; two samples compare two groups. |
| Sample 1 mean | Sample 1 mean. |
| Sample 1 standard deviation | Sample 1 standard deviation. |
| Sample 1 size | Sample 1 size. |
| Reference mean (μ), one-sample only | Reference mean, used in one-sample mode only. |
| Sample 2 mean, two-sample only | Sample 2 mean, two-sample mode only. |
| Sample 2 standard deviation, two-sample only | Sample 2 standard deviation, two-sample mode only. |
| Sample 2 size, two-sample only | Sample 2 size, two-sample mode only. |
When to use it
Testing against a target
Whether a measured average differs from a specification, a historical figure or a claim.
Comparing two groups
The standard comparison of treatment against control when the outcome is a continuous measure.
Reading a published result
Papers report t and degrees of freedom, and reconstructing them checks the arithmetic.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
What does each sample mean give?
A range of sample means against the same reference.
| Sample mean | t-statistic | Degrees of freedom | Standard error |
|---|---|---|---|
| 50 | 0 | 24 | 1.600 |
| 52 | 1.250 | 24 | 1.600 |
| 54 | 2.500 | 24 | 1.600 |
| 56 | 3.750 | 24 | 1.600 |
Questions
When do I use t instead of z?
Whenever the population standard deviation is unknown and estimated from the sample, which is almost always. The z-test requires a genuinely known sigma. For samples above about 30 the two give nearly identical answers, but t remains the correct choice.
What is a large t-statistic?
It depends on the degrees of freedom. At df = 24 the two-tailed 5% threshold is about 2.064; at df = 5 it is 2.571; at df = 1000 it is 1.962. There is no universal cutoff, which is why the critical value must be looked up rather than assumed.
Should I use the pooled or Welch version?
Welch unless you have good reason to believe the variances are equal. It costs almost nothing in power when they are equal and protects you when they are not. Many statisticians now recommend Welch as the default for two-sample comparisons.
Does a large t mean a large effect?
No. The t-statistic grows with sample size for a fixed difference, so a large t can reflect a large sample rather than a meaningful effect. Report an effect size such as Cohen d alongside it to describe the magnitude.
For the effect size, see the Cohen’s d calculator. For the threshold to compare against, see the critical value calculator.