{"id":65519,"date":"2026-09-29T14:37:00","date_gmt":"2026-09-29T11:37:00","guid":{"rendered":"https:\/\/wpcalc.com\/en\/?p=65519"},"modified":"2026-10-13T12:14:43","modified_gmt":"2026-10-13T09:14:43","slug":"t-test-calculator","status":"publish","type":"post","link":"https:\/\/wpcalc.com\/en\/statistics\/t-test-calculator\/","title":{"rendered":"T-Test Calculator"},"content":{"rendered":"<section class=\"not-prose calculator-box\" aria-labelledby=\"calculator-title\"><div class=\"flex items-baseline sm:items-center justify-between gap-2 sm:gap-3\"><div class=\"flex flex-col sm:flex-row sm:items-center gap-2\"><span class=\"icon icon-calculator text-primary-700! text-base! dark:text-primary-300!\" aria-hidden=\"true\"><\/span><h2 id=\"calculator-title\" class=\"text-lg font-display font-bold\">Run a T-Test<\/h2><\/div><div class=\"calcdash-favorite group\">\n  <button type=\"button\" class=\"favorite\" id=\"favorite\" data-favorite-id=\"65519\" data-favorite-title=\"T-Test\" data-favorite-url=\"https:\/\/wpcalc.com\/en\/statistics\/t-test-calculator\/\" data-favorite-excerpt=\"Compute a one-sample or two-sample t-test from raw data or summary statistics. Enter your values, choose the alternative hypothesis and significance level, and get the t-statistic, degrees of freedom, p-value and conclusion.\" aria-label=\"Add to Favorites\" data-favorite-icon=\"icon icon-wpcalc-bell-curve\">\n    <span class=\"icon icon-shape-star-empty\" aria-hidden=\"true\"><\/span>\n  <\/button>\n  <div class=\"calcdash-favorite__tip\" aria-hidden=\"true\">\n   <span class=\"favorite-tooltip\" id=\"favorite-tooltip\"><\/span>\n  <\/div>\n  <span class=\"sr-only\" role=\"status\" id=\"favorite-status\"><\/span>\n<\/div><\/div><form action=\"https:\/\/wpcalc.com\/en\/statistics\/t-test-calculator\/\" method=\"POST\" class=\"calculator\" id=\"calculator-65519\" data-post=\"65519\"><fieldset class=\"fieldset-input is-1\"><legend class=\"sr-only\">Input Fields<\/legend><div class=\"is-single field\" id=\"input-1\"><span class=\"font-semibold\">Test settings<\/span><\/div><div class=\"field\" id=\"input-2\"><label for=\"field-2\">Test type<\/label><div class=\"grid grid-cols-1\"><select id=\"field-2\" name=\"test_type\"><option value=\"one\" selected>One-sample t-test<\/option><option value=\"two\">Two-sample t-test (independent)<\/option><\/select><svg class=\"pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4\" viewBox=\"0 0 16 16\" fill=\"currentColor\" aria-hidden=\"true\" data-slot=\"icon\">\n              <path fill-rule=\"evenodd\" d=\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\" clip-rule=\"evenodd\" \/>\n            <\/svg><\/div><\/div><div class=\"field\" id=\"input-3\"><label for=\"field-3\">Alternative hypothesis (H\u2081)<\/label><div class=\"grid grid-cols-1\"><select id=\"field-3\" name=\"alternative_hypothesis_h\"><option value=\"two\" selected>Two-tailed (\u2260)<\/option><option value=\"greater\">Right-tailed (&gt;)<\/option><option value=\"less\">Left-tailed (&lt;)<\/option><\/select><svg class=\"pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4\" viewBox=\"0 0 16 16\" fill=\"currentColor\" aria-hidden=\"true\" data-slot=\"icon\">\n              <path fill-rule=\"evenodd\" d=\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\" clip-rule=\"evenodd\" \/>\n            <\/svg><\/div><\/div><div class=\"field\" id=\"input-4\"><label for=\"field-4\">Significance level (\u03b1)<\/label><div class=\"grid grid-cols-1\"><select id=\"field-4\" name=\"significance_level_\"><option value=\"0.05\" selected>0.05<\/option><option value=\"0.01\">0.01<\/option><option value=\"0.1\">0.10<\/option><\/select><svg class=\"pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4\" viewBox=\"0 0 16 16\" fill=\"currentColor\" aria-hidden=\"true\" data-slot=\"icon\">\n              <path fill-rule=\"evenodd\" d=\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\" clip-rule=\"evenodd\" \/>\n            <\/svg><\/div><\/div><div class=\"is-single field\" id=\"input-5\"><span class=\"font-semibold\">Data<\/span><\/div><div class=\"field\" id=\"input-6\"><label for=\"field-6\">Input mode<\/label><div class=\"grid grid-cols-1\"><select id=\"field-6\" name=\"input_mode\"><option value=\"data\" selected>Raw data<\/option><option value=\"summary\">Summary statistics<\/option><\/select><svg class=\"pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4\" viewBox=\"0 0 16 16\" fill=\"currentColor\" aria-hidden=\"true\" data-slot=\"icon\">\n              <path fill-rule=\"evenodd\" d=\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\" clip-rule=\"evenodd\" \/>\n            <\/svg><\/div><\/div><div class=\"field\" id=\"input-7\" hidden><label for=\"field-7\">Hypothesized mean (\u03bc\u2080)<\/label><input type=\"number\" name=\"hypothesized_mean_\" id=\"field-7\" aria-describedby=\"calc-info-7\" step=\"any\" value=\"100\"\/><small id=\"calc-info-7\">The population mean claimed by H\u2080 (one-sample test only).<\/small><\/div><div class=\"field\" id=\"input-8\" hidden><label for=\"field-8\">Variance assumption<\/label><div class=\"grid grid-cols-1\"><select id=\"field-8\" name=\"variance_assumption\"><option value=\"welch\" selected>Welch (unequal variances)<\/option><option value=\"pooled\">Pooled (equal variances)<\/option><\/select><svg class=\"pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4\" viewBox=\"0 0 16 16\" fill=\"currentColor\" aria-hidden=\"true\" data-slot=\"icon\">\n              <path fill-rule=\"evenodd\" d=\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\" clip-rule=\"evenodd\" \/>\n            <\/svg><\/div><\/div><div class=\"field\" id=\"input-9\"><label for=\"field-9\">Sample data<\/label><textarea id=\"field-9\" name=\"sample_data\">99.2; 98.7; 100.3; 101.1; 99.5; 98.9; 100.8; 99.6; 100.2; 97.9<\/textarea><\/div><div class=\"field\" id=\"input-10\" hidden><label for=\"field-10\">Sample 2 data<\/label><textarea id=\"field-10\" name=\"sample_2_data\">98.1; 99.4; 100.9; 97.8; 101.2; 99.9; 98.5; 100.6; 97.2; 99.7<\/textarea><\/div><div class=\"is-single field\" id=\"input-11\" hidden><span class=\"font-semibold\">Summary statistics<\/span><\/div><div class=\"field\" id=\"input-12\" hidden><label for=\"field-12\">Sample mean (x\u0304)<\/label><input type=\"number\" name=\"sample_mean_x\" id=\"field-12\" step=\"any\" value=\"99.62\"\/><\/div><div class=\"field\" id=\"input-13\" hidden><label for=\"field-13\">Sample SD (s)<\/label><input type=\"text\" name=\"sample_sd_s\" id=\"field-13\" aria-describedby=\"calc-info-13\" data-number inputmode=\"decimal\" autocomplete=\"off\" spellcheck=\"false\" min=\"0\" value=\"0.99\"\/><small id=\"calc-info-13\">Sample standard deviation (n \u2212 1 in the denominator).<\/small><\/div><div class=\"field\" id=\"input-14\" hidden><label for=\"field-14\">Sample size (n)<\/label><input type=\"text\" name=\"sample_size_n\" id=\"field-14\" data-number inputmode=\"decimal\" autocomplete=\"off\" spellcheck=\"false\" min=\"2\" value=\"10\"\/><\/div><div class=\"field\" id=\"input-15\" hidden><label for=\"field-15\">Sample 2 mean (x\u0304\u2082)<\/label><input type=\"number\" name=\"sample_2_mean_x\" id=\"field-15\" step=\"any\" value=\"99.23\"\/><\/div><div class=\"field\" id=\"input-16\" hidden><label for=\"field-16\">Sample 2 SD (s\u2082)<\/label><input type=\"text\" name=\"sample_2_sd_s\" id=\"field-16\" data-number inputmode=\"decimal\" autocomplete=\"off\" spellcheck=\"false\" min=\"0\" value=\"1.32\"\/><\/div><div class=\"field\" id=\"input-17\" hidden><label for=\"field-17\">Sample 2 size (n\u2082)<\/label><input type=\"text\" name=\"sample_2_size_n\" id=\"field-17\" data-number inputmode=\"decimal\" autocomplete=\"off\" spellcheck=\"false\" min=\"2\" value=\"10\"\/><\/div><\/fieldset><div class=\"buttons\"><button type=\"submit\" data-text=\"Re-Calculate\" id=\"calculate-button\" data-post=\"65519\">Calculate<\/button><button type=\"reset\">Reset<\/button><\/div><div class=\"field is-checkbox hidden!\" id=\"field-auto-calc\"><input type=\"checkbox\" id=\"auto-calc\"><label for=\"auto-calc\">Calculate automatically<\/label><small>If enabled, the result will update automatically when you change any value.<\/small><\/div><div class=\"fieldset-result is-hidden\" aria-labelledby=\"result-title\" aria-live=\"polite\" role=\"region\"> <h3 class=\"result-title bg-gradient-to-r from-primary-50 to-gray-50 dark:from-primary-900 dark:to-gray-800\" id=\"result-title\"><span class=\"icon icon-s-pulse\" aria-hidden=\"true\"><\/span> Test results<\/h3><div class=\"result-box\"><div class=\"field-result\" id=\"output-1\"><span class=\"field-title\"><span>t-statistic<\/span><span class=\"result-term\">t<\/span><\/span><span class=\"field-value\" id=\"result-1\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result\" id=\"output-2\"><span class=\"field-title\"><span>Degrees of freedom<\/span><span class=\"result-term\">df<\/span><\/span><span class=\"field-value\" id=\"result-2\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result\" id=\"output-3\"><span class=\"field-title\"><span>p-value<\/span><\/span><span class=\"field-value\" id=\"result-3\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result is-column\" id=\"output-4\"><span class=\"field-title\"><span>Conclusion<\/span><\/span><span class=\"field-value\" id=\"result-4\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><\/div><div class=\"result-actions\"><button type=\"button\" class=\"copy-link\"><svg viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M12.232 4.232a2.5 2.5 0 0 1 3.536 3.536l-1.225 1.224a.75.75 0 0 0 1.061 1.06l1.224-1.224a4 4 0 0 0-5.656-5.656l-3 3a4 4 0 0 0 .225 5.865.75.75 0 0 0 .977-1.138 2.5 2.5 0 0 1-.142-3.667l3-3Z\"\/><path d=\"M11.603 7.963a.75.75 0 0 0-.977 1.138 2.5 2.5 0 0 1 .142 3.667l-3 3a2.5 2.5 0 0 1-3.536-3.536l1.225-1.224a.75.75 0 0 0-1.061-1.06l-1.224 1.224a4 4 0 1 0 5.656 5.656l3-3a4 4 0 0 0-.225-5.865Z\"\/><\/svg><span class=\"copy-link__text\">Copy link to this calculation<\/span><\/button><span class=\"sr-only\" role=\"status\" id=\"copy-link-status\"><\/span><\/div><\/div><a href=\"#respond\" class=\"hidden transition-opacity duration-300 opacity-0 w-50 text-sm justify-center items-center gap-2 px-4 py-2 rounded bg-gray-200 text-gray-700 hover:bg-gray-300\" id=\"leave-comment\"><span class=\"icon icon-comments\" aria-hidden=\"true\"><\/span>Leave a Comment<\/a><\/form><\/section><section id=\"calc-reactions\" class=\"not-prose hidden my-12 bg-gradient-to-r from-primary-50 to-gray-50 border border-indigo-100 rounded-xl px-6 py-4 shadow-sm\" data-post=\"65519\" aria-live=\"polite\" aria-labelledby=\"calc-reactions-title\"><p id=\"calc-reactions-title\" class=\"text-sm text-gray-500 text-center mb-2\">How did this result make you feel?<\/p><div role=\"group\" aria-labelledby=\"calc-reactions-title\" class=\"grid grid-cols-3 sm:flex sm:flex-row sm:justify-around gap-4 sm:items-center sm:flex-wrap\"><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"like\"><span class=\"reaction-count\" data-reaction-count=\"like\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude00 <\/span><span class=\"reaction-description font-medium\">Like <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"helpful\"><span class=\"reaction-count\" data-reaction-count=\"helpful\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\udca1 <\/span><span class=\"reaction-description font-medium\">Helpful <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"confused\"><span class=\"reaction-count\" data-reaction-count=\"confused\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude15 <\/span><span class=\"reaction-description font-medium\">Confused <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"disappointed\"><span class=\"reaction-count\" data-reaction-count=\"disappointed\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude1e <\/span><span class=\"reaction-description font-medium\">Disappointed <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"inaccurate\"><span class=\"reaction-count\" data-reaction-count=\"inaccurate\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\u274c <\/span><span class=\"reaction-description font-medium\">Inaccurate <\/span><\/button><\/div><div id=\"reaction-message\" class=\"hidden mt-8 rounded-md border border-primary-100 bg-white\/50 backdrop-blur-sm px-4 py-2 text-sm text-center shadow-sm\"><\/div><\/section><div class=\"calcdash-ad not-prose calcdash-ad--calc_result calcdash-ad--in-article\"><ins class=\"adsbygoogle\" style=\"display:block\" data-ad-client=\"ca-pub-1721569815777345\" data-ad-slot=\"6317458308\" data-ad-layout=\"in-article\" data-ad-format=\"fluid\"><\/ins><script>(adsbygoogle = window.adsbygoogle || []).push({});<\/script><\/div>\n<style id=\"wpcoderpro-inline-1\">.formula-box {\r\n\tborder-bottom: none !important;\r\n}<\/style><section class=\"formula-box\" aria-labelledby=\"formula-title\">\r\n\t<div id=\"formula-title\" class=\"not-prose font-display mb-4\"><span class=\"icon icon-formula\" aria-hidden=\"true\"><\/span><h2>T-Test Formula<\/h2><\/div>\r\n\t<figure class=\"not-prose formula\">\r\n\t\t<figcaption class=\"formula-title\">Formula<\/figcaption>\r\n\t\t<div class=\"text-base text-gray-800\" id=\"formula\">\n\\[\n\\begin{aligned}\n\\text{One-sample:} &\\quad t = \\frac{\\bar{x} - \\mu_0}{s\/\\sqrt{n}}, \\quad df = n - 1 \\\\[8pt]\n\\text{Two-sample (Welch):} &\\quad t = \\frac{\\bar{x}_1 - \\bar{x}_2}{\\sqrt{\\dfrac{s_1^2}{n_1} + \\dfrac{s_2^2}{n_2}}}, \\quad df = \\frac{\\left(\\dfrac{s_1^2}{n_1} + \\dfrac{s_2^2}{n_2}\\right)^2}{\\dfrac{s_1^4}{n_1^2(n_1 - 1)} + \\dfrac{s_2^4}{n_2^2(n_2 - 1)}}\n\\end{aligned}\n\\]\n<\/div>\r\n\t<\/figure>\r\n\t<\/p>\n<p><strong>Where:<\/strong><\/p>\n<ul>\n<li>\\(\\bar{x}\\) \u2014 sample mean<\/li>\n<li>\\(\\mu_0\\) \u2014 hypothesized population mean under H<sub>0<\/sub><\/li>\n<li>\\(s\\) \u2014 sample standard deviation (with \\(n - 1\\) in the denominator)<\/li>\n<li>\\(n\\) \u2014 sample size<\/li>\n<li>\\(\\bar{x}_1, \\bar{x}_2\\), \\(s_1, s_2\\), \\(n_1, n_2\\) \u2014 means, SDs and sizes of the two independent samples<\/li>\n<\/ul>\n<p>The t-statistic measures how many standard errors the sample mean lies from the value hypothesized under H<sub>0<\/sub>. It is compared against the Student t distribution with \\(df\\) degrees of freedom to obtain the p-value: the probability of observing a result at least this extreme if H<sub>0<\/sub> were true. For a two-tailed test, \\(p = 2\\,P(T_{df} \\ge |t|)\\); one-tailed tests use a single tail. If the pooled variance option is selected for two samples, the standard error uses the pooled variance \\(s_p^2\\) and \\(df = n_1 + n_2 - 2\\).<\/p>\n<p>\r\n<\/section>\n<style id=\"wpcoderpro-inline-459\">.calculation-box {\r\n\tborder-bottom: none !important;\r\n}<\/style><section id=\"calculation\" class=\"calculation-box\" aria-labelledby=\"calculation-title\">\r\n\t<div id=\"calculation-title\" class=\"not-prose font-display\"><span class=\"icon icon-unordered-list\" aria-hidden=\"true\"><\/span><h2>T-Test \u2013 Calculation Example<\/h2><\/div>\r\n\r\n<p>{shortcode_start}<\/p>\n<p><strong>Example:<\/strong> a machine is supposed to fill bottles to 100 ml. Ten fill volumes are measured: 99.2, 98.7, 100.3, 101.1, 99.5, 98.9, 100.8, 99.6, 100.2, 97.9. Is the mean fill different from 100 ml at \\(\\alpha = 0.05\\)? (These are the calculator's default values.)<\/p>\n<p>\\[ n = 10, \\quad \\bar{x} = \\frac{996.2}{10} = 99.62, \\quad s = \\sqrt{\\frac{\\sum (x_i - \\bar{x})^2}{n - 1}} \\approx 0.994 \\]<\/p>\n<p>\\[ t = \\frac{99.62 - 100}{0.994\/\\sqrt{10}} = \\frac{-0.38}{0.314} \\approx -1.209, \\quad df = 10 - 1 = 9 \\]<\/p>\n<p>\\[ p = 2\\,P(T_9 \\ge |-1.209|) \\approx 0.258 \\]<\/p>\n<p><strong>Result:<\/strong> \\(t \\approx -1.209\\), \\(df = 9\\), \\(p \\approx 0.258\\). Since \\(p &gt; 0.05\\), we fail to reject H<sub>0<\/sub>: there is no statistically significant evidence that the mean fill differs from 100 ml.<\/p>\n<p>{\/shortcode_start}<\/p>\n\r\n<\/section>\n<h2>How to Use the T-Test Calculator<\/h2>\n<ol>\n<li>Under <strong>Test settings<\/strong>, choose the <strong>Test type<\/strong>: one-sample (compare a sample mean with a hypothesized value) or two-sample (compare two independent sample means).<\/li>\n<li>Select the <strong>Alternative hypothesis (H<sub>1<\/sub>)<\/strong> \u2014 two-tailed (\\(\\neq\\)), right-tailed (\\(&gt;\\)) or left-tailed (\\(&lt;\\)) \u2014 and the <strong>Significance level (\\(\\alpha\\))<\/strong>: 0.05, 0.01 or 0.10.<\/li>\n<li>For a one-sample test, enter the <strong>Hypothesized mean (\\(\\mu_0\\))<\/strong>.<\/li>\n<li>For a two-sample test, choose the <strong>Variance assumption<\/strong>: Welch (unequal variances, the safer default) or pooled (equal variances).<\/li>\n<li>Set the <strong>Input mode<\/strong>. With <em>Raw data<\/em>, paste your values into <strong>Sample data<\/strong> (and <strong>Sample 2 data<\/strong> for a two-sample test), separated by spaces, semicolons or new lines. With <em>Summary statistics<\/em>, enter the mean, standard deviation and sample size for each sample.<\/li>\n<li>Read the <strong>t-statistic<\/strong>, <strong>degrees of freedom<\/strong>, <strong>p-value<\/strong> and the <strong>Conclusion<\/strong> stating whether H<sub>0<\/sub> is rejected at your chosen \\(\\alpha\\).<\/li>\n<\/ol>\n<h2>What Is a T-Test and How to Interpret the Result<\/h2>\n<p>A t-test is a statistical hypothesis test that compares a mean (or the difference between two means) to a claimed value when the population standard deviation is unknown and must be estimated from the sample. This is the typical situation with small datasets in science, quality control, medicine and A\/B testing. The resulting t-statistic expresses the observed difference in units of standard error; values far from zero suggest the data contradict the null hypothesis.<\/p>\n<p>The <strong>p-value<\/strong> answers the question: if the null hypothesis were true, how likely is a result at least as extreme as the one observed? A small p-value means the data would be surprising under H<sub>0<\/sub>, providing evidence against it. By convention, the result is called <em>statistically significant<\/em> when \\(p \\le \\alpha\\) (usually 0.05), and H<sub>0<\/sub> is rejected. A large p-value does not prove H<sub>0<\/sub> true \u2014 it only means there is not enough evidence against it.<\/p>\n<p>Choose the tail direction based on your research question. A <strong>two-tailed<\/strong> test checks for any difference (\\(\\mu \\ne \\mu_0\\)). A <strong>right-tailed<\/strong> test asks whether the mean is greater than the hypothesized value; a <strong>left-tailed<\/strong> test asks whether it is smaller. One-tailed tests are more powerful in their chosen direction but must be justified before looking at the data \u2014 switching tails afterward inflates the false-positive rate.<\/p>\n<p>For two independent samples, the calculator offers Welch's test by default. It does not assume equal variances and uses the Welch\u2013Satterthwaite approximation for the degrees of freedom, which is more reliable when the two samples have different spreads or sizes. The pooled version is appropriate only when the populations are believed to have equal variances.<\/p>\n<h2>Assumptions, Limitations and Practical Tips<\/h2>\n<ul>\n<li><strong>Normality:<\/strong> the t-test assumes the underlying population (or the residuals) is roughly normally distributed. With small samples, check a histogram or normality plot; with large samples (roughly \\(n \\ge 30\\)), the central limit theorem makes the test robust to moderate non-normality. Heavily skewed data with outliers calls for a non-parametric alternative.<\/li>\n<li><strong>Independence:<\/strong> observations must be independent of each other. Paired or repeated-measures data (before\/after on the same subjects) should not be analyzed with a two-sample test \u2014 use the differences in a one-sample test on the paired differences instead.<\/li>\n<li><strong>Sample size:<\/strong> at least 2 values per sample are required, and values must not all be identical (SD = 0). Small samples give wide uncertainty, so a non-significant result may simply reflect low power \u2014 see the <a href=\"https:\/\/wpcalc.com\/en\/statistics\/sample-size-calculator\/\">Sample Size Calculator<\/a> when planning a study.<\/li>\n<li><strong>Significance vs. importance:<\/strong> a tiny p-value only says the difference is unlikely to be zero, not that it is large or practically meaningful. Always report the effect size, and complement the test with a <a href=\"https:\/\/wpcalc.com\/en\/statistics\/confidence-interval-calculator\/\">Confidence Interval Calculator<\/a> to see the plausible range of the mean difference.<\/li>\n<li><strong>Raw data vs. summary statistics:<\/strong> raw data lets the calculator compute the mean and SD for you (with an \\(n-1\\) denominator); summary mode is handy when reading published results. To check individual values, the <a href=\"https:\/\/wpcalc.com\/en\/statistics\/standard-deviation-calculator\/\">Standard Deviation Calculator<\/a> and the <a href=\"https:\/\/wpcalc.com\/en\/statistics\/z-score-calculator\/\">Z-Score Calculator<\/a> (for known \\(\\sigma\\) or large samples) are useful companions.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Compute a one-sample or two-sample t-test from raw data or summary statistics. Enter your values, choose the alternative hypothesis and significance level, and get the t-statistic, degrees of freedom, p-value and conclusion.<\/p>\n","protected":false},"author":3168,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[74],"tags":[79],"class_list":["post-65519","post","type-post","status-publish","format-standard","hentry","category-statistics","tag-hypothesis-testing"],"acf":[],"_links":{"self":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/65519","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/users\/3168"}],"replies":[{"embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/comments?post=65519"}],"version-history":[{"count":5,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/65519\/revisions"}],"predecessor-version":[{"id":67110,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/65519\/revisions\/67110"}],"wp:attachment":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/media?parent=65519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/categories?post=65519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/tags?post=65519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}