Bilayer thickness in membrane domains enriched with sphingomielin and cholesterol (known as “rafts”) is bigger than thickness of neighboring membrane. Monolayers need to deform to compensate the thicknesses difference in the vicinity of the raft boundary. Line tension of the boundary of rafts associated with elastic deformations originating from the compensation of the thickness mismatch is calculated in the frame-work of the elasticity theory. In the calculations deformations of splay, tilt and lateral stretching/compression are considered. It is assumed that raft consists of two monolayer domains situated in the different membrane monolayers; it is also assumed that the boundaries of domains can shift in the lateral direction with respect to relative to each other. Dependence of the boundary energy of raft on the value of the relative shift of the boundaries is calculated. It is shown that the boundary energy is minimal when shift is equal to 4.5 nm. Dependence of the optimal shift on the mismatch of the monolayer thicknesses of raft and surrounding membrane as well as membrane shape in the vicinity of boundary are calculated. The calculated values of line tension are in a good agreement with available experimental data. Taking into account deformation of stretching/compression increases the accuracy of calculations by 30%; this exceeds the uncertainty of the line tension measurements by modern techniques.