Calculator Suite

T-Test Calculator

Statistical Hypothesis Testing

Perform one-sample, two-sample, and paired t-tests with comprehensive statistical analysis

Analysis Settings
Test Type Selection
Choose the appropriate t-test for your research question

One-Sample T-Test

Selected

Compare sample mean to a known value

Examples:

  • Testing if average height differs from 170cm
  • Checking if test scores differ from 75%

Two-Sample T-Test

Compare means of two independent groups

Examples:

  • Comparing test scores between two classes
  • Testing difference in sales between regions

Paired T-Test

Compare before/after or matched pairs

Examples:

  • Before/after training scores
  • Comparing performance of same subjects under different conditions
Test Configuration
Set up your statistical test parameters

The population mean you want to test against

Enter numeric values separated by commas, spaces, or line breaks

Educational Resources

T-Test Formulas
Mathematical formulas for different t-test types

One-Sample T-Test

t=xˉμ0s/nt = \frac{\bar{x} - \mu_0}{s / \sqrt{n}}

xˉ\bar{x} = Sample mean

μ0\mu_0 = Hypothesized mean

ss = Sample standard deviation

nn = Sample size

Two-Sample T-Test

t=x1ˉx2ˉsp1n1+1n2t = \frac{\bar{x_1} - \bar{x_2}}{s_p \sqrt{\frac{1}{n_1} + \frac{1}{n_2}}}

sp=(n11)s12+(n21)s22n1+n22s_p = \sqrt{\frac{(n_1-1)s_1^2 + (n_2-1)s_2^2}{n_1+n_2-2}}

Pooled standard deviation

Paired T-Test

t=dˉsd/nt = \frac{\bar{d}}{s_d / \sqrt{n}}

dˉ\bar{d} = Mean of differences

sds_d = Standard deviation of differences

TL;DR — T-Test Explained

A t-test compares means to determine if differences are statistically significant. Choose one-sample (compare to known value), two-sample (compare two groups), or paired (before/after same subjects). If p-value < 0.05, the difference is significant.

How to Use This Calculator: Step-by-Step
1

Select Test Type

One-sample, two-sample (independent), or paired t-test based on your data.

2

Enter Your Data

Input sample values separated by commas. For two-sample, enter both groups.

3

Configure Test

Set confidence level (95% typical) and hypothesis direction (two-tailed recommended).

4

Interpret Results

Check p-value, t-statistic, confidence interval, and Cohen's d effect size.

📊 Example: Drug Trial Two-Sample T-Test

Control group (n=20): Mean = 4.2 | Treatment group (n=20): Mean = 5.8

t-statistic

2.84

p-value

0.007

Cohen's d

0.90 (large)

Result

Significant

Interpretation: Treatment group shows significantly higher scores (p = 0.007 < 0.05) with a large effect size.

⚠️ Assumptions & Limitations

Key Assumptions:

  • • Continuous data (interval/ratio scale)
  • • Independent observations
  • • Approximately normal distribution (or n > 30)
  • • Equal variances for two-sample (or use Welch's)

When to Use Alternatives:

  • • Non-normal data: Mann-Whitney U test
  • • >2 groups: ANOVA instead
  • • Known population σ: Z-test
  • • Very small n: Consider bootstrapping
Frequently Asked Questions

What's the difference between a t-test and z-test?

Use a t-test when the population standard deviation is unknown (most real-world cases). Use a z-test when population σ is known and n > 30.

What does the p-value actually mean?

The p-value is the probability of observing results as extreme as yours if the null hypothesis were true. It is NOT the probability that the null hypothesis is true.

How many samples do I need?

A minimum of 15-30 observations per group is recommended. Larger samples provide more statistical power to detect real differences.

Should I use one-tailed or two-tailed?

Use two-tailed unless you have a specific directional hypothesis stated before data collection. Two-tailed is more conservative.

What is Cohen's d and why does it matter?

Cohen's d measures effect size: Small ≈ 0.2, Medium ≈ 0.5, Large ≈ 0.8. A significant p-value with tiny effect size may not be practically important.

📺 Video Tutorials