For this case we know that the greeting is a sample of elementary courtesy in human society.
Normally the difference between a formal and informal greeting is the same difference when you have to use " tú " or "usted".
Informal way in Spanish:
¿Cómo estás (tú)?
Formal way in Spanish:
¿Cómo está Usted?
Answer:
¿Cómo está Usted?