Welcome to the forum!
You can say "¿Cómo está (usted)?" to ask the question in a more formal manner. You can leave out the "usted", since it is understood in the address.
formal is used for people you do not know, while informal is for people you know.