The hybrid boundary element method is applied for the calculation of the characteristic impedance of 2D microstrip lines with a finite width dielectric layer and with finite width or infinite ground planes. Even though these forms of microstrips are very typical in practice, they have not been investigated very often. The basic idea of this method is that an arbitrary shaped electrode can be replaced by equivalent electrodes, and an arbitrary shaped boundary surface between any two dielectric layers can be replaced by discrete equivalent total line charges placed in the air. The discretization technique is similar to the method of moments and is well known. As a contribution to the boundary element method, we combine it with the equivalent electrodes method, creating in that way a new hybrid boundary element method. This method could be applied to a large variety of very complex 2D problems, regarding microstrip lines with or without symmetry. The quasi TEM analysis is applied. We compare values of characteristic impedance obtained applying our method with the corresponding ones obtained by the finite element method and values already reported in the literature. Relative error less than 0.5%, fast convergence of the results and several times shorter computation time comparing to the time required by finite element method make our method very efficient in the calculation of parameters of 2D microstrip lines.