How to use this calculator
Choose the distribution of your test statistic — Student’s t for t-tests (one-sample, paired or two-sample) or the standard normal for z-tests and large-sample tests of proportions — and the direction of the alternative hypothesis. Enter the statistic (and, for t, the degrees of freedom) and the p-value appears, with a note saying whether it is below 0.05.
To find a critical value instead, clear the statistic and enter the significance level as the p-value: with two tails, p = 0.05 and 10 df give t = 2.228. You can also clear the degrees of freedom to see how many would be needed for a given t to reach a given p.
The formula
- t / z
- test statistic (t or z)
- df
- degrees of freedom
- p
- p-value
Worked example
A one-sample t-test on 16 measurements gives t = 2.131 with 15 degrees of freedom. What is the two-tailed p-value?
- Two-tailed: p = 2 × P(T₁₅ > |2.131|).
- Using the t distribution with 15 df, P(T > 2.131) = 0.025.
- p = 2 × 0.025 = 0.050.
The result sits exactly at the conventional 5% threshold — 2.131 is the tabulated critical value of t for 15 df.
Critical values of t (two-tailed)
| df | α = 0.10 | α = 0.05 | α = 0.01 |
|---|---|---|---|
| 5 | 2.015 | 2.571 | 4.032 |
| 10 | 1.812 | 2.228 | 3.169 |
| 15 | 1.753 | 2.131 | 2.947 |
| 30 | 1.697 | 2.042 | 2.750 |
| ∞ (z) | 1.645 | 1.960 | 2.576 |
Assumptions and limits
- The test statistic really follows the chosen distribution under the null hypothesis (e.g. approximately normal data for a t-test).
- The Student’s t CDF is computed from the regularized incomplete beta function, accurate to about 12 significant digits; non-integer df (Welch’s test) are supported.
- A p-value is not the probability that the null hypothesis is true, and p < 0.05 is a convention, not a law.
Frequently asked questions
Should I use a one-tailed or two-tailed test?
Use two-tailed unless you decided before seeing the data that only one direction matters. A one-tailed p-value is half the two-tailed one for the same statistic.
When should I use t instead of z?
Use t when the population standard deviation is estimated from the sample, which is almost always. With more than about 30 degrees of freedom the two give nearly the same answer.
How many degrees of freedom does my test have?
One-sample or paired t-test: n − 1. Two-sample pooled t-test: n₁ + n₂ − 2. Welch’s test uses the Welch–Satterthwaite formula, which can give a non-integer value.
Sources
- NIST/SEMATECH e-Handbook — Critical values of the Student’s t distribution
- OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing
Related calculators
- Z-Score CalculatorZ, percentile and p-value.
- Confidence Interval CalculatorMean ± margin at any confidence.
- Margin of Error CalculatorPoll margin and interval for a proportion.
More in Statistics calculators.