Mathematical modeling of many physical and engineering problems is defined with convection-diffusion equation. Therefore, there are many analytic and numeric studies about convection-diffusion equation in literature. The finite element method is the most preferred numerical method in these studies since it can be applied to many problems easily. But, most of the studies in literature are about constant coefficient case of the convection-diffusion equation. In this study, the finite element formulation of the variable coefficient case of the convection-diffusion equation is given in both one and two dimensional cases. Accuracy of the obtained formulations are tested on some problems in one and two dimensions.