t-test Calculator

Run a t-test online: one-sample, independent two-sample, or paired t-test. Enter your sample data or summary stats to get t-value, degrees of freedom, and p-value (one-tailed or two-tailed), plus formulas and interpretation.

Full original guide (expanded)

t-test Calculator

Choose the test type, enter sample statistics, and get t-value, degrees of freedom, and p-value (one- or two-tailed).

Used for interpretation only.

Results

t statistic

Degrees of freedom

p-value

How this t-test works

This calculator follows standard Student's t-test formulas.

1. One-sample t-test

Used to test whether a sample mean differs from a hypothesized population mean μ₀.

t = (x̄ − μ₀) / (s / √n)
df = n − 1

2. Independent two-sample t-test

Used to test whether two independent groups have different means.

Equal variances (pooled):

sₚ² = ((n₁ − 1)s₁² + (n₂ − 1)s₂²) / (n₁ + n₂ − 2)
t = (x̄₁ − x̄₂) / ( sₚ √(1/n₁ + 1/n₂) )
df = n₁ + n₂ − 2

Welch (unequal variances):

t = (x̄₁ − x̄₂) / √( s₁²/n₁ + s₂²/n₂ )
df = ( s₁²/n₁ + s₂²/n₂ )² / [ (s₁²/n₁)²/(n₁−1) + (s₂²/n₂)²/(n₂−1) ]

3. Paired t-test

Used for before/after or matched-subject designs. Let d̄ be the mean of the differences and sd their SD.

t = d̄ / (sd / √n)
df = n − 1

Interpreting the p-value

If p < α (typically α = 0.05), you reject the null hypothesis and conclude that the means differ in the direction specified.


Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\\]
','\
Formula (extracted text)
t = (x̄ − μ₀) / (s / √n) df = n − 1
Formula (extracted text)
sₚ² = ((n₁ − 1)s₁² + (n₂ − 1)s₂²) / (n₁ + n₂ − 2) t = (x̄₁ − x̄₂) / ( sₚ √(1/n₁ + 1/n₂) ) df = n₁ + n₂ − 2
Formula (extracted text)
t = (x̄₁ − x̄₂) / √( s₁²/n₁ + s₂²/n₂ ) df = ( s₁²/n₁ + s₂²/n₂ )² / [ (s₁²/n₁)²/(n₁−1) + (s₂²/n₂)²/(n₂−1) ]
Formula (extracted text)
t = d̄ / (sd / √n) df = n − 1
Variables and units
  • PMI = private mortgage insurance (monthly) (currency)
Sources (authoritative):
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verified by Ugo Candido on 2026-01-19
Profile · LinkedIn
Formulas

(Formulas preserved from original page content, if present.)

Version 0.1.0-draft
Citations

Add authoritative sources relevant to this calculator (standards bodies, manuals, official docs).

Changelog
  • 0.1.0-draft — 2026-01-19: Initial draft (review required).