T-Test Calculator
Perform a one-sample t-test to determine if a sample mean differs significantly from a known value.
One-sample t-test: tests whether the sample mean differs significantly from a known/hypothesized value μ₀.
What Is the T-Test Calculator?
The T-Test Calculator performs one-sample, independent two-sample, and paired t-tests to determine whether means are significantly different. Enter your sample data or summary statistics (mean, standard deviation, sample size) to get the t-statistic, degrees of freedom, p-value, and test conclusion.
Formula
How to Use
Choose the test type: one-sample (comparing a sample mean to a known value), two-sample independent (comparing means of two independent groups), or paired (comparing before-and-after measurements). Enter means, standard deviations, and sample sizes. Set significance level α (default 0.05).
Example Calculation
Two-sample test: Group A (n=25, x̄=78, s=10), Group B (n=25, x̄=72, s=12). SE = √(100/25+144/25) = √9.76 = 3.124. t = (78−72)/3.124 = 1.921. df≈46. p ≈ 0.061 > 0.05 → fail to reject H₀ at α=0.05.
Understanding T-Test
The t-test is one of the most widely used inferential statistical tests. Developed by William Gosset (writing under the pseudonym 'Student') in 1908, it tests whether the difference between observed and expected means is statistically significant or likely due to sampling variability.
The t-distribution has heavier tails than the normal distribution, accounting for the additional uncertainty when using sample standard deviation instead of the known population standard deviation. As sample size increases, the t-distribution approaches the normal distribution — for n > 30, the difference is negligible.
T-tests are used in medicine (comparing treatment and control groups), psychology (testing experimental vs control conditions), manufacturing quality control, A/B testing in technology, and virtually every field that uses experimental data. Understanding t-tests — their assumptions, interpretation, and limitations — is essential for critical evaluation of research literature.
Frequently Asked Questions
What is the null hypothesis in a t-test?
The null hypothesis (H₀) states there is no difference between means (μ₁ = μ₂ for two-sample, or μ = μ₀ for one-sample). A significant t-test (p < α) provides evidence to reject H₀.
What is a p-value?
The p-value is the probability of observing a test statistic as extreme as the one computed, assuming H₀ is true. A small p-value (< 0.05 typically) suggests the observed difference is unlikely due to chance.
When should I use a paired t-test?
Use a paired t-test when the same subjects are measured twice (before/after), or when measurements are matched in pairs (e.g., left vs right eye, two conditions in the same person). Pairing removes between-subject variability.
What are the assumptions of a t-test?
1) Data is approximately normally distributed (or n is large enough by CLT). 2) For two-sample tests: groups are independent. 3) Random sampling. The t-test is robust to mild violations of normality.
Is this calculator free?
Yes, completely free with no account required.
Related Tools
Z-Score Calculator
Calculate the z-score and find probabilities from the standard normal distributi…
Standard Deviation Calculator
Calculate standard deviation, variance, and other statistics for a dataset.…
Effect Size Calculator
Calculate Cohen's d, Hedge's g, and r effect size for statistical significance t…