Loona Calculators
Loona Calculators › Maths › T-Test Calculator

📏 T-Test Calculator

Run a one-sample t-test from summary statistics: sample mean, sample standard deviation, sample size, and the population mean you are testing against. Get the t statistic, degrees of freedom and one- and two-tailed p-values.

Quick answer: t = (x̄ − μ₀) ÷ (s ÷ √n), with df = n − 1. Sample mean 105, s = 15, n = 25, testing μ₀ = 100: t = 5 ÷ 3 = 1.667 on 24 df, two-tailed p ≈ 0.109 — not significant at 0.05.

How to use the T-Test Calculator

  1. Enter the sample mean and sample standard deviation.
  2. Enter the sample size and the hypothesised population mean.
  3. Read t, df and the p-values; compare with your significance level.
Example: A class averages 105 (s = 15, n = 25) against a national mean of 100. t = 1.667, p ≈ 0.109 two-tailed — the difference is compatible with chance at the 5% level, despite looking like '5 points higher'.

Frequently Asked Questions

When should I use a t-test rather than a z-test?

When the population standard deviation is unknown and estimated from the sample — almost always, in practice. With large samples the two nearly coincide; with small samples the t-test's wider tails are the honest correction.

What assumptions does it make?

Independent observations and an approximately normal population (or a large enough sample for the central limit theorem). Strong skew with tiny samples breaks it.

One-tailed or two-tailed?

Two-tailed unless the direction was fixed before data collection and the opposite direction is meaningless in context. This page reports both so the choice is transparent.

What does df = n − 1 mean?

One degree of freedom is spent estimating the mean itself, leaving n − 1 independent pieces of information about variability.

Related Calculators

%

Percentage Calculator

Maths

📊

Statistics Calculator

Maths

½

Fraction Calculator

Maths

🧮

Equation Solver

Maths

🔬

Scientific Calculator

Maths

📐

Average Calculator

Maths

🔔

Z-Score Calculator

Maths

🎲

Probability Calculator

Maths

How it works — the formula

t = (x̄ − μ₀) ÷ (s ÷ √n), df = n − 1. P-values come from the t distribution's CDF, computed via the incomplete beta function — the same values statistical software reports.

Worked example

Inputs: x̄ = 105, s = 15, n = 25, μ₀ = 100.

Steps: Standard error = 15 ÷ √25 = 3. t = (105 − 100) ÷ 3 = 1.667. df = 24. From the t distribution, two-tailed p ≈ 0.109.

Result: t = 1.667, df 24, p ≈ 0.109 — not significant at 0.05.

Embed this calculator on your website — free

Add this calculator to your own website or blog — it is completely free, needs no sign-up, and always shows the latest version. Copy the code below and paste it into your page where you want the calculator to appear. Keeping the small “Powered by Loona Automation” credit line under the embed helps keep this tool free — but you are free to style or remove it; the tool works either way.