Paired T Test in Google Sheets: Step-by-Step

How-to basics · Updated December 1, 2026

A paired t-test (also called a dependent t-test) compares two sets of measurements taken from the same subjects, before and after a treatment, or under two conditions. In Google Sheets, there is no built-in one-click t-test button, but you can run a paired t-test using the T.TEST function with the pairs type set to 1. This guide shows you exactly how to do it, what the output means, and how to avoid common errors.

What You’ll Need

  • A Google Sheets document with your data in two columns. Each row must represent the same subject or paired observation (e.g., pre-test and post-test scores).
  • The two columns must have the same number of data points (no missing values). If you have blanks, you’ll need to clean them first.
  • Basic familiarity with entering formulas in Google Sheets.

Step-by-Step

  1. Open your Google Sheet with the data. For example, put the “Before” scores in column A (A2:A20) and “After” scores in column B (B2:B20). Make sure row 1 contains headers like “Before” and “After” — the formula will ignore headers if you start from row 2.
  2. Decide where to place the result. Click an empty cell, say D2, where you want the p-value to appear.
  3. Enter the T.TEST formula. Type: =T.TEST(A2:A20, B2:B20, 2, 1) and press Enter. This is the core step.
  4. Understand the arguments:
    • A2:A20 — first data range (Before).
    • B2:B20 — second data range (After).
    • 2 — tails: use 2 for a two-tailed test (most common), 1 for one-tailed.
    • 1 — type: 1 means paired t-test. (2 = two-sample equal variance, 3 = two-sample unequal variance.)
  5. Read the result. The cell now shows a number between 0 and 1. This is the p-value. If it is less than 0.05 (or your chosen alpha), the difference between the paired groups is statistically significant.
  6. Optional: Calculate the mean difference and confidence interval. In another cell, compute the mean of the differences: =AVERAGE(A2:A20 - B2:B20) — but note that array formulas need special handling. Easier: create a helper column C with =A2-B2 dragged down, then use =AVERAGE(C2:C20) for the mean difference and =STDEV(C2:C20) for the standard deviation.
  7. Optional: Add a conclusion label. In D3, type something like =IF(D2<0.05, "Significant", "Not significant") to make the result clearer.

Common Mistakes

  • Using the wrong type number. If you use 2 or 3 instead of 1, you get a two-sample t-test, not paired. Double-check the fourth argument.
  • Mismatched row order. Each row must pair the same subject. If rows are shuffled, the test is invalid.
  • Missing values. If one column has a blank cell, the formula may return an error or ignore the row. Remove or fill blanks before running.
  • Including headers in the range. If you include the header row (e.g., A1:A20), the text will cause an error. Start from the first data row.
  • Confusing one-tailed and two-tailed. Use 2 unless you have a strong prior directional hypothesis. One-tailed tests are rarely appropriate.

Tips

  • Check normality. The paired t-test assumes the differences are approximately normally distributed. For small samples, you can visually inspect a histogram of the differences or use a Q-Q plot.
  • Use named ranges. To make the formula clearer, select A2:A20, go to Data > Named ranges, and name it "Before". Then use =T.TEST(Before, After, 2, 1).
  • Format the p-value. Right-click the cell > Format > Number > Scientific or Number > More formats > Custom number format to show more decimals.
  • Add a note. In a cell next to the p-value, write the interpretation, e.g., "p = 0.03 < 0.05, reject null hypothesis".
  • Use the Data Analysis add-on? If you prefer a full report, install the "XLMiner Analysis ToolPak" from the Google Workspace Marketplace. It offers a paired t-test with descriptive stats, but the built-in function is simpler.

Troubleshooting

  • Formula returns #N/A. This usually means the two ranges have different numbers of data points. Check for blanks or extra rows.
  • Formula returns #VALUE!. One of the cells contains text or a non-numeric value. Clean the data.
  • P-value looks too small or too large. Verify that you used type 1. If you accidentally used type 2 (equal variance), the p-value may differ significantly.
  • I get a negative t-statistic? The T.TEST function only returns a p-value, not a t-statistic. To get the t-statistic, use =AVERAGE(A2:A20-B2:B20)/(STDEV(A2:A20-B2:B20)/SQRT(COUNT(A2:A20))) as an array formula (press Ctrl+Shift+Enter in older sheets, but in modern Google Sheets it works with Enter).
  • My data is in rows, not columns. T.TEST works with rows too, but you must reference the entire row range, e.g., =T.TEST(A1:Z1, A2:Z2, 2, 1).

Frequently Asked Questions

Q: Can I do a paired t-test in Google Sheets without a formula?
A: No built-in one-click menu exists. You can use the XLMiner Analysis ToolPak add-on, but the T.TEST function is the standard method.

Q: What does the p-value mean exactly?
A: It's the probability of observing a difference as extreme as yours if the true mean difference were zero. A p-value below 0.05 (or your alpha) suggests the difference is statistically significant.

Q: Do I need to check for equal variances?
A: No, the paired t-test does not assume equal variances between the two groups because you're analyzing the differences within pairs.

Q: Can I use this for more than two columns?
A: No, a paired t-test only compares two columns. For three or more related groups, use repeated measures ANOVA (not built-in, but you can use a workaround with regression).

Q: What if my data is not normally distributed?
A: The paired t-test is fairly robust to moderate non-normality, especially with larger samples. For very skewed data, consider the Wilcoxon signed-rank test (use =WILCOXON? Actually, Google Sheets doesn't have that function; you'd need to calculate it manually or use an add-on).

Q: How do I report the results?
A: State the mean difference, the t-statistic (if you calculated it), degrees of freedom (n-1), and the p-value. For example: "The mean difference was 5.2 (SD 3.1), t(19) = 2.45, p = 0.024."

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.