See:
- http://en.wikipedia.org/wiki/Signal-to-noise_ratio
- http://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio
- http://en.wikipedia.org/wiki/Audio_quality_measurement
But be aware, that there is no unique definition of "sound quality". There is e.g. the "Speech Intelligibility Index" and the older "Articulation Index" and the "factor of clearness (C50)" method to estimate the quality. A web research will give you more methods...