T.DIST.RT in Google Sheets: Right-Tail T Guide
In this article
The T.DIST.RT function in Google Sheets returns the right-tailed probability (the p-value) of the Student's t-distribution for a given t-value and degrees of freedom. You use it for one-tailed hypothesis tests where the rejection region sits in the upper tail, such as checking whether a sample mean is significantly greater than a claimed value. The syntax is =T.DIST.RT(x, degrees_freedom), where x is the t-value you calculated and degrees_freedom is a positive integer. Nothing needs to be installed; every Google Sheets account has it.
What You'll Need
- A Google Sheets spreadsheet open in a browser or the mobile app (the function works the same in both).
- Your t-value (often called the test statistic) already calculated, or the raw data to calculate it from.
- Your degrees of freedom, usually sample size minus one for a single-sample test.
- A basic idea of whether your test is one-tailed (upper) or two-tailed, because T.DIST.RT only handles the upper tail.
Step-by-Step
- Open your spreadsheet and click the cell where you want the probability to appear. Leave a couple of blank cells above it if you plan to add labels.
- Type an equals sign to start a formula, then type
T.DIST.RT(. A tooltip should appear showing the expected arguments: x and degrees_freedom. - Enter the t-value. You can type a number directly, such as
2.5, or reference a cell likeB2. If you have not calculated the t-value yet, do that first: for a single sample it is (sample mean minus hypothesised mean) divided by (sample standard deviation divided by the square root of the sample size). - Type a comma, then enter the degrees of freedom. For a one-sample t-test with 20 observations, that is 19. You can hard-code it or point to a cell.
- Close the parenthesis and press Enter. The cell now shows the right-tail probability, a number between 0 and 1.
- Read the result against your significance level. If the output is less than your alpha (commonly 0.05), you reject the null hypothesis in favour of the alternative that the true mean is greater.
- For a two-tailed test, do not double the result blindly unless your alternative is symmetric and you calculated the t-value from the same data. The cleaner approach is to use
T.DIST.2Twith the absolute value of the t-statistic, which handles both tails correctly. - Label the cell so the sheet stays readable. Put something like "Right-tail p-value" in the adjacent column rather than leaving a bare number.
- If you want to sanity-check the answer, compare it with
1 - T.DIST(x, degrees_freedom, TRUE). The two should match closely, which confirms you used the right tail.
Common Mistakes
The most frequent error is passing a negative t-value. T.DIST.RT is built for the upper tail, so a negative x returns a probability above 0.5, which usually means you should be testing the lower tail instead. If your alternative hypothesis says "less than", use T.DIST with the cumulative argument set to TRUE, not T.DIST.RT.
Another common slip is entering the sample size where degrees of freedom belong. Degrees of freedom is almost always n minus 1 for a one-sample test, and it changes for paired or two-sample tests. Feeding in the raw count inflates the probability and can flip your conclusion.
People also confuse the t-value with the p-value. The function takes the test statistic, not a probability. If you paste a p-value into the x argument, the output is meaningless. Finally, watch for text-formatted numbers imported from elsewhere; a t-value stored as text causes a #VALUE! error even though it looks correct on screen.
Tips
Keep your test statistic, degrees of freedom and alpha in separate labelled cells, then reference them in the formula. That way you can change the data and the p-value updates without editing the formula itself. Use cell references rather than typed numbers wherever the value might change.
Format the result cell to show several decimal places, since p-values near the threshold are easy to misread when rounded to two digits. A result of 0.049 and 0.051 lead to opposite decisions at alpha 0.05.
If you are building a small results table, add a column that converts the p-value into a plain-language verdict with an IF formula, for example returning "Reject" when the value is below your alpha cell and "Do not reject" otherwise. It makes the sheet easier for others to read.
Troubleshooting
If you see #NUM!, one of the arguments is outside the allowed range. Degrees of freedom must be at least 1, and it must be a whole number in practice. Check that you have not entered zero or a negative value.
If you see #VALUE!, the cell contains text rather than a number. Select the cell, check the number format, and re-enter the value or use a function like VALUE to convert it. Look for stray spaces or non-breaking characters copied from another document.
If the result looks implausibly high, confirm you have the right tail. A t-value of 1.8 with 10 degrees of freedom gives roughly 0.05 on the right tail; if you are seeing something near 0.95, you have probably entered a negative statistic. If the result looks implausibly low, check that the degrees of freedom are not far too large for your sample.
If the formula will not calculate at all, make sure you are using a period in the function name and a comma between arguments, since some locales use different separators. Google Sheets generally accepts commas, but imported sheets may expect semicolons depending on the file's locale setting.
Frequently Asked Questions
What is the difference between T.DIST.RT and T.DIST?
T.DIST.RT returns only the right-tail probability. T.DIST takes a third argument that switches between the probability density and the cumulative distribution, so it is more flexible but easier to misuse.
Can I use T.DIST.RT for a two-tailed test?
It is not the right tool. Use T.DIST.2T with the absolute value of your t-statistic, which returns the combined area in both tails.
Does T.DIST.RT work on the Google Sheets mobile app?
Yes. The function is part of the standard calculation engine and behaves the same on Android, iPhone and the web version.
What degrees of freedom should I use for a two-sample test?
It depends on whether you assume equal variances. The simpler pooled formula uses n1 plus n2 minus 2; the unequal-variance version uses a more involved calculation. Check which method your analysis calls for before entering the number.
Why does my result change when I add data?
Adding observations changes both the t-statistic and the degrees of freedom. If your formula references those cells, the p-value recalculates automatically, which is expected behaviour.
Is there a T.DIST.RT equivalent in Excel?
Yes, Excel uses the same function name and argument order, so formulas copied between the two generally work without edits.