Boneyard Tools

T-Test Calculator

Run a one sample, two sample (independent), or paired t-test. Paste raw data or type in summary statistics, pick your alternative hypothesis and significance level, and get the t statistic, degrees of freedom, an exact p-value, a confidence interval, and Cohen's d effect size.

How to run a t-test

  1. Pick the test: one sample, two sample (independent groups), or paired.
  2. Paste your numbers (commas, spaces or new lines) or switch to summary stats.
  3. Choose the alternative hypothesis and significance level, then read the t, p-value and decision.

Examples

Two sample (Welch)

Group A 5.1 4.9 5.3 5.0 4.8 vs Group B 6.2 5.9 6.4 6.1 6.0
t = -9.04, df = 8, p < 0.001, reject the null at 0.05

One sample vs a target

mean = 5, sd = 2, n = 16, hypothesised mean = 4
t = 2.00, df = 15, p = 0.064, fail to reject at 0.05

Frequently asked questions

Which t-test should I use?

Use a one sample t-test to compare one group's mean against a known or target value. Use a two sample (independent) t-test to compare the means of two separate groups, such as a treatment group and a control group. Use a paired t-test when the same subjects are measured twice, such as before and after a change, because the two measurements are linked.

What is the difference between Student's and Welch's two sample test?

Student's pooled test assumes the two groups have equal population variances and pools them into a single estimate. Welch's test does not assume equal variances and adjusts the degrees of freedom accordingly. Welch's is the safer default because it stays accurate when the variances or sample sizes differ, which is why it is selected by default here.

How is the p-value calculated?

The p-value comes directly from the Student's t distribution using the regularised incomplete beta function, so it is exact for any degrees of freedom rather than read from a coarse table. A two-sided test doubles the smaller tail; a one-sided test uses a single tail in the direction of your alternative hypothesis.

What does the p-value tell me?

The p-value is the probability of seeing a difference at least as large as yours if the null hypothesis (no real difference) were true. If the p-value is below your significance level, commonly 0.05, you reject the null hypothesis and call the result statistically significant. A large p-value means the data is consistent with no real difference.

What is Cohen's d?

Cohen's d is a standardised effect size: the difference in means divided by a standard deviation. It tells you how large the difference is in practical terms, separate from sample size. Rough benchmarks are 0.2 for a small effect, 0.5 for medium, and 0.8 for large. A tiny p-value with a tiny d means a small effect detected by a large sample.

Can I paste raw data instead of summary statistics?

Yes. Paste your numbers separated by commas, spaces, tabs or new lines and the calculator computes the mean, standard deviation and sample size for you. For one sample or two sample tests you can also switch to a summary-stats mode and type the mean, sd and n directly.

Is my data sent anywhere?

No. Everything runs entirely in your browser, so your numbers never leave your device.

Related tools