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

View Sponsored Offers →

Related Tools

Z-test Calculator

Use our Z-Test Calculator to compute z statistic, p-value, standard error, and critical z for one-sample or two-sample mean tests when sigma is known.

t-statistic Calculator

Use our t-Statistic Calculator to compute the t value, degrees of freedom, and standard error for one-sample, two-sample, Welch, pooled, or paired t-tests.

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.

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.

Margin of Error Calculator

Use our Margin of Error Calculator to find margin of error for a mean or proportion from sample size, confidence level, and z value.

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.

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.

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.