We present a new method, Social Groups and Navigation (SGN), to simulate the walking behavior of small pedestrian groups in virtual environments. SGN is the first method to simulate group behavior on both global and local levels. We define quantitative metrics to measure the coherence and the sociality of a group based on existing empirical data of real crowds. SGN is designed to let groups stay in coherent and social formations without explicitly modeling such formations. For groups of four, SGN generates between 13% and 53% more socially-friendly behavior than existing methods, measured over the lifetime of a group in the simulation. For groups of three, the gain is between 15% and 31%, and for groups of two, the gain is between 1% and 4%. SGN can be used with any existing global path planner and any existing path following method. Experiments show that SGN enables the simulation of thousands of agents in real time. Due to its flexible design, it can be easily integrated into a larger crowd simulation framework.