Quality Factor Formula