The quality factor and energy decay time of superconducting resonators have been measured as a function of material, geometry, and magnetic field. Once the dissipation of trapped magnetic vortices is minimized, we identify surface two-level states (TLS) as an important decay mechanism. A wide gap between the center conductor and the ground plane, as well as use of the superconductor Re instead of Al, are shown to decrease loss. We also demonstrate that classical measurements of resonator quality factor at low excitation power are consistent with single-photon decay time measured using qubit-resonator swap experiments.Superconducting coplanar resonators have many important applications such as photon detection [1] and quantum computation [2,3], and recently have been used to host arbitrary photon states generated by coupling to qubits [4,5,6]. A key parameter limiting the performance is the energy relaxation time T 1 , while dephasing is relatively unimportant [7]. Resonator performance has typically been determined through classical measurements of the quality factor, and much work has yet to be done to understand the physics of the loss mechanisms and to optimize resonator designs for best performance [8,9,10,11,12].Here we show how several previously untested loss mechanisms can be eliminated or optimized to reach a measured quality factor Q m in the 200,000 to 400,000 range at low power, while the intrinsic quality factor Q i is even higher after subtraction of the coupling capacitor limited Q c . We provide detailed evidence that surface loss from two-level state (TLS) defects is an important loss mechanism. Finally, we show how relatively simple quality factor measurements, when taken at low power, can be used to predict the energy decay time of resonators at the single photon level.For this work, we measured various half-wavelength (λ/2) and quarter-wavelength (λ/4) coplanar resonators, as described in Fig. 1 and Table I. Aluminum (Al) films were sputter deposited and etched with a Cl 2 /BCl 3 -based reactive ion etch (RIE), whereas Rhenium (Re) was electron-beam evaporated in a molecular beam epitaxy system using a substrate temperature of 850 • C and etched with SF 6 /O 2 -based RIE. The films were fabricated as part of a multilayer process to enable testing with qubits. Q m of the resonators was determined in an adiabatic demagnetization refrigerator using standard two-port transmission measurements with a vector network analyzer. Q c 's estimated from the |S 21 | calibration were ∼400,000 (∼1,000,000) for λ/2 (λ/4) resonators but were not subtracted from Q m .For all the resonators we observed an increase in Q m as the measurement power increased and temperature T decreased. The T dependence is shown in Fig. 2 power. To avoid complications due to different geometries, we base most of the discussion on λ/4 resonators as they share a similar shape. The decrease in Q m with increasing temperature is consistent with quasiparticle dissipation. In Fig. 2(b), the fractional change in the resonance frequency ∆...