DevTools Surf logoDevTools Surf
AI / Modern DevAnimation / CSSAPI / Config
Sign in
DevTools Surf logoDevTools Surf
AI / Modern DevAnimation / CSSAPI / Config
Sign in
HomeStatisticsT-Test Calculator

Example: T-Test Calculator

A worked example, rendered from real sample data. Sign in to run the tool on your own input.

Input
25.3 5.2 30
23.1 4.8 28
Output
═══ Verdict ═══
✗ Not significant: two-tailed p = 0.099423 ≥ α = 0.05
ℹ Welch's two-sample t-test, t(55.99) = 1.6754
ℹ Group 1 mean − Group 2 mean = 2.2000, 95% CI [-0.4304, 4.8304]
ℹ Effect size: Cohen's d = 0.439 (small)

═══ Groups ═══
Group 1: mean 25.3000, sd 5.2000, n 30
Group 2: mean 23.1000, sd 4.8000, n 28
Difference (Group 1 mean − Group 2 mean): 2.2000
Standard error of difference: 1.3131
Variance ratio (larger/smaller): 1.174

═══ Test ═══
Test performed: Welch's two-sample t-test
Tail: two-tailed
t statistic: 1.6754
Degrees of freedom: 55.99 (Welch-Satterthwaite, not n₁+n₂−2)
p-value: 0.099423
Two-tailed p: 0.099423
Critical t (α 0.05): ±2.0032
Decision: fail to reject H₀
H₀: μ₁ = μ₂
H₁: μ₁ ≠ μ₂

═══ Effect Size and Interval ═══
Cohen's d: 0.4390 (small)
Hedges' g (small-sample corrected): 0.4331
95% CI for the difference: -0.4304 to 4.8304
CI width: 5.2609
The interval contains 0, so no difference remains plausible.
d is the difference expressed in standard deviations, so it does not change when you collect more data.

═══ Assumption Checks ═══
F test for equal variances: F(29, 27) = 1.1736, p = 0.678604
ℹ Variances look similar; Welch is still safe and costs very little power
ℹ Summary input cannot be checked for normality or outliers — paste the raw values to get those checks
Observations must be independent within and between groups; repeated measures need the paired test.

═══ Plain English ═══
Group 1 averages 2.2000 higher than Group 2. A gap this size is within what sampling noise produces.
Practically: the true difference is plausibly anywhere from -0.
…

About T-Test Calculator

T-Test Calculator preview - Statistics tool

Calculate t-test results for comparing means. Part of the DevTools Surf developer suite. Browse more tools in the Statistics collection.

Use Cases

  • Determine whether a new drug treatment produces significantly different outcomes compared to a control group.
  • Test whether mean response times differ significantly between two versions of an algorithm.
  • Compare pre-test and post-test scores for the same students to measure learning outcomes.
  • Evaluate whether two manufacturing processes produce components with significantly different mean dimensions.

Tips

  • Use the independent-samples t-test when comparing two unrelated groups; use paired t-test when comparing the same subjects under two conditions — choosing wrong inflates or deflates the test statistic.
  • Check the assumption of equal variances before running an independent t-test: if Levene's test is significant (p < 0.05), use Welch's t-test instead.
  • Report effect size (Cohen's d) alongside the p-value — a significant t-test on a large sample can detect trivially small differences that are not practically meaningful.

Fun Facts

  • The t-test was developed by William Sealy Gosset, a statistician at Guinness Brewery in Dublin, who published it under the pseudonym 'Student' in 1908 because Guinness prohibited employees from publishing research.
  • The t-distribution approaches the normal distribution as sample size increases. At n=30, the difference between t and z critical values is less than 2% — explaining why 30 is often cited as the sample size threshold for switching to z-tests.
  • Student's t-test was considered controversial when introduced — Karl Pearson, the dominant statistician of the era, initially rejected it. It gained wide acceptance only after Ronald Fisher mathematically proved its validity in the 1920s.

FAQ

When should I use a t-test instead of ANOVA?
Use a t-test for comparing exactly two groups. Use ANOVA for three or more groups — running multiple t-tests inflates the Type I error rate. ANOVA compares all groups simultaneously while controlling the family-wise error rate.
What is a one-sample t-test?
It tests whether a sample mean is significantly different from a known or hypothesized population value. Example: testing whether the mean weight of a package sample equals the 500g stated on the label.

Related Statistics Tools

A/B Test CalculatorStatistical Significance TesterConfidence Interval CalculatorSample Size CalculatorChi-Square TesterCorrelation AnalyzerRegression AnalyzerDistribution Analyzer
New · Flagshipsimple REST client

REST Handler — Collections, env vars, history, cURL converter

Send requests, save collections (nested), swap environments, and convert between cURL / Collection JSON / REST Handler YAML.

Open

Popular tools

The most-used tools on DevToolsSurf, one click away.

Encoding & crypto

  • Base64 Encode
  • Base64 Decode
  • URL Encoder
  • URL Decoder
  • Hash Generator
  • JWT Decoder
  • JWT Encoder
  • UUID Generator
  • ULID Generator
  • Password Generator
  • Bcrypt Hash Tester

Converters

  • CSV to JSON
  • JSON to CSV
  • XML to JSON
  • JSON to XML
  • HTML → Markdown
  • HTML → React JSX
  • cURL to Code
  • Collection JSON → cURL
  • Swagger to Collection JSON
  • JSON → Go Struct
  • JSON → TypeScript Types

JSON & YAML

  • JSON Formatter
  • JSON Validator
  • JSON Viewer
  • JSON Minifier
  • JSON Diff
  • JSONPath Tester
  • YAML Formatter
  • YAML to JSON
  • JSON to YAML

Text & regex

  • Regex Tester
  • Text Diff
  • Case Converter
  • Word Counter
  • Markdown Preview
  • Slug Generator
  • Lorem Ipsum Generator
  • Markdown → PDF

CSS & color

  • CSS Beautifier
  • Minify CSS
  • Color Converter
  • Gradient Generator
  • Contrast Checker
  • Color Palette Generator
  • Flexbox Playground
  • Tailwind → CSS

Generators

  • QR Code Generator
  • Mock Data Generator
  • Favicon Generator
  • .gitignore Builder
  • README.md Generator
  • Dockerfile Generator
  • Sitemap Generator

API & networking

  • REST Handler
  • HTTP Header Analyzer
  • IP Address Lookup
  • CIDR Calculator
  • User-Agent Parser
  • HTTP Status Reference
  • OpenAPI Viewer

Date & time

  • Timestamp Converter
  • Timezone Converter
  • Cron Expression Parser
  • Duration Calculator
  • Age Calculator
  • Date Format Converter

Images

  • Image Converter
  • Image Resizer (Batch)
  • SVG Optimizer
  • Base64 ↔ Image
  • WebP ↔ AVIF Converter
  • Image Compressor

PDF tools

  • PDF Merger
  • PDF Splitter
  • PDF Compressor
  • Markdown → PDF
  • EPUB → PDF
  • MOBI / AZW → PDF
  • DOCX → PDF
  • HTML → PDF

Resources

  • Community feed
  • Themes marketplace
  • Pricing & credits
  • Privacy policy
  • Terms of service
  • Sitemap
  • robots.txt

Your account

  • Sign in
  • Dashboard
  • Run history
  • My profile
  • Settings
DevTools Surf logo
DevTools Surf919+ tools

Fast · privacy-first · client-side · © 2026

Home·Feed·ThemesPricing·Sign inPrivacy·Sitemap Feedback