We consider the contact of two elastic bodies with rough surfaces at the interface. The size of the micropeaks and valleys is very small compared with the macrosize of the bodies’ domains. This makes the direct application of the FEM for the calculation of the contact problem prohibitively costly. A method is developed that allows deriving a macrocontact condition on the interface. The method involves the twoscale asymptotic homogenization procedure that takes into account the microgeometry of the interface layer and the stiffnesses of materials of both domains. The macrocontact condition can then be used in a FEM model for the contact problem on the macrolevel. The averaged contact stiffness obtained allows the replacement of the interface layer in the macromodel by the macrocontact condition.