HomeCalculatorsStatisticsT-Test Calculator

T-Test Calculator

Statistics

Run a two-sample t-test in seconds. Enter each group's mean, standard deviation, and sample size to get the t-statistic, degrees of freedom, and a significance verdict.

82
8
30
77
9
30

T-Statistic

2.274
Degrees of Freedom
57.21
Critical T-Value
1.96
Mean Difference
5

This calculator computes your T-Statistic, Degrees of Freedom, Critical T-Value, Mean Difference from the values you enter.

Inputs
Group 1 — MeanGroup 1 — Std DeviationGroup 1 — Sample SizeGroup 2 — MeanGroup 2 — Std DeviationGroup 2 — Sample SizeSignificance Level (α)
Outputs
T-StatisticDegrees of FreedomCritical T-ValueMean Difference

What is a T-Test?

The T-Test Calculator compares the means of two independent groups and tells you whether the observed difference is statistically significant, using Welch's two-sample t-test. Enter each group's mean, standard deviation, and sample size, plus your chosen significance level (α = 0.05 or 0.01), and the calculator returns the t-statistic, degrees of freedom, critical value, and a plain-language significance verdict.

The t-test is one of the most widely used hypothesis tests in statistics, letting you answer questions like "did the new checkout design actually increase average order value?" or "is there a real difference in test scores between two teaching methods?" — while accounting for the natural variability and limited sample size that could otherwise produce a misleading difference by chance alone.

This calculator uses Welch's t-test, which does not assume equal variances between the two groups — the more robust, generally recommended approach for real-world data. For comparing conversion rates or proportions instead of means, see the A/B Test Significance Calculator.

How to use this T-Test calculator

  1. Enter Group 1's mean, standard deviation, and sample size — from your collected data or a prior report.

  2. Enter Group 2's mean, standard deviation, and sample size — the group you're comparing against.

  3. Choose your significance level — 0.05 (95% confidence) is standard for most research; 0.01 (99% confidence) for higher-stakes decisions.

  4. Read the t-statistic and critical value — compare their absolute values to see whether your result crosses the significance threshold.

  5. Check the verdict in the step-by-step breakdown — the calculator states in plain language whether to reject or fail to reject the null hypothesis of no difference.

  6. Interpret alongside practical significance — a statistically significant t-test doesn't always mean the difference is large enough to matter in practice; always consider the mean difference value alongside the p-value verdict.

Formula & Methodology

Welch's t-statistic:
t = (mean₁ − mean₂) / √(s₁²/n₁ + s₂²/n₂)

Welch–Satterthwaite degrees of freedom:
df ≈ (s₁²/n₁ + s₂²/n₂)² / [ (s₁²/n₁)²/(n₁−1) + (s₂²/n₂)²/(n₂−1) ]

Variable definitions:
- mean₁, mean₂ — sample means of each group
- s₁, s₂ — sample standard deviations of each group
- n₁, n₂ — sample sizes of each group

Worked example:

Comparing average scores between two study groups: Group 1 (mean = 82, sd = 8, n = 30) vs Group 2 (mean = 77, sd = 9, n = 30), at α = 0.05.

Step 1 — Standard error: √(8²/30 + 9²/30) = √(2.133 + 2.7) = √4.833 ≈ 2.198

Step 2 — t-statistic: (82 − 77) / 2.198 ≈ 2.275

Step 3 — Degrees of freedom (Welch–Satterthwaite): ≈ 57.6

Step 4 — Critical value at α = 0.05, df ≈ 58: ≈ 2.00

Step 5 — Verdict: |t| = 2.275 > 2.00 → statistically significant at the 5% level. Reject the null hypothesis of no difference.

Assumption: This calculator assumes both groups are independent random samples and that the sampling distribution of each group's mean is approximately normal (a safe assumption for n ≥ 30 per group, per the Central Limit Theorem). No assumption of equal variances is required, since Welch's method is used throughout.

Frequently Asked Questions

A t-test is a statistical hypothesis test used to determine whether the means of two groups are significantly different from each other, accounting for the variability and sample size of each group. Use a two-sample t-test when comparing an outcome measured in two independent groups — for example, average test scores between two teaching methods, or average conversion time between two website designs — when your sample sizes are moderate and the population standard deviation is unknown.
A one-sample t-test compares a single sample's mean against a known or hypothesized population value (e.g., 'is our factory's average output different from the industry standard of 500 units/day?'). A two-sample t-test compares the means of two independent groups against each other (e.g., 'is Group A's average different from Group B's average?'). This calculator performs a two-sample (Welch's) t-test, which you can approximate a one-sample test with by setting Group 2's mean to your reference value and using a very large Group 2 sample size.
Welch's t-test is a variation of the standard two-sample t-test that does not assume the two groups have equal variances — a more realistic and robust assumption for most real-world data. It adjusts the degrees of freedom using the Welch–Satterthwaite equation rather than simply using n₁+n₂−2. Welch's test performs at least as well as the standard (pooled-variance) t-test when variances are equal, and considerably better when they are not, which is why most statisticians now recommend it as the default choice.
The t-statistic measures how many standard errors the difference between your two group means is away from zero (no difference). A larger absolute t-statistic indicates a bigger, more reliable difference relative to the variability in your data. Whether a given t-statistic is 'significant' depends on comparing its absolute value against a critical value determined by your degrees of freedom and chosen significance level (α).
The significance level (α) is the probability threshold for incorrectly concluding there's a real difference when there isn't one (a false positive, or Type I error). α = 0.05 means you accept a 5% chance of a false positive — the conventional standard in most fields. α = 0.01 is a stricter threshold (1% false positive tolerance), used when false positives are especially costly, such as in clinical drug trials or high-stakes engineering decisions.
Degrees of freedom (df) reflect how much independent information is available to estimate variability, and directly determine the shape of the t-distribution used for your test. Welch's t-test computes df using the Welch–Satterthwaite equation, which produces a non-integer estimate (e.g., df = 54.32) because it's a weighted approximation based on each group's variance and sample size, rather than the simple integer count (n₁+n₂−2) used in the standard pooled t-test.
It means your data did not provide strong enough evidence, at your chosen significance level, to conclude the two group means are truly different — it does NOT mean you've proven they're equal. A 'fail to reject' result could occur because there truly is no difference, or because your sample size was too small to detect a real but modest difference. Consider using the [Sample Size Calculator](/sample-size-calculator/) if you suspect a low-power study is masking a real effect.
There's no single universal minimum, but t-tests become substantially more reliable with at least 30 observations per group, since the t-distribution converges toward the normal distribution as sample size grows. Smaller samples (n < 30) can still be valid if the underlying data is roughly normally distributed, but are more sensitive to outliers and departures from normality. Use the [Sample Size Calculator](/sample-size-calculator/) during study planning to determine an adequate sample size in advance.
A t-test is used when the population standard deviation is unknown and must be estimated from the sample (the typical real-world scenario), and it uses the t-distribution, which has heavier tails to account for that extra uncertainty. A z-test is used when the population standard deviation is known exactly, using the standard normal distribution. For most practical two-group comparisons with sample standard deviations, the t-test is the statistically correct choice.
A t-test and a confidence interval for the difference in means answer the same underlying question from two angles: if a confidence interval for (mean₁ − mean₂) excludes zero, the corresponding two-tailed t-test at the complementary significance level would also find a significant difference. The [Confidence Interval Calculator](/confidence-interval-calculator/) can be used to build that companion interval once you know your mean difference and standard error.
No — a t-test is designed specifically for comparing exactly two groups. To compare three or more group means simultaneously (e.g., three different marketing campaigns), you should use an ANOVA (Analysis of Variance) test instead, which controls the overall false-positive rate across multiple comparisons in a way that running many separate t-tests would not.
You need the mean, standard deviation, and sample size for each of your two groups. If you only have raw data points, first compute these summary statistics using the [Standard Deviation Calculator](/standard-deviation-calculator/), which returns the mean, sample standard deviation, and count in a single step for each group's dataset.
Also known as
t test calculatortwo sample t-test calculatorstudent's t-test calculatort statistic calculatorhypothesis test calculator