# Two Sample t Test Calculator

Run an independent two-sample t test with pooled variance from raw data or summary statistics

> Canonical page: https://elysiatools.com/en/tools/two-sample-t-test-calculator

- **Category:** Math & Numbers

- **Keywords:** two sample t test, independent samples, pooled variance, t statistic, p value, calculator

## Overview

The Two Sample t Test Calculator allows you to compare the means of two independent groups to determine if there is a statistically significant difference between them. You can input raw comma-separated data or provide summary statistics (mean, standard deviation, and sample size) to instantly calculate the t-statistic, degrees of freedom, and p-value using a pooled variance approach.

## Inputs

- **Group 1 Values** (textarea): Enter group 1 values
- **Group 2 Values** (textarea): Enter group 2 values
- **Group 1 Mean (Optional)** (number)
- **Group 2 Mean (Optional)** (number)
- **Group 1 Standard Deviation (Optional)** (number)
- **Group 2 Standard Deviation (Optional)** (number)
- **Group 1 Size (Optional)** (number)
- **Group 2 Size (Optional)** (number)
- **Hypothesized Difference** (number)
- **Alternative Hypothesis** (select)
- **Alpha** (number)
- **Decimal Places** (number)

## When to use

- When comparing the average scores or metrics of two distinct, independent groups.
- When you have either raw dataset values or pre-calculated summary statistics for both samples.
- When assuming equal variances (pooled variance) between the two independent populations.

## How it works

- Enter raw data values for Group 1 and Group 2, or input their respective summary statistics (mean, standard deviation, and size).
- Set the hypothesized difference (usually 0) and choose the alternative hypothesis (two-sided, greater than, or less than).
- Define your significance level (alpha) and preferred decimal precision.
- The calculator computes the pooled variance, t-statistic, degrees of freedom, and p-value, indicating whether to reject the null hypothesis.

## Use cases

- A/B testing website conversion rates or user engagement metrics between two different landing pages.
- Comparing the effectiveness of two different medical treatments or educational interventions on independent patient or student groups.
- Analyzing manufacturing quality by comparing the average dimensions or weights of parts from two different production lines.

## Frequently asked questions

### Can I use summary statistics instead of raw data?

Yes, you can leave the raw data fields empty and input the mean, standard deviation, and sample size for both groups.

### What does pooled variance mean?

Pooled variance assumes that both independent groups have the same population variance, combining their sample variances to estimate it.

### What alternative hypotheses are supported?

You can test for a two-sided difference, or one-sided differences (greater than or less than).

### What is the alpha value?

Alpha is the significance level (commonly 0.05) used to determine if the p-value is small enough to reject the null hypothesis.

### What outputs does the calculator provide?

It returns the calculated t-statistic, p-value, degrees of freedom, and a boolean indicating whether the null hypothesis is rejected.

## Related tools

- [Effect Size Calculator](https://elysiatools.com/en/tools/effect-size-calculator): Calculate Cohen d, Hedges g, Cohen h for proportions, or correlation r effect sizes from summary statistics
- [Margin of Error Calculator](https://elysiatools.com/en/tools/margin-of-error-calculator): Calculate the margin of error for a mean or proportion from sample size, confidence level, and variability
- [One Sample t Test Calculator](https://elysiatools.com/en/tools/one-sample-t-test-calculator): Run a one-sample t test from raw data or summary statistics, including p-value and confidence interval
- [Paired t Test Calculator](https://elysiatools.com/en/tools/paired-t-test-calculator): Run paired-sample t tests from before and after values or precomputed paired differences
- [Standard Error Calculator](https://elysiatools.com/en/tools/standard-error-calculator): Calculate the standard error of the mean from raw sample values or summary statistics
- [T-Test Calculator](https://elysiatools.com/en/tools/t-test-calculator): Run one-sample or two-sample t-tests from raw data and inspect t statistics, degrees of freedom, and p-values
- [Weighted Average Calculator](https://elysiatools.com/en/tools/weighted-average-calculator): Calculate a weighted average from paired values and weights, with contribution and normalized weight details
- [Welch t Test Calculator](https://elysiatools.com/en/tools/welch-t-test-calculator): Run Welch two-sample t tests for independent groups with unequal variances from raw data or summary statistics

## Samples

- [Web Image Processing Python Samples](https://elysiatools.com/en/samples/web-image-processing-python): Web Python image processing examples using PIL/Pillow including reading, saving, resizing, and format conversion
- [Android Image Processing Java Samples](https://elysiatools.com/en/samples/android-image-processing-java): Android Java image processing examples including reading/saving images, scaling, and format conversion
- [Android Image Processing Kotlin Samples](https://elysiatools.com/en/samples/android-image-processing-kotlin): Android Kotlin image processing examples including reading/saving images, scaling, and format conversion
- [Web Image Processing Rust Samples](https://elysiatools.com/en/samples/web-image-processing-rust): Web Rust image processing examples including image read/save, scaling, and format conversion

## Related content

- [A/B Experiment Design, Sample Size, and Statistical Power](https://elysiatools.com/en/hubs/ab-testing-experiment-design-and-statistical-power): Plan an A/B experiment, size its evidence, select the right test, and review effect size and uncertainty before treating a result as actionable.
