p value of t test calculator

T-Test P Value Calculator

Use this tool to calculate the p value from a t-statistic and degrees of freedom. It supports two-tailed, left-tailed, and right-tailed tests.

Enter the t-value from your t test output.
Can be non-integer for Welch's t test.

What this p value of t test calculator does

This calculator converts a t statistic into a p value using the Student's t distribution and your specified degrees of freedom. In practical terms, it tells you how surprising your observed result is under the null hypothesis.

If your p value is smaller than your chosen significance level (often 0.05), you typically reject the null hypothesis. If it is larger, you fail to reject the null.

How to use the calculator

Step-by-step

  • Enter your t statistic from software output (R, SPSS, Stata, Python, Excel, etc.).
  • Enter degrees of freedom (df).
  • Choose two-tailed, left-tailed, or right-tailed testing.
  • Set your significance threshold (α), such as 0.05.
  • Click Calculate p value.

You will get the p value plus a quick decision statement based on your chosen α.

Understanding the inputs

t statistic

The t statistic is the standardized difference between your observed effect and the null value. Larger absolute t values generally mean stronger evidence against the null hypothesis.

Degrees of freedom (df)

Degrees of freedom control the exact shape of the t distribution. Lower df means heavier tails, which usually increases p values compared with a normal approximation.

Tail type

  • Two-tailed: tests for any difference (greater or less).
  • Right-tailed: tests if the true value is greater than the null.
  • Left-tailed: tests if the true value is less than the null.

Formula behind the calculator

The calculator uses the cumulative distribution function (CDF) of the Student's t distribution:

  • Two-tailed: p = 2 × min(CDF(t), 1 − CDF(t))
  • Left-tailed: p = CDF(t)
  • Right-tailed: p = 1 − CDF(t)

Internally, the CDF is computed numerically using the regularized incomplete beta function for stable and accurate results.

Worked examples

Example 1: Two-tailed test

Suppose your output reports t = 2.10 with df = 18, and your hypothesis is two-sided. The p value will be around 0.05. That is borderline at α = 0.05.

Example 2: Right-tailed test

If t = 1.90 and df = 25 for a right-tailed hypothesis, the p value is much smaller than the two-tailed value because you are testing only one direction.

Which t test gives you a t statistic?

You can use this p value calculator after any t test that returns t and df, including:

  • One-sample t test
  • Independent two-sample t test (pooled or Welch)
  • Paired t test

Assumptions to keep in mind

  • Observations are independent (or properly paired in a paired design).
  • Data are approximately normal, especially important with small samples.
  • For pooled two-sample t tests, group variances are assumed equal.

If assumptions are violated, consider robust or nonparametric alternatives and report them clearly.

Common mistakes when interpreting p values

  • Thinking p is the probability that the null hypothesis is true.
  • Ignoring effect size and confidence intervals.
  • Choosing one-tailed tests after seeing the data.
  • Treating p = 0.049 and p = 0.051 as fundamentally different scientific outcomes.

Quick FAQ

Can I enter a negative t statistic?

Yes. Negative values are valid and expected depending on the direction of your sample difference.

Can degrees of freedom be decimal values?

Yes. Welch's t test often produces non-integer df. This calculator supports that.

Does this calculator compute t from raw data?

No. This page computes the p value from a known t statistic and df. If needed, compute t first using your preferred t test formula or software.

Final note

A p value is useful, but it should be reported with context: study design, effect size, confidence intervals, and practical significance. Use this tool as one piece of good statistical decision-making.

🔗 Related Calculators