In this paper, the problem of scattering for an obliquely incident electromagnetic wave by a planar grating on a dielectric slab has been analyzed accurately by the method in which the sampling theorem is applied to the Fourier transform. First, by means of the unknown surface current on the planar grating, the Fourier‐transformed functions of the scattered field are given analytically. Next, this current is expanded in terms of weighted Fourier series so that its Fourier transform is given. Finally, the sampling theorem is applied for the purpose of discretization to the relationship for the perfect conductor condition expressed in the Fourier transform domain so that simultaneous equations for the unknown expansion coefficients of the surface current are obtained. By means of the numerical calculations, accuracy of the method is confirmed and the numerical values are given for the transmitted and reflected powers and the surface current.