A measurement method using the TM010 and TE011 mode cylindrical cavity is proposed to measure the accurate relative permittivity epsilon(r) and permeability mu(r) of ferrite materials. The method is based on the rigorous electromagnetic field analysis using the Ritz-Galerkin method to take into account the effects of the sample insertion holes of a cavity and the material parameters epsilon(r) and mu(r). Numerical calculations were performed for a cavity structure used in our experiments. The cavity dimensions were measured rigorously for the TM and TE mode cavity before epsilon(r) and mu(r) measurements. The measurement results of a fused quartz and a ferrite sample show the validity of the analysis of TM and TE mode cavity.