The accuracy of determining the permittivity of the material depends on the thickness of the intermediate layer with variable dielectric characteristics formed on the surface of the sample upon manufacturing. We present the results of studying the influence of the surface roughness of the test sample on the accuracy of determining the permittivity using the resonator method. An algorithm for calculating the permittivity in a volumetric cylindrical resonator is proposed, taking into account the roughness value and the residual gap. Using the matrix method for calculating the wave transmitted through the plate, a model for determination of the dielectric permittivity of a multilayer sample using a measuring resonator is developed. The results obtained can be used to improve the accuracy of the permittivity determination in a volume resonator when testing the samples with a roughness exceeding the required standard.