# t-test calculator > How significant is the difference between the means? One-sample, Welch two-sample and paired t tests from data or summary statistics, with the t distribution drawn live. Run a one-sample, Welch two-sample or paired t test from your data or means and SDs: t, degrees of freedom, p-value and confidence interval, drawn live. - Page: https://how.box/t-test/ - Runs entirely in the browser. - License: HowToolbox's own text and data (titles, explanations, FAQs, tool descriptions and schemas, this file) are CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/); AI training and answers are welcome. Attribute "HowToolbox (how.box)" with a link to the page used. Third-party data keeps its own terms; the name and logo are not licensed. Publisher: HowToolbox, contact@how.box. Terms: https://how.box/about/terms/ ## Inputs Answer link: https://how.box/t-test/?t={t}&s={s}&a={a}&b={b}&ma={ma}&sa={sa}&na={na}&mb={mb}&sb={sb}&nb={nb}&mu={mu}&h={h}&c={c} - `t` (one, welch or paired): one, welch or paired. Example: `welch`. - `s` (data or summary): data or summary. Example: `data`. - `a` (text): Sample A, numbers separated by spaces. Example: `32 37 35`. - `b` (text): Sample B, numbers separated by spaces. Example: `36 31 30`. - `ma` (number -1e12 to 1e12): Mean of A (summary). Example: `36.09`. - `sa` (number 0 to 1e12): SD of A (summary). Example: `4.91`. - `na` (whole number 2 to 1e9): Size of A (summary). Example: `11`. - `mb` (number -1e12 to 1e12): Mean of B (summary). Example: `32.22`. - `sb` (number 0 to 1e12): SD of B (summary). Example: `2.54`. - `nb` (whole number 2 to 1e9): Size of B (summary). Example: `9`. - `mu` (number -1e12 to 1e12): Hypothesised mean or difference. Example: `0`. - `h` (two-sided, greater or less): two-sided, greater or less. Example: `two-sided`. - `c` (number 50 to 99.9): Confidence level in percent. Example: `95`. Example answer: https://how.box/t-test/?t=welch&s=data&a=32+37+35&b=36+31+30&ma=36.09&sa=4.91&na=11&mb=32.22&sb=2.54&nb=9&mu=0&h=two-sided&c=95 A complete link carries the primary answer in the page HTML; a missing or invalid value shows the default page. ## Agent tools - `t_test_calculate`: Student t tests of means. - MCP, one POST to https://how.box/mcp: `{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"t_test_calculate","arguments":{"test":"welch","source":"data","a":"32 37 35","b":"36 31 30","mean_a":36.09,"sd_a":4.91,"n_a":11,"mean_b":32.22,"sd_b":2.54,"n_b":9,"mu":0,"alternative":"two-sided","confidence":95}}}` - GET: https://how.box/mcp/run/t_test_calculate?test=welch&source=data&a=32+37+35&b=36+31+30&mean_a=36.09&sd_a=4.91&n_a=11&mean_b=32.22&sd_b=2.54&n_b=9&mu=0&alternative=two-sided&confidence=95 ## How it works A t test asks whether a difference between means is larger than chance alone would easily produce. It divides the difference by its standard error: t = (x̄ − μ₀) ÷ (s ÷ √n) for one sample, where x̄ is the sample mean, μ₀ the mean tested against, s the standard deviation and n the size. The p-value is the chance of a t at least this far from zero if the true difference were zero; a small p (below α, often 5 %) counts as significant. Two independent samples use Welch's version, which does not assume equal variances: t = (x̄₁ − x̄₂) ÷ √(s₁²/n₁ + s₂²/n₂), with the Welch–Satterthwaite degrees of freedom. In the NIST example, assembly times of an old process (mean 36.09, SD 4.91, n = 11) against a new one (mean 32.22, SD 2.54, n = 9) give t = 2.27 with about 15.5 degrees of freedom, a two-sided p of about 0.038. A paired test works on the differences of each pair, so it removes the variation between subjects. The formulas follow the NIST/SEMATECH e-Handbook of Statistical Methods. The test assumes independent observations and roughly normal data or, for larger samples (about 30 per group), roughly normal means. A significant result says the difference is unlikely to be chance, not that it is large or important; the confidence interval shows how big it plausibly is. ## FAQ **Which t test should I use?** One sample: one group against a fixed value. Two samples: two separate groups, such as a treatment and a control group. Paired: the same subjects measured twice, such as before and after, or matched pairs. **Why Welch's test and not Student's equal-variance test?** Welch's test stays correct when the two groups have different spreads and loses almost nothing when they are equal, so it is the safer default; many statistics packages now use it by default. **What does p = 0.03 mean?** If there were truly no difference, a t at least this extreme would turn up in about 3 % of samples. It is not the probability that the hypothesis is true. **When should I use a one-sided test?** Only when the direction was decided before seeing the data and a difference the other way would not matter. A one-sided p is half the two-sided p when the difference lies in the chosen direction. **How does the test relate to the confidence interval?** A two-sided test is significant at 5 % exactly when the 95 % confidence interval leaves out the hypothesised value. **Should I enter the sample or population standard deviation?** Enter the sample standard deviation, calculated with n − 1 in the variance denominator. Do not enter the standard error of the mean in the SD field. More: [HowToolbox index](https://how.box/llms.txt) · [Agent Skill](https://how.box/skill.md) · [agent terms](https://how.box/about/agents/)