T-Test Calculator
Perform hypothesis testing with our free T-Test Calculator. Supports one-sample, independent two-sample, and paired t-tests. Get the t-statistic, degrees of freedom, p-value, critical value, and a clear test decision.
What Is a T-Test?
A t-test is a statistical hypothesis test used to determine whether there is a significant difference between the means of one or two groups. The test uses the t-distribution, which is similar to the normal distribution but has heavier tails, accounting for the additional uncertainty when working with small sample sizes.
Types of T-Tests
- One-Sample T-Test: Compares the mean of a single sample to a known population mean.
- Independent Two-Sample T-Test: Compares the means of two independent groups. Supports both pooled variance (equal variances assumed) and Welch's t-test (unequal variances).
- Paired T-Test: Compares means from the same group at different times (before/after) or matched pairs.
Key Formulas
One-Sample:
t = (x̄ − μ₀) / (s / √n)
Independent (Welch's):
t = (x̄₁ − x̄₂) / √(s₁²/n₁ + s₂²/n₂)
Paired:
t = d̄ / (s_d / √n)
Where: x̄ = sample mean, μ₀ = population mean, s = standard deviation, n = sample size, d̄ = mean difference, s_d = standard deviation of differences
How to Interpret Results
- t-statistic: Measures the size of the difference relative to the variation in the data.
- Degrees of Freedom (df): Affects the shape of the t-distribution.
- p-value: Probability of observing the test statistic if the null hypothesis is true. A small p-value (typically < α) suggests rejecting the null hypothesis.
- Critical Value: The threshold beyond which the test statistic leads to rejection of the null hypothesis.
- Cohen's d: A measure of effect size — the magnitude of the difference, independent of sample size.
Why Use This T-Test Calculator?
- Three Test Types: One-sample, independent, and paired t-tests all in one tool.
- Welch's t-test Support: Handles unequal variances automatically.
- Visual Distribution: See the t-distribution with the test statistic and critical region highlighted.
- Step-by-Step: Shows the calculation process for transparency.
- Effect Size: Reports Cohen's d for meaningful interpretation.
- Free & Private: No registration, no data storage.
❓ T-Test Calculator FAQ
What is a t-test?
A t-test is a statistical test used to determine whether there is a significant difference between the means of one or two groups. It's commonly used in hypothesis testing.
When should I use a one-sample t-test?
Use a one-sample t-test when you want to compare the mean of a single sample to a known population mean. For example, testing whether a class's average test score differs from the national average.
When should I use an independent t-test?
Use an independent t-test when you want to compare the means of two separate, independent groups. For example, comparing test scores between two different teaching methods.
When should I use a paired t-test?
Use a paired t-test when you have paired or matched observations, such as before/after measurements on the same subjects, or when comparing two related groups.
What is Welch's t-test?
Welch's t-test is a version of the independent t-test that does not assume equal variances between the two groups. It's generally more robust and is recommended when sample sizes or variances differ.
What is the p-value?
The p-value is the probability of observing a test statistic as extreme as the one calculated, assuming the null hypothesis is true. A p-value less than the significance level (α) suggests rejecting the null hypothesis.
What is Cohen's d?
Cohen's d is a measure of effect size that indicates the magnitude of the difference between means. Values of 0.2, 0.5, and 0.8 are generally considered small, medium, and large effects, respectively.
What is the difference between one-tailed and two-tailed tests?
A one-tailed test checks for a difference in a specific direction (e.g., mean A is greater than mean B). A two-tailed test checks for any difference (greater or less). The two-tailed test is more conservative.
Is this calculator free?
Yes, this calculator is completely free to use. No registration or personal data storage is required. All calculations are performed in your browser.