T-Tests in Google Sheets: A Practical Guide
Learn how to run one- and two-sample t-tests in Google Sheets using T.TEST, interpret p-values, and report results with clear examples and best practices for accurate analysis.

To run a t-test in Google Sheets, use the T.TEST function. Provide two data ranges, choose tails (1 for one-tailed, 2 for two-tailed), and select a test type (1 = paired, 2 = two-sample equal variance, 3 = two-sample unequal variance). The function returns a p-value you compare to your alpha to determine significance. This approach supports one- and two-sample comparisons directly in Sheets.
What a t-test measures and how Google Sheets implements it
A t-test measures whether the means of two groups are statistically different from each other. In Google Sheets, you perform this test with the T.TEST function, which accepts two data ranges, a tails option (1 for one-tailed, 2 for two-tailed tests), and a type that defines the test design (1 = paired samples, 2 = two-sample equal variances, 3 = two-sample unequal variances). According to How To Sheets, this setup makes it easy to validate research questions and business hypotheses directly in a spreadsheet. Start with clean columns of numeric data representing the two groups you want to compare; ensure there are no missing values in the paired observations, and keep the same unit of measurement across both ranges. This layout lets you reuse formulas to check other metrics without rebuilding your model. The example below uses two columns named Group A and Group B to illustrate the concept, and the T.TEST result is a single numeric p-value that informs your decision about statistical significance. For clarity, name your columns clearly and keep a consistent row count so the data ranges align when you extend the data. The How To Sheets team notes that this workflow scales well for quick, repeatable analyses.
=T.TEST(B2:B21, C2:C21, 2, 3)=AVERAGE(B2:B21)
=AVERAGE(C2:C21)=STDEV.S(B2:B21)
=STDEV.S(C2:C21)Interpreting the output requires understanding that the p-value is the probability of observing such a difference (or more extreme) under the null hypothesis. If your data meet the assumptions, this p-value helps you decide if the observed difference is statistically significant.
wordCountAsIs":0],
Steps
Estimated time: 15-25 minutes
- 1
Prepare data
Label your columns clearly (e.g., Group A, Group B) and ensure both ranges contain numeric values with the same length for pairing when applicable. Remove non-numeric cells or replace them with a reasonable placeholder after documenting why the data was cleaned.
Tip: Always document data cleaning steps to improve reproducibility. - 2
Choose test configuration
Decide between paired vs. two-sample designs and between one-tailed vs. two-tailed tests. In Sheets, this translates to the last two arguments of T.TEST: type (1/2/3) and tails (1/2).
Tip: If in doubt, start with two-tailed, then test one direction for sensitivity. - 3
Run the test
Enter the T.TEST formula with your chosen parameters. Place the result in a dedicated cell so you can reuse your ranges for additional analyses.
Tip: Keep a record of the exact formula used for audit purposes. - 4
Check basic statistics
Compute means and standard deviations for both groups to aid interpretation and potential effect size calculation.
Tip: Use separate cells to store mean1, mean2, sd1, sd2 for clarity. - 5
Interpret results
Compare the p-value to your alpha threshold (commonly 0.05). If p < alpha, reject the null hypothesis; otherwise, fail to reject. Consider computing effect size as context.
Tip: Reporting effect size alongside p-values provides practical understanding. - 6
Document and report
Capture assumptions, sample details, and the exact test configuration. Include a brief narrative of how conclusions were reached and any limitations.
Tip: Include a short reproducibility note and preserve the formulas used.
Prerequisites
Required
- Required
- Required
- Two numeric data columns ready for comparison (Group A and Group B)Required
Optional
- Optional: knowledge of normality and variance concepts for interpretationOptional
- Optional: a short alpha level in mind (commonly 0.05) for reporting significanceOptional
Keyboard Shortcuts
| Action | Shortcut |
|---|---|
| CopyCopy selected data or formula | Ctrl+C |
| Paste values onlyPaste as values to preserve results | Ctrl+⇧+V |
| UndoRevert your last edit | Ctrl+Z |
| FindSearch within the sheet | Ctrl+F |
| Fill downApply the formula to a column | Ctrl+D |
FAQ
What does the T.TEST function do in Google Sheets?
T.TEST computes the probability that the means of two samples are equal under the null hypothesis. It supports one- or two-tailed tests and multiple type options (paired, equal variance, unequal variance).
T.TEST gives you the p-value for comparing two data sets. A small p-value suggests a difference between the groups.
Which T.TEST type should I use for paired data?
Use type 1 (paired) when your observations are matched pairs, such as before/after measurements on the same subjects. This accounts for the pairing in the variance estimate.
If your data are paired, pick type 1 to reflect the matched design.
Can I use T.TEST for a one-sample test?
T.TEST compares two samples. To perform a one-sample test, you can create a second range filled with the population mean and compare the sample to that constant value, though this is a workaround rather than a native one-sample option.
T.TEST compares two groups; for a single mean, you compare to a constant using a second range.
What should I check before trusting results?
Ensure independence of observations, reasonably normal distributions in each group, and assess variance equality if applying a two-sample test. If normality is questionable, consider nonparametric alternatives or larger samples.
Check independence, distribution shape, and variance assumptions before trusting the t-test results.
How do I report the result clearly?
Report the p-value, the test type, and the direction of the hypothesis. Include a simple interpretation statement and, if possible, the computed effect size to convey practical significance.
Share the p-value, test details, and what the result means for your hypothesis.
The Essentials
- Use T.TEST for two-sample comparisons in Sheets
- Choose tails and type carefully to reflect your design
- Interpret p-values against alpha and report effect size
- Keep data ranges fixed and document steps for reproducibility