As already been said, know your laws in your state etc etc. For instance, here in MI, being attacked by multiple offender, even if they are un or lightly armed, lethal force is justifiable (depending on circumstances). So if you're surrounded by four guys and none of them have weapons, you're still in the clear. Granted you will go through legal and societal hell for what you did (again, as already been stated), you're the one going home that night. Let me repeat that: in MI (your state may be different), threat from multiple assailants, regardless of whether or not they are armed, is considered a threat great enough to use lethal force. Incidentally, this extends to a lot of other interesting situations (for instance the ever-mentioned 260lb football player assaulting the 80 year old woman with his bare hands, she is justified).
One bit of advice that will save lives is to give them the money and see if they go away. Even one-on-one odds aren't good in this situation (if they are robbing you they already have the drop on you - otherwise they wouldn't be robbing you right now - so you're already behind the reaction curve).
Other than that, the general idea here is the same (obviously each situation will have different variables that may change this): Eliminate threats in the order of danger. Most dangerous first, then the next threat, then the next. Stop when the threats stop.
Also I haven't seen this mentioned: The best way to get out of this alive is to never get into this situation in the first place. Situational awareness. You should never be surrounded and not realize it unless they jump out of hidden doors and corners.