ThisCalculator

Everyday

Calculate p from t Score: Formula & Steps

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

This calculator works out the p-value from a t-score. You enter your t-score, the degrees of freedom, and choose whether your test is one-tailed or two-tailed, and it returns the exact p-value. The p-value is the probability of observing a t-score at least as extreme as yours, assuming the null hypothesis is true.

Formula

The p-value is derived from the cumulative distribution function (CDF) of the t-distribution. For a one-tailed test (upper tail), the p-value is:

p = 1 – F(t | df)

For a two-tailed test, the p-value is doubled:

p = 2 × (1 – F(|t| | df))

Where:

  • t = your calculated t-score (test statistic)
  • df = degrees of freedom (usually n – 1 for a one-sample t-test, or n1 + n2 – 2 for a two-sample t-test)
  • F(t | df) = the cumulative probability of the t-distribution up to the value t, with df degrees of freedom

Note: The calculator uses the standard t-distribution CDF, which is implemented in most statistical software and calculators.

Worked Example

Suppose you have a t-score of 2.0 with 30 degrees of freedom, and you are conducting a two-tailed test. Using the default values from the calculator:

  1. First, find the cumulative probability F(2.0 | 30). From a t-table or software, F(2.0 | 30) ≈ 0.9727.
  2. For the upper tail: 1 – 0.9727 = 0.0273.
  3. For a two-tailed test, double it: 2 × 0.0273 = 0.0546.

Thus, the p-value is approximately 0.0546. This matches the calculator’s output (rounded to 4 decimal places).

When to Use This Calculator

You use this calculator after you have computed a t-score from your data. Common scenarios include:

  • One-sample t-test: comparing a sample mean to a known population mean.
  • Two-sample t-test: comparing the means of two independent groups.
  • Paired t-test: comparing means from the same group at two different times.
  • Regression analysis: testing whether a coefficient is significantly different from zero.

In each case, you need the t-score and the degrees of freedom to find the p-value.

How to Choose One-Tailed vs Two-Tailed

Choose a one-tailed test if your alternative hypothesis is directional, for example, “the new treatment increases scores” or “the mean is greater than 100.” Use a two-tailed test if your alternative hypothesis is non-directional, such as “the means are different” (without specifying which is larger).

Two-tailed tests are more conservative because they split the significance level across both tails. If you are unsure, a two-tailed test is generally safer and more widely accepted.

Common Mistakes and Misconceptions

One common mistake is using the wrong degrees of freedom. For a one-sample t-test, df = n – 1, where n is the sample size. For a two-sample t-test with equal variances, df = n1 + n2 – 2. Using incorrect df changes the p-value, especially with small samples.

Another mistake is confusing the t-score with the p-value. The t-score is a test statistic; the p-value is a probability. A larger absolute t-score generally leads to a smaller p-value, but the exact relationship depends on df.

A common misconception is that a p-value is the probability that the null hypothesis is true. It is not. The p-value is the probability of observing your data (or more extreme) given that the null hypothesis is true.

Limitations of the t-Distribution

The t-distribution assumes that your data are approximately normally distributed, especially for small samples. With large samples (typically n > 30), the t-distribution closely approximates the normal distribution, and the assumption becomes less critical.

Also, this calculator works for standard t-tests. For more complex models (e.g., mixed-effects models), the degrees of freedom may be approximated differently, and the p-value might be slightly off. In such cases, specialized software is recommended.

Frequently Asked Questions

What is a p-value?

A p-value is the probability of obtaining a test statistic at least as extreme as the one observed, assuming the null hypothesis is true. A small p-value (typically ≤ 0.05) suggests that the observed result is unlikely under the null hypothesis, leading researchers to reject the null.

Can I calculate a p-value from a t-score by hand?

Yes, but it requires a t-table or statistical software. With a t-table, you find the critical value for your df and compare it to your t-score. To get an exact p-value, you need software or a calculator like this one.

What if my t-score is negative?

The calculator handles negative t-scores automatically. The p-value is based on the absolute value, so a t-score of -2.0 gives the same p-value as +2.0 for a two-tailed test. For a one-tailed test, the direction matters, and the calculator uses the upper tail by default.

What is the difference between a t-score and a z-score?

A t-score is used when the population standard deviation is unknown and the sample size is small (typically n < 30). A z-score is used when the population standard deviation is known or the sample size is large. The t-distribution has heavier tails, reflecting the extra uncertainty from estimating the standard deviation.

How do I report the p-value in my results?

Report the p-value with the test statistic and degrees of freedom, for example, “t(30) = 2.0, p = .055.” If the p-value is very small, you might write “p < .001" instead of the exact value.

Related

Formula used
in t | t-score | - | 2.0 | 0
in df | Degrees of freedom | - | 30 | 1
sel tails | Test type | One-tailed=1, Two-tailed=2 | 2
out p | p-value | - | tails * (1 - tcdf(t, df)) | 4

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.