t-test Calculator

One-sample • Two-sample • Paired • p-value + CI

Settings

CI %
CI uses the same df as the selected test. Default: 95%.
μ₀
Tests whether the sample mean differs from μ₀.
Quick summary
Enter data to compute the t-test.

Data

Tip: paste from Excel/Sheets; newlines are fine.

Results

t statistic
Degrees of freedom (df)
p-value
Effect (mean diff)
CI
n (A / B)
Updating…

Action

Hard reset: cancels pending updates and clears everything on the first click.

Use this t-Test Calculator to perform one-sample, independent two-sample, Welch, pooled, or paired t-tests. It calculates the t statistic, degrees of freedom, p-value, confidence interval, and mean difference.

Calculation Method

For a one-sample t-test:

t = (x̄ − μ₀) ÷ (s ÷ √n)

For independent groups, the calculator can use Welch’s method:

t = (x̄₁ − x̄₂) ÷ √(s₁²/n₁ + s₂²/n₂)

Paired tests first calculate the difference between each matched pair and test the mean of those differences.

The p-value is obtained from the t distribution using the calculated t statistic, degrees of freedom, and selected one- or two-tailed test.

Example

Suppose a one-sample test has:

Sample mean = 12
Hypothesized mean = 10
Standard deviation = 4
Sample size = 16

t = (12 − 10) ÷ (4 ÷ √16) = 2.00

df = 15

For a two-tailed test, the p-value is approximately 0.064, so the result would not meet a 0.05 significance threshold.

Important Note

Select the test according to the study design. Independent groups and paired observations require different calculations. Statistical significance also does not automatically mean that an effect is practically important.

Strong outliers, non-independent observations, inappropriate pairing, or unsuitable distributional assumptions can make a t-test misleading.

Sources

More of our calculators...

Mean Median Mode Calculator

Use our Mean Median Mode Calculator to find the average, median, and mode from any data set. Supports raw numbers, value:count input, and sorted preview.

Standard Deviation Calculator

Use our Standard Deviation Calculator to find sample or population standard deviation from a data set. Get variance, mean, range, and sorted values fast.

Confidence Interval Calculator

Use our Confidence Interval Calculator to find confidence intervals for a mean or proportion with standard error, critical value, margin of error, and lower and upper bounds.

Sample Size Calculator

Use our Sample Size Calculator to estimate sample size for a mean or proportion from confidence level, margin of error, and optional finite population correction.

Chi-Square Calculator

Use our Chi-Square Calculator to run goodness-of-fit and independence tests, or find right-tail p-values and critical χ² values from df and alpha.

Percentile Calculator

Use our Percentile Calculator to find percentile values from a data set with nearest rank or linear interpolation. Supports raw numbers and value:count input.

Power Analysis Calculator

Use our Power Analysis Calculator to estimate sample size per group, statistical power, and minimum detectable effect for a two-sample mean test with alpha and standard deviation.

Z-score Calculator

Use our Z-Score Calculator to standardize a value or sample mean, convert percentile to z, convert z to percentile, and view left-tail and right-tail probabilities.

IQ PERCENTILE CALCULATOR

Use our IQ Percentile Calculator to convert an IQ score into percentile rank, percent above, and percent below using SD 15 or SD 16 normal-distribution scales.