A method was described for determining the thickness of epitaxical thin films common to electronic materials. The equations were developed based on the kinematical theory of X-ray diffraction and effects of both primary and secondary extinctions were considered. As an example of the applications of this method, thickness measurement of AlGaAs thin films on GaAs was demonstrated. These films were grown by molecular beam epitaxy. The integrated reflected intensities from the film and the substrate were obtained by the X-ray double crystal diffractometer. An excellent agreement was obtained between the results from X-ray measurements and RHEED oscillation data.