Testing equality of two variances
Let $X_1, X_2, \cdots, X_{n_1}$
be a random sample of size $n_1$ from a population with variance $\sigma^2_1$ and $Y_1,Y_2, \cdots, Y_{n_2}$
be a random samples of sizes $n_2$ from a population with variance $\sigma^2_2$.
Let $\overline{x} = \frac{1}{n_1} \sum X_i$ and $s_1^2 =\frac{1}{n_11}\sum (X_i \overline{x})^2$ be the sample mean and sample variance of first sample respectively.
Let $\overline{y} = \frac{1}{n_2} \sum Y_i$ and $s_2^2 =\frac{1}{n_21}\sum (Y_i \overline{y})^2$ be the sample mean and sample variance of second sample respectively.
The hypothesis testing problem can be set up as:
Situation  Hypothesis Testing Problem 

Situation A :  $H_0: \sigma^2_1=\sigma^2_2$ against $H_a : \sigma^2_1 < \sigma^2_2$ (Lefttailed) 
Situation B :  $H_0: \sigma^2_1=\sigma^2_2$ against $H_a : \sigma^2_1 > \sigma^2_2$ (Righttailed) 
Situation C :  $H_0: \sigma^2_1=\sigma^2_2$ against $H_a : \sigma^2_1 \neq \sigma^2_2$ (Twotailed) 
Formula
The test statistic for testing above $H_0:\sigma^2_1=\sigma^2_2$ is
$F =\frac{s_1^2}{s_2^2}$
where

$s_1^2 =\frac{1}{n_11}\sum (X_i \overline{x})^2$
is the sample variance of first sample, 
$s_2^2 =\frac{1}{n_21}\sum (Y_i \overline{y})^2$
is the sample variance of second sample.
The test statistic $F$ follows $F$ distribution with $n_11$ and $n_21$ degrees of freedom.