{
  "id": "t-score",
  "version": "6bf39e31d35e",
  "status": "published",
  "name": "T Score Calculator",
  "question": "What is my t score?",
  "summary": "Computes the t score t = (x̄ − μ₀) ÷ (s ÷ √n) from a list of numbers or from the mean, standard deviation and sample size, or takes a t score you have, and gives its p-values and critical value.",
  "category": "statistics",
  "subcategory": "tests",
  "url": "https://www.acalculator.org/statistics/t-score-calculator",
  "markdown": "https://www.acalculator.org/statistics/t-score-calculator.md",
  "kind": "function",
  "method": "t = (x̄ − μ₀) ÷ (s ÷ √n), df = n − 1; p-values from Student’s t distribution with df degrees of freedom.",
  "assumptions": [
    "The observations are independent and roughly normal, or the sample is large.",
    "s is the sample standard deviation, dividing by n − 1.",
    "The critical value is two-tailed: P(T > t) = α ÷ 2."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "mode": {
        "title": "I have",
        "description": "Your raw numbers, the summary statistics (mean, standard deviation, size), or a t score already.",
        "type": "string",
        "enum": [
          "data",
          "summary",
          "t"
        ]
      },
      "data": {
        "title": "Your numbers",
        "description": "The sample: at least 2 numbers, separated by commas, spaces or new lines.",
        "type": "array",
        "items": {
          "type": "number"
        }
      },
      "mean": {
        "title": "Sample mean (x̄)",
        "description": "The mean of the sample.",
        "type": "number",
        "minimum": -1000000000000,
        "maximum": 1000000000000
      },
      "sd": {
        "title": "Sample standard deviation (s)",
        "description": "The sample standard deviation, divided by n − 1.",
        "type": "number",
        "minimum": 1e-12,
        "maximum": 1000000000000
      },
      "n": {
        "title": "Sample size (n)",
        "description": "How many observations are in the sample, at least 2.",
        "type": "integer",
        "minimum": 2,
        "maximum": 1000000000
      },
      "mu": {
        "title": "Hypothesized mean (μ₀)",
        "description": "The population mean you compare with, under the null hypothesis.",
        "type": "number",
        "minimum": -1000000000000,
        "maximum": 1000000000000
      },
      "t": {
        "title": "t score",
        "description": "The t score (t statistic) you already have.",
        "type": "number",
        "minimum": -1000000,
        "maximum": 1000000
      },
      "df": {
        "title": "Degrees of freedom",
        "description": "The degrees of freedom of the t score; n − 1 for one sample. Fractions are allowed (Welch).",
        "type": "number",
        "minimum": 0.1,
        "maximum": 1000000000
      },
      "alpha": {
        "title": "Significance level (α)",
        "description": "The two-tailed significance level for the critical value, for example 0.05.",
        "type": "number",
        "minimum": 0.000001,
        "maximum": 0.5
      }
    }
  },
  "outputs": {
    "t": {
      "label": "t score",
      "description": "The t statistic: (x̄ − μ₀) ÷ (s ÷ √n).",
      "format": "number"
    },
    "df": {
      "label": "Degrees of freedom",
      "description": "n − 1, or the value you typed.",
      "format": "number"
    },
    "pTwo": {
      "label": "p-value, two-tailed",
      "description": "The chance of a t at least this far from 0 in either direction: 2 × P(T > |t|).",
      "format": "number"
    },
    "pRight": {
      "label": "p-value, right-tailed",
      "description": "The chance of a t at least this large: P(T ≥ t).",
      "format": "number"
    },
    "pLeft": {
      "label": "p-value, left-tailed",
      "description": "The chance of a t at most this small: P(T ≤ t).",
      "format": "number"
    },
    "critical": {
      "label": "Critical value (two-tailed)",
      "description": "The t with P(T > t) = α ÷ 2; reject the null hypothesis at α when |t| is at least this.",
      "format": "number"
    },
    "decision": {
      "label": "Decision at α (two-tailed)",
      "description": "Whether the two-tailed p-value is at most α.",
      "format": "text"
    },
    "mean": {
      "label": "Sample mean",
      "description": "The mean of your numbers.",
      "format": "number"
    },
    "sd": {
      "label": "Sample standard deviation",
      "description": "The standard deviation of your numbers, dividing by n − 1.",
      "format": "number"
    },
    "se": {
      "label": "Standard error (s ÷ √n)",
      "description": "The standard deviation divided by the square root of the sample size.",
      "format": "number"
    },
    "count": {
      "label": "Sample size",
      "description": "How many numbers are in the sample.",
      "format": "integer"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "mode": "data",
      "data": "5.1, 4.9, 5.6, 5.8, 6.0, 5.4, 5.3, 5.7",
      "mean": 105,
      "sd": 12,
      "n": 25,
      "mu": 5,
      "t": 2,
      "df": 10,
      "alpha": 0.05
    },
    "outputs": {
      "t": 3.6373570751503896,
      "df": 7,
      "pTwo": 0.008316210450525751,
      "pRight": 0.004158105225262876,
      "pLeft": 0.9958418947747372,
      "critical": 2.3646242515927858,
      "decision": "Significant: reject the null hypothesis at α = 0.05",
      "mean": 5.475,
      "sd": 0.36936238496708274,
      "se": 0.13058932356273015,
      "count": 8
    },
    "text": "Your t score is 3.63736 with 7 degrees of freedom; the two-tailed p-value is 0.00831621."
  },
  "examples": [
    {
      "given": {
        "mode": "data",
        "data": [
          5.1,
          4.9,
          5.6,
          5.8,
          6,
          5.4,
          5.3,
          5.7
        ],
        "mu": 5,
        "alpha": 0.05
      },
      "expect": {
        "mean": 5.475,
        "sd": 0.36936238496708274,
        "t": 3.6373570751503896,
        "df": 7,
        "pTwo": 0.008316210450525758,
        "pRight": 0.004158105225262879,
        "critical": 2.3646242515927867
      },
      "source": "hand calculation in content.mdx: x̄ = 43.8 ÷ 8 = 5.475, s² = 0.955 ÷ 7; NIST/SEMATECH e-Handbook of Statistical Methods, §7.2.2 Are the data consistent with the assumed process mean?: t = (Ȳ − μ₀) ÷ (s ÷ √N), N − 1 degrees of freedom (https://www.itl.nist.gov/div898/handbook/prc/section2/prc22.htm, retrieved 2026-10-02)",
      "tolerance": 1e-8
    },
    {
      "given": {
        "mode": "summary",
        "mean": 105,
        "sd": 12,
        "n": 25,
        "mu": 100,
        "alpha": 0.05
      },
      "expect": {
        "t": 2.0833333333333335,
        "df": 24,
        "se": 2.4,
        "pTwo": 0.04804409325603095,
        "critical": 2.063898561628025,
        "decision": "Significant: reject the null hypothesis at α = 0.05"
      },
      "source": "hand calculation in content.mdx: t = (105 − 100) ÷ (12 ÷ 5) = 2.0833; NIST/SEMATECH e-Handbook of Statistical Methods, §7.2.2 Are the data consistent with the assumed process mean?: t = (Ȳ − μ₀) ÷ (s ÷ √N), N − 1 degrees of freedom (https://www.itl.nist.gov/div898/handbook/prc/section2/prc22.htm, retrieved 2026-10-02)",
      "tolerance": 1e-8
    },
    {
      "given": {
        "mode": "t",
        "t": 2,
        "df": 10,
        "alpha": 0.05
      },
      "expect": {
        "pTwo": 0.07338803477074045,
        "pRight": 0.036694017385370224,
        "pLeft": 0.9633059826146297
      },
      "source": "Student’s t distribution with 10 degrees of freedom, P(T > 2) = 0.0367; NIST/SEMATECH e-Handbook of Statistical Methods, §7.2.2 Are the data consistent with the assumed process mean?: t = (Ȳ − μ₀) ÷ (s ÷ √N), N − 1 degrees of freedom (https://www.itl.nist.gov/div898/handbook/prc/section2/prc22.htm, retrieved 2026-10-02)",
      "tolerance": 1e-8
    }
  ],
  "sources": [
    "NIST/SEMATECH e-Handbook of Statistical Methods, §7.2.2 Are the data consistent with the assumed process mean? (t = (Ȳ − μ₀) ÷ (s ÷ √N), N − 1 degrees of freedom; reject when |t| ≥ t(1 − α/2, N − 1)), retrieved 2026-10-02. https://www.itl.nist.gov/div898/handbook/prc/section2/prc22.htm",
    "NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.5.2 Confidence Limits for the Mean (Ȳ ± t(1 − α/2, N − 1) × s ÷ √N), retrieved 2026-10-02. https://www.itl.nist.gov/div898/handbook/eda/section3/eda352.htm"
  ],
  "related": [
    "t-test",
    "p-value",
    "critical-value",
    "z-score"
  ],
  "changelog": []
}
