High-frequency (≥2 Hz) Rayleigh wave phase velocities can be inverted to shear (S)-wave velocities for a layered earth model up to 30 m below the ground surface in many settings. Given S-wave velocity ( V S), compressional (P)-wave velocity ( V P), and Rayleigh wave phase velocities, it is feasible to solve for P-wave quality factor Q P and S-wave quality factor Q S in a layered earth model by inverting Rayleigh wave attenuation coefficients. Model results demonstrate the plausibility of inverting Q S from Rayleigh wave attenuation coefficients. Contributions to the Rayleigh wave attenuation coefficients from Q P cannot be ignored when Vs/ V P reaches 0.45, which is not uncommon in near-surface settings. It is possible to invert Q P from Rayleigh wave attenuation coefficients in some geological setting, a concept that differs from the common perception that Rayleigh wave attenuation coefficients are always far less sensitive to Q P than to Q S. Sixty-channel surface wave data were acquired in an Arizona desert. For a 10-layer model with a thickness of over 20 m, the data were first inverted to obtain S-wave velocities by the multichannel analysis of surface waves (MASW) method and then quality factors were determined by inverting attenuation coefficients.