Arrow left
Back to guides
Google Sheets Formulas

How to Run a T-Test in Google Sheets

Running a T-Test in Google Sheets can be an effective way to determine whether there is a statistical significance to the difference between two data sets. 

Your T-Test will require 4 inputs. Two of these are your data sets, next is deciding whether your test requires one or two tails, and a final input to declare whether you want a single sample test, a two-sample test, or a two-sample paired test to be run. To run a T-Test in Google Sheets, follow these steps:

To set up a T-Test, you must have two data sets you want to compare. To compare them, we will be using the T-Test function in Google Sheets.

To do this, type the following into your cell:

=TTEST()

Your next financial spreadsheet could be right here!
100+ spreadsheet templates, from FP&A to tax planning.
Free Spreadsheet Templates

  • Your first two arguments will be selecting the data ranges you wish to compare, separated by a comma. It should look something like the example below. 

How to Run a T-Test in Google Sheets

  • Once you have both data sets entered into your formula, you must type either “1” or “2” to select a one or two tailed test. Read further into this guide for help figuring out which is best for you to use.

  • Lastly, you will need to type a number 1-3, each corresponding to a different type of T-Test. A “1” will result in a one sample test being run, a “2” will run a two-sample test, and a “3” will provide a two-sample paired test. 

  • Once you have selected the appropriate test, you can close your parenthesis or press enter to run your T-Test. The resulting number is your P-value. 

P-Value from T-Test in Google Sheets

Should I Run a One or Two-Tailed T-Test?

It is important to know whether you want a one or two-tailed T-Test to be run by your Google Sheets formula. A one-tailed test will show the possibility of an effect in one direction, while a two-tailed test shows the possibility of effect in two directions.

This means that a one-tailed test will be useful when looking at whether or not one data set is either above or below the other. A common use for this would be cost savings.

Level up your Google Sheets skills with our FREE LiveFlow Academy
Basic and intermediate classes live now! Earn your certificate today.
Enroll in LiveFlow Academy

You can run a one-tailed T-Test after implementing new cost saving measures to determine whether the mean cost is significantly different from previous methods. 

A two-tailed test will allow you to determine whether there is a significant difference between the means of two different groups while allowing for differences in either direction (greater or smaller). Two-tailed tests are most useful when taking a conservative approach to your hypothesis.

Because the two-tailed test shows differences in both directions, it is less specific and therefore provides a more general answer as to the difference in means. 

What Does my T-Test Result Mean?

The resulting number from your T-Test formula being run is known as the P-value. Your P-value should be a decimal, and if it is lower than .05, it is a statistically significant P-value. 

The world's top businesses trust LiveFlow to automate their financial reporting
We turn Quickbooks Online data into a live FP&A dashboard in Sheets FAST!
Book a Demo

Learn how to do this step-by-step in the video below 👇

Automate financial reporting with LiveFlow

Want to eliminate manual updates of your Excel & Google Sheets models?

Yes, show me how

Need help?

Our team is here to help you any time between 9am and 10pm EST.
Check Icon
Email us at: help@liveflow.io

Liked this article? Then you'll love the ones below