Nonuniform fields decrease the accuracy of dielectric characterization by microwave cavity perturbation. These fields are due to the slot in the cavity through which the sample is inserted and the boundary between the sample and the metallic walls inside of the cavity. To address this problem, we measured the natural frequency and damping ratio of a resonant cavity as a sample is inserted into the rectangular cavity. We found that for a range of cavity filling fractions, a linear regression on the natural frequency and damping ratio versus the effective volume fraction of the sample in the cavity could be used to extract the complex permittivity of the sample. We verified our technique by measuring a known quartz substrate and comparing the results to finite-element simulations. When compared to the conventional technique, we found a significant improvement in the accuracy for our samples and measurement setup. We confirmed our technique on two lossy samples: a neat stoichiometric mixture bisphenol A epoxy resin and one containing a mass fraction of 3.5% multi-walled carbon nanotubes (MWCNTs). At the mode (7.31 GHz), the permittivity and loss tangent of the epoxy were measured to be and , respectively. The epoxy with a mass fraction of 3.5% MWCNTs had a permittivity of and loss tangent of .Index Terms-Bisphenol A epoxy, metrology, microwave, multi-walled carbon nanotubes (MWCNTs), nanocomposites, noncontact, nondestructive, resonator.