Updated on April 23rd, 2026

t Test Calculator

Created By Jehan Wadia

Step 1: Choose Data Entry Format
Enter Raw Data Manually
Interactive grid for up to 50 rows per group.
Paste Raw Data
Paste from Excel/Sheets, up to 2000 rows. Tab or newline separated.
Summary: Mean, SD, N
Enter mean, standard deviation, and sample size for each group.
Summary: Mean, SEM, N
Enter mean, standard error of the mean, and sample size for each group.
Step 2: Configure Test Parameters
Independent Samples t-test (Pooled Variance)
Compares means of two independent groups. Assumes equal variances.
Welch's t-test (Unequal Variance)
Compares means of two independent groups. Does not assume equal variances.
Paired t-test
For matched/dependent samples. Requires raw data.
One-Sample t-test
Compares a single sample mean against a hypothesized population mean.

H₀:μ₁ = μ₂
H₁:μ₁ ≠ μ₂
Step 3: Enter Data
#Value
#Value
Step 4: Results
Test Summary
Test TypeIndependent t-test
TailTwo-tailed
Significance Level (α)0.05
Primary Results
t-statistic3.0893
Degrees of Freedom (df)58
p-value0.00308
DecisionReject H₀
Effect Size
Cohen's d0.7985
InterpretationMedium
Confidence Interval
Mean Difference3.2000
95% CI[1.1278, 5.2722]
Descriptive Statistics
Group N Mean SD SEM
Group 13025.30004.20000.7668
Group 23022.10003.80000.6938
Step-by-Step Calculation
t-Distribution Visualization

Introduction

A t test is a statistical method used to compare the means of two groups and determine if they are truly different from each other. It helps you answer a simple question: "Is the difference I see between these two groups real, or could it just be due to chance?" For example, you might use a t test to check if students who studied with flashcards scored higher on a test than students who did not. This t Test Calculator makes it easy to plug in your data and quickly get your t statistic, degrees of freedom, and p-value — the key numbers you need to draw a conclusion. Whether you are working on a school project, a science experiment, or analyzing survey results, this tool saves you time and reduces the chance of making errors in your calculations.

How to Use Our t Test Calculator

Enter your sample data below to calculate the t statistic, degrees of freedom, and p-value. This tells you whether the difference between groups or from a known value is statistically significant.

Test Type: Pick the kind of t test you need. Choose a one-sample t test to compare a sample mean to a known value. Choose a two-sample t test to compare the means of two groups. Choose a paired t test when your data points are matched or come from the same subjects.

Significance Level (α): Enter the significance level for your test. This is the cutoff you use to decide if your result is significant. A common choice is 0.05, which means a 5% chance of a false positive.

Tail Type: Select whether you want a one-tailed or two-tailed test. Use a two-tailed test when you want to detect a difference in either direction. Use a one-tailed test when you only care about a difference in one specific direction.

Sample Data or Summary Statistics: Enter your raw data values or provide summary statistics such as the sample mean, sample standard deviation, and sample size. If you are running a two-sample or paired test, you will need to enter data for both groups.

Hypothesized Mean (One-Sample Test): If you are running a one-sample t test, enter the population mean you want to compare your sample against. This is the value you think the true mean might equal.

What Is a t Test?

A t test is a statistical method used to determine whether there is a meaningful difference between the means (averages) of one or two groups. It helps you answer a simple question: "Is this difference real, or could it have happened by chance?" Scientists, students, and researchers use t tests every day to make decisions based on data.

Types of t Tests

There are several types of t tests, and each one fits a different situation:

  • Independent samples t test (pooled variance): Compares the means of two separate, unrelated groups. For example, you might compare test scores between two different classrooms. This version assumes both groups have roughly equal variability (spread) in their data.
  • Welch's t test (unequal variance): Also compares two independent groups, but it does not assume the groups have equal variability. This makes it a safer choice when you're unsure whether the spreads are similar.
  • Paired t test: Used when the two sets of measurements come from the same subjects. For example, measuring a patient's blood pressure before and after taking a medication. It works by looking at the difference within each pair.
  • One-sample t test: Compares the mean of a single group to a specific known or hypothesized value. For instance, you could test whether the average height of students in your school differs from the national average.

Key Concepts Behind the t Test

Every t test involves a few core ideas:

  • Null hypothesis (H₀): This is the starting assumption that there is no real difference. For example, "the two group means are equal."
  • Alternative hypothesis (H₁): This is what you're trying to find evidence for — that a real difference does exist.
  • t-statistic: A number calculated from your data that measures how far apart the group means are relative to the variability in the data. A larger absolute t value means a bigger difference relative to the noise.
  • Degrees of freedom (df): A value based on your sample sizes that shapes the t distribution used to judge your result.
  • p-value: The probability of seeing a result as extreme as yours if the null hypothesis were true. A small p-value (typically below 0.05) suggests the difference is statistically significant. You can also explore this concept further with our p Value Calculator.
  • Significance level (α): The threshold you set before testing. Common values are 0.01, 0.05, and 0.10. If the p-value falls below α, you reject the null hypothesis.

One-Tailed vs. Two-Tailed Tests

A two-tailed test checks whether the means are simply different in either direction. A one-tailed test checks for a difference in only one specific direction — either greater than or less than. Use a one-tailed test only when you have a clear reason to expect the difference to go one way before you look at the data.

Effect Size: Cohen's d

Statistical significance alone doesn't tell you how big a difference is. That's where Cohen's d comes in. It measures the size of the difference in standard deviation units. General guidelines are: below 0.2 is negligible, 0.2 to 0.5 is small, 0.5 to 0.8 is medium, and above 0.8 is large. A result can be statistically significant but have a tiny effect size, which is important to keep in mind.

Confidence Intervals

Along with the p-value, a confidence interval gives you a range of plausible values for the true difference between means. For example, a 95% confidence interval means that if you repeated the study many times, about 95% of those intervals would contain the true difference. If the interval does not include zero, it lines up with a significant result at the 0.05 level. To explore this concept in more depth, try our Confidence Interval Calculator.

When to Use a t Test

The t test works best when your data is roughly normally distributed (bell-shaped) and measured on a continuous scale, such as weight, temperature, or test scores. For small samples, the normality assumption matters more. For larger samples (generally 30 or more per group), the t test is robust even when data is somewhat skewed, thanks to the central limit theorem. Before running a t test, it's helpful to understand your data's central tendency and spread using tools like our Mean Median Mode Calculator and Standard Deviation Calculator. If you need to determine how many observations you need for reliable results, our Sample Size Calculator can help. For categorical data rather than continuous means, a Chi Square Calculator may be more appropriate. You can also convert raw scores into standardized values with our Z Score Calculator, or explore probability distributions with the Normal Distribution Calculator to better understand the assumptions underlying the t test. If your analysis involves examining relationships between variables rather than comparing means, consider using a Correlation Coefficient Calculator or Linear Regression Calculator. And whenever you're reporting results, keep an eye on percent error to communicate the precision of your measurements clearly.


Frequently Asked Questions

What is the difference between a t test and a z test?

A t test is used when your sample size is small or when you do not know the population standard deviation. A z test is used when your sample size is large (usually over 30) and you already know the population standard deviation. In most real-world cases, you will not know the population standard deviation, so the t test is the more common choice.

How do I know which t test type to pick?

Ask yourself these questions:

  • Are you comparing one group to a known value? Use a one-sample t test.
  • Are you comparing two separate groups of different people? Use an independent samples t test or Welch's t test.
  • Are you comparing measurements from the same people taken at two different times? Use a paired t test.

When should I use Welch's t test instead of the independent samples t test?

Use Welch's t test when the two groups may have different amounts of spread (different standard deviations) or different sample sizes. It does not assume equal variances, so it is the safer choice when you are not sure if the groups have similar variability. Many statisticians recommend using Welch's t test by default.

Why can't I run a paired t test with summary statistics?

A paired t test needs the individual differences between each matched pair of data points. When you only have summary statistics like the mean, standard deviation, and sample size, there is no way to calculate those pair-by-pair differences. You must enter the raw data for each pair so the calculator can subtract one from the other.

What does the p-value actually tell me?

The p-value tells you the chance of seeing a result as extreme as yours if there really were no difference (if the null hypothesis were true). A small p-value (like 0.03) means it is unlikely the result happened by random chance alone. If the p-value is less than your significance level (α), you reject the null hypothesis and conclude the difference is statistically significant.

What does it mean to reject or fail to reject the null hypothesis?

If you reject the null hypothesis, it means your data provides enough evidence that a real difference exists. If you fail to reject the null hypothesis, it means your data does not provide strong enough evidence to say a difference exists. Failing to reject does not prove the groups are the same — it just means you cannot be sure they are different.

What is the degrees of freedom and why does it matter?

Degrees of freedom (df) is a number based on your sample sizes. It shapes the t distribution curve that is used to calculate the p-value. Smaller degrees of freedom means a wider, flatter curve, which makes it harder to reach significance. As your sample size grows, the degrees of freedom increase and the t distribution looks more like a normal bell curve.

How many data points do I need to run a t test?

Each group needs at least 2 data points for the math to work. However, very small samples give less reliable results. In general, having at least 10 to 30 values per group gives you better statistical power and more trustworthy conclusions.

Can I paste data from Excel or Google Sheets?

Yes. Choose the "Paste Raw Data" format in Step 1. Then copy your column of numbers from Excel or Google Sheets and paste it into the text box. The calculator accepts values separated by new lines, tabs, or commas. You can paste up to 2,000 values per group.

What is the difference between standard deviation (SD) and standard error (SEM)?

Standard deviation (SD) measures how spread out individual data points are from the mean. Standard error of the mean (SEM) measures how much the sample mean is expected to vary from study to study. SEM is always smaller than SD because it equals SD divided by the square root of the sample size. This calculator lets you enter either one when using summary statistics.

What does the confidence interval for the mean difference tell me?

The confidence interval gives a range where the true difference between the means likely falls. For example, a 95% confidence interval of [1.13, 5.27] means you can be 95% confident the true difference is somewhere between 1.13 and 5.27. If zero is not inside the interval, the result is statistically significant at that confidence level.

How do I interpret Cohen's d values?

Cohen's d tells you how big the difference is in practical terms:

  • Below 0.2 — Negligible effect
  • 0.2 to 0.5 — Small effect
  • 0.5 to 0.8 — Medium effect
  • Above 0.8 — Large effect

A statistically significant result can still have a small effect size, meaning the real-world impact may be minor.

What does the t-distribution chart on the results page show?

The chart shows the t-distribution curve for your degrees of freedom. The red vertical line marks where your calculated t-statistic falls on the curve. If your t-statistic is far out in the tails of the curve, the p-value will be small, meaning your result is more likely to be statistically significant.

Should I use a one-tailed or two-tailed test?

Use a two-tailed test if you want to detect a difference in either direction (higher or lower). Use a one-tailed test only when you have a specific reason, decided before looking at your data, to test in one direction. For example, use a right-tailed test if you only care whether a new drug increases scores, not decreases them. When in doubt, the two-tailed test is the safer and more common choice.

What if my data is not normally distributed?

The t test assumes your data is roughly normally distributed (bell-shaped). For small samples, this matters a lot. For larger samples (about 30 or more per group), the t test still works well even with somewhat skewed data because of the central limit theorem. If your data is heavily skewed and your sample is small, consider a non-parametric test like the Mann-Whitney U test instead.

Can I compare more than two groups with this calculator?

No. A t test only compares one or two groups at a time. If you need to compare three or more groups, you should use an ANOVA (analysis of variance) test instead. Running multiple t tests on many groups increases the chance of getting a false positive result.


Related Calculators

Percent Error Calculator

Visit Percent Error Calculator

Percent Change Calculator

Visit Percent Change Calculator

Percentage Calculator

Visit Percentage Calculator

IQR Calculator

Visit IQR Calculator

Z Score Calculator

Visit Z Score Calculator

Standard Deviation Calculator

Visit Standard Deviation Calculator

Mean Median Mode Calculator

Visit Mean Median Mode Calculator

Correlation Coefficient Calculator

Visit Correlation Coefficient Calculator

p Value Calculator

Visit p Value Calculator

Chi Square Calculator

Visit Chi Square Calculator

Confidence Interval Calculator

Visit Confidence Interval Calculator

Sample Size Calculator

Visit Sample Size Calculator

Normal Distribution Calculator

Visit Normal Distribution Calculator

Range Calculator

Visit Range Calculator

Linear Regression Calculator

Visit Linear Regression Calculator

ANOVA Calculator

Visit ANOVA Calculator

Effect Size Calculator

Visit Effect Size Calculator

EV Calculator

Visit EV Calculator