We examine the transmission through nonideal microwave resonant circuits. The general analytical resonance line shape is derived for both inductive and capacitive coupling with mismatched input and output transmission impedances, and it is found that, for certain non-ideal conditions, the line shape is asymmetric. We describe an analysis method for extracting an accurate internal quality factor (Q(i)), the diameter correction method (DCM), and compare it to the conventional method used for millikelvin resonator measurements, the phi rotation method (phi RM). We analytically find that the phi RM deterministically overestimates Q(i) when the asymmetry of the resonance line shape is high, and that this error is eliminated with the DCM. A consistent discrepancy between the two methods is observed when they are used to analyze both simulations from a numerical linear solver and data from asymmetric coplanar superconducting thin-film resonators. (C) 2012 American Institute of Physics. [http://dx.doi.org/10.1063/1.3692073]