For formal 'you' (Sie), the correct German phrase for 'how are you?' is 'wie geht's Ihnen?' Using dative 'Ihnen' after 'wie geht's' is grammatically correct for formal address. 'Wie bist du?' asks about your being/state, not how you are feeling. 'Geht's ihr gut?' is for plural 'you all'.