T.INV in Google Sheets: Step-by-Step Guide
In this article
The T.INV function in Google Sheets returns the left-tailed inverse of the Student's t-distribution for a given probability and degrees of freedom. In plain terms, you give it a probability (like 0.05) and the degrees of freedom for your sample, and it returns the t-value such that the area to the left of that value equals your probability. This is the critical t-value you use for one-tailed confidence intervals and hypothesis tests. To use it, you only need a Google account and a spreadsheet; no add-ons or special permissions are required.
What You'll Need
- A Google account with access to Google Sheets (sheets.google.com).
- A spreadsheet where you can enter data or formulas.
- Your probability value (between 0 and 1) and degrees of freedom (a positive number). If you are working from a sample, degrees of freedom is usually sample size minus one.
- Basic understanding of whether your test is one-tailed or two-tailed, because T.INV returns a left-tailed value and you may need to adjust the probability for a two-tailed test.
Step-by-Step
- Open your spreadsheet. Go to sheets.google.com and open an existing sheet or create a new blank one. Click the cell where you want the result to appear.
- Start the formula. Type
=T.INV((including the equals sign and opening parenthesis). Google Sheets will show a tooltip with the syntax: T.INV(probability, degrees_freedom). - Enter the probability. Type the left-tailed probability as a decimal between 0 and 1. For example, for a 95% one-tailed confidence level, the left-tail probability is 0.05. You can also reference a cell, like
A1, if your probability is stored there. Do not enter 95 or 5; enter 0.05. - Add a comma. Type a comma to separate the arguments. In some locales the separator may be a semicolon; Google Sheets usually accepts a comma, but if you see an error, try the separator your locale uses.
- Enter the degrees of freedom. Type a positive number or a cell reference. For a sample of 20 observations, degrees of freedom is typically 19. The value must be at least 1; T.INV returns an error for zero or negative degrees of freedom.
- Close the formula and press Enter. Type
)and press Enter. The cell now shows the t-value. For example,=T.INV(0.05, 19)returns approximately -1.729, the critical t-value for a one-tailed test at the 0.05 level with 19 degrees of freedom. - Interpret the sign. T.INV returns a negative value when the probability is less than 0.5, because the left tail of the t-distribution lies below zero. If you need a positive critical value for a right-tailed test, use
=T.INV(1 - probability, degrees_freedom)or take the absolute value with=ABS(T.INV(probability, degrees_freedom)). - For a two-tailed test, split the probability. If your alpha is 0.05 for a two-tailed test, use 0.025 in T.INV to get the lower critical value, and use
=T.INV(1 - 0.025, degrees_freedom)or=ABS(T.INV(0.025, degrees_freedom))for the upper critical value. Do not enter 0.05 directly for a two-tailed critical value; that gives the one-tailed value. - Copy the formula if needed. Drag the fill handle to apply the same formula to other rows. Use absolute references (like
$B$1) for fixed probability or degrees of freedom if you do not want them to change when copying. - Format the result. Select the cell and use the toolbar to increase decimal places if you want more precision. The default display may round the value; the underlying number keeps full precision.
Common Mistakes
- Entering a percentage instead of a decimal. T.INV expects a probability between 0 and 1. Entering 5 or 95 instead of 0.05 or 0.95 returns an error or a meaningless result.
- Using the wrong tail. T.INV is left-tailed. For a right-tailed critical value, you must use 1 minus the probability, or take the absolute value. For a two-tailed test, split alpha in half before using T.INV.
- Confusing degrees of freedom with sample size. For a one-sample t-test, degrees of freedom is n minus 1, not n. Using the sample size directly gives a slightly different and incorrect critical value.
- Passing a non-integer degrees of freedom. T.INV truncates non-integer degrees of freedom in some implementations; Google Sheets may return an error or a value based on the truncated number. Use an integer for standard tests.
- Forgetting the equals sign. Without
=, Sheets treats the entry as text and displays the formula instead of calculating it. - Using a comma in a locale that requires a semicolon. If you see a formula parse error, check your spreadsheet's locale settings and use the correct argument separator.
Tips
- Use T.INV.2T for two-tailed probabilities directly:
=T.INV.2T(0.05, 19)returns the positive critical value for a two-tailed test at alpha 0.05. This avoids manual splitting. - For very large degrees of freedom, the t-distribution approaches the standard normal distribution; T.INV results will be close to NORM.S.INV results.
- Keep your probability and degrees of freedom in separate cells so you can change them without editing the formula. Reference those cells in T.INV.
- Label your output clearly, for example "Critical t (left tail)", so you do not confuse it with a p-value or a test statistic.
- If you need the cumulative distribution rather than the inverse, use T.DIST or T.DIST.RT instead.
Troubleshooting
If T.INV returns a #NUM! error, check that probability is strictly between 0 and 1 and that degrees of freedom is at least 1. A probability of exactly 0 or 1 is invalid. If you see #VALUE!, one of the arguments is text or blank; make sure both are numbers or valid cell references. If the formula appears as text, add the leading equals sign. If you get a parse error, confirm the argument separator matches your locale. If the result looks wrong, verify you used the correct tail and that degrees of freedom is n minus 1 for a one-sample test. If you are unsure whether your version of Sheets supports T.INV, check that the function name is spelled exactly with a period and no space; older sheets may require TINV, but current Google Sheets supports T.INV.
Frequently Asked Questions
What is the difference between T.INV and T.INV.2T?
T.INV returns the left-tailed inverse for a given probability, so it gives a negative value for probabilities below 0.5. T.INV.2T takes a two-tailed probability and returns the positive critical value, effectively doubling the tail area. Use T.INV for one-tailed work and T.INV.2T for two-tailed critical values.
Can I use T.INV for a 95% confidence interval?
Yes. For a two-tailed 95% confidence interval, use T.INV(0.025, df) for the lower critical value and T.INV(0.975, df) or ABS(T.INV(0.025, df)) for the upper. For a one-tailed interval, use T.INV(0.05, df) and take the absolute value as needed.
Why does T.INV return a negative number?
The t-distribution is centered at zero. A left-tail probability less than 0.5 corresponds to a value below zero, so T.INV returns a negative t-value. That is expected; use the absolute value if you need a positive critical value.
What degrees of freedom should I use?
For a one-sample t-test, use n minus 1, where n is the sample size. For a two-sample test, the calculation depends on whether you assume equal variances; use the appropriate formula or a built-in test function. T.INV itself only needs the final degrees of freedom number.
Does T.INV work in Excel too?
Yes, Excel has T.INV with the same syntax. Results should match for the same inputs, though display precision may differ. Google Sheets and Excel both use the left-tailed definition.
Can T.INV handle decimal degrees of freedom?
Google Sheets may accept a decimal but truncate or return an error depending on the value. For standard statistical tests, degrees of freedom is an integer, so round to the nearest whole number before using T.INV.