AP Stats Two-Sample T-Test Calculator
Compare two independent sample means with a two-sample t-test. Enter each group's mean, standard deviation, and sample size, and this AP Stats Two-Sample T-Test Calculator gives the t-statistic and degrees of freedom used to judge whether the difference is statistically significant.
Two-Sample T-Test Calculator
Interactive visual: Live preview
Press Show live preview to redraw this chart from your calculator inputs.
What Is a Two-Sample T-Test?
A two-sample t-test compares the means of two independent groups to see whether their difference is larger than chance alone would explain. For example, it can test whether students who studied with flashcards scored differently from students who studied with notes. The test assumes the two samples are independent and each comes from a roughly normal population.
Interactive visual: See the idea
Example: group 1 mean 78, group 2 mean 72 — difference 6, t about 2.06.
How to Use This Calculator
Interactive visual: Walk through it
Step 1: Open the AP Stats Two-Sample T-Test Calculator calculator at the top and enter the values it asks for.
1. Enter group 1 and group 2 summary statistics, not raw data. 2. Press Calculate. 3. Read the difference in means, the standard error, the t-statistic, and the degrees of freedom, then compare t with a t-table or use it to find a p-value for your hypotheses.
How to Calculate a Two-Sample T-Test
Interactive visual: See it on a chart
Press Update visual to redraw this chart from your calculator inputs.
Formulas: standard error = √(s₁²/n₁ + s₂²/n₂), and t = (x̄₁ − x̄₂) / standard error. This page uses the Welch approximation for degrees of freedom, which does not assume equal population variances: df = (s₁²/n₁ + s₂²/n₂)2 / [ (s₁²/n₁)2/(n₁−1) + (s₂²/n₂)2/(n₂−1) ]. The conservative alternative, df = min(n₁−1, n₂−1), is shown for comparison.
Worked example: Group 1: mean 78, SD 10, n = 30. Group 2: mean 72, SD 12, n = 28. Standard error = √(100/30 + 144/28) ≈ 2.91, difference = 6, so t ≈ 2.06. The Welch df is about 53. Try these values in the calculator to see the same result.
Tips and Common Mistakes
Interactive visual: Mistake vs correct
Mistake: Pooling the SDs when the two samples clearly differ in spread.
Use a two-sample test only for two independent groups. For before-and-after data on the same subjects, use a paired (matched-pairs) test instead. Do not pool the standard deviations unless the problem states equal variances. Always state hypotheses about population means (μ₁, μ₂), check random sampling and approximate normality (or large samples), and interpret a small p-value as evidence against the null, not as proof that the alternative is true.
Frequently Asked Questions
Interactive visual: FAQ
Tap any question below to show or hide its answer.
When do I use a two-sample t-test instead of a one-sample t-test?
Use a one-sample test for one group against a claimed value. Use a two-sample test when you compare the means of two separate, independent groups.
What is the difference between Welch and pooled degrees of freedom?
Welch df adjusts for unequal variances and unequal sample sizes and is the default on most calculators. Pooled df assumes equal population variances and is used only when that assumption is justified.
Why does this page show a conservative df too?
Many AP textbooks use the conservative df = min(n₁−1, n₂−1) because it is easy and safe. It gives a slightly larger p-value than Welch df, so it is more cautious.
What if the two sample sizes are very different?
The test still works, but the standard error and Welch df account for the imbalance. Check that both samples are random and that outliers are not driving the result.
Does a large t always mean a significant result?
Not by itself. Significance depends on t, the degrees of freedom, and whether the test is one-sided or two-sided, because those together determine the p-value.
What is the TI-84 equivalent?
On a TI-84, use STAT, TESTS, 2-SampTTest, enter Stats (not Data), and set Pooled to No for the Welch version used here.
AP is a trademark of the College Board, which was not involved in this site.
Related Calculators and Guides
Keep exploring AP Statistics with calculators and guides related to this tool.
Related Calculators
Interactive visual: Tool path
Start with this tool, then follow the path through the related calculators.
Two-Sample T-Test Calculator → T-Test Calculator → Hypothesis Testing Calculator