Tip: Use a negative t value for effects in the opposite direction. This calculator uses the Student's t distribution.
What this p value calculator does
This calculator converts a t statistic and degrees of freedom into a p value. It is useful for t tests, regression coefficients, and any analysis where your test statistic follows a t distribution.
If you already have the t value from software output (like R, Python, SPSS, Stata, Excel, or a hand calculation), you can get the corresponding p value instantly without looking up a printed t table.
Inputs you need
1) t statistic
The t statistic is your standardized effect. Bigger absolute values usually indicate stronger evidence against the null hypothesis.
2) Degrees of freedom (df)
Degrees of freedom determine the shape of the t distribution. Smaller df means heavier tails; larger df looks more like the normal distribution.
3) Tail direction
- Two-tailed: checks for effects in either direction.
- Right-tailed: checks if the true effect is greater than the null value.
- Left-tailed: checks if the true effect is less than the null value.
How the p value is computed from t
The core quantity is the cumulative distribution function (CDF) of the t distribution with your df. Once we have CDF = P(T ≤ t), we compute:
- Right-tailed: p = 1 − CDF
- Left-tailed: p = CDF
- Two-tailed: p = 2 × min(CDF, 1 − CDF)
Behind the scenes, the CDF is evaluated using a numerically stable incomplete beta function approach, which is standard in scientific computing.
Quick interpretation guide
- If p is small (often below 0.05), your data are less consistent with the null hypothesis.
- If p is large, your data do not provide strong evidence against the null hypothesis.
- A p value is not the probability that the null hypothesis is true.
- A p value does not measure effect size or practical importance.
Worked examples
Example A: Two-tailed test
Suppose t = 2.31 and df = 24. Using a two-tailed test, the p value is around 0.03. At α = 0.05, this would typically be considered statistically significant.
Example B: One-tailed test
Suppose t = 1.75 and df = 18. If your hypothesis was directional in advance (right-tailed), p will be smaller than the two-tailed version. Always choose tail direction before looking at data.
Common mistakes to avoid
- Using a one-tailed test after seeing which direction gives significance.
- Using the wrong degrees of freedom from your model output.
- Reporting only p values without confidence intervals or effect sizes.
- Interpreting non-significant results as proof of no effect.
FAQ
Is this calculator for z tests?
No. This page is specifically for t statistics. For z statistics, use a normal distribution calculator.
Can I enter negative t values?
Yes. Negative values are valid and important for left/right-tailed interpretations.
What if df is very large?
With large df, the t distribution closely matches the normal distribution, but this calculator still handles it directly as t.
Bottom line
A p value calculator from t is a fast way to move from test statistic to inference. Enter your t, df, and tail type, then combine the p value with effect size, confidence intervals, and domain knowledge for the strongest conclusion.