In inferential statistics, the t-test assesses whether two sets of data are different from each other, and compares their means. The t-test is commonly used for studying the results of experiments and A/B tests, and for quantifying improvement or change. For example, you can do a t-test to measure how drinking 10 cups of brewed coffee a day can affect a person's heart rate, or to find out if introducing a new textbook has improved students' communication skills. To do t-tests in Microsoft Excel, use its built-in "T.TEST" function.

Start Microsoft Excel. Press "CTRL+N" to create a new workbook.

Type "Data1" and "Data2" in cells "A1" and "B1," respectively. You may replace these with your preferred variable names.

Enter your first set of data in column "A," starting from cell "A2."

Enter your second set of data in column "B," starting from cell "B2." Make sure that both columns have the same number of cells. For instance, if column "A" contains five entries, column "B" should also have five entries.

Highlight all non-empty cells (including the variables) and then press "CTRL+SHIFT+F3."

Select the cell below the last number in column "A." Type "=T.TEST" and then press "CTRL+A." This opens a dialogue box where you can enter parameters for the function.

Enter "Data1" and "Data2" into the "Array1" and "Array2" boxes, respectively.

Enter 1 into the "Tail" box if you'd like to use one-tailed distribution. Otherwise, enter 2.

Enter the kind of test you'd like to perform in the "Type" box. Use any of the values below.

1 - Paired t-test

2 - Two-sample equal variance

3 - Two-sample unequal variance

Click on "OK" to view the result of your formula.

#### Warning

If you are using Microsoft 2007 or earlier, use "TTEST" instead of "T.TEST." Both functions work the same way, and have the same parameters. Although "TTEST" still works in Excel 2010, using "T.TEST" is highly recommended.