The t-test and z-test are statistical tests used for hypothesis testing. The t-test is used when sample sizes are small (n<=30) and the samples are drawn from a normal population with unknown standard deviation. The z-test is used when sample sizes are large (n>=30) or when the standard deviation is known, regardless of sample size. Seven situations are described that outline when to use the t-test or z-test based on characteristics of the sample and population.